So to create the user in the database MyDb for a login named myAppLogin you just issue command like this:
USE MyDb sp_adduser myAppLogin
Starting from now the login myAppLogin can start using the database. The user can be removed using the following code:
USE MyDb sp_dropuser myAppLogin
What is very important - you cannot remove a user when it is "in use", so there is an active session in the database using this user, however when the session was not found, the user will be removed.
You can also decide to make a database a public one. Generally this is a very bad idea, as you allow anyone from the "building" to access your "office" or better in database terminology - anyone from the server, so any login is allowed to use your database. To make a database accessible for everyone you need to create a guest user in the database:
USE MyDb sp_adduser guest
And again, to remove guest user access you should issue:
USE MyDb sp_dropuser guest
nice thank you for sharing
ReplyDeleteSQL Server DBA Online Training
kayseriescortu.com - alacam.org - xescortun.com
ReplyDeleteperde modelleri
ReplyDeletesms onay
mobil ödeme bozdurma
nft nasıl alınır
ankara evden eve nakliyat
Trafik Sigortası
dedektör
web sitesi kurma
Aşk Romanları
maltepe bosch klima servisi
ReplyDeletetuzla bosch klima servisi
tuzla arçelik klima servisi
çekmeköy samsung klima servisi
ataşehir samsung klima servisi
maltepe arçelik klima servisi
ümraniye mitsubishi klima servisi
beykoz vestel klima servisi
üsküdar vestel klima servisi