password99
Technical User
How do I change the Default DB of a user in transact SQL.
I am trying to
add a new user who will be the owner of the DB X
and whose default db will be the DB X.
Here is what I have done so far:
sp_addlogin 'user', 'pass', 'master'
use X
EXEC sp_changedbowner 'user'
Now how do I default the DB to be X for user?
Is there a better way of creating a new user who is owner of the DB and also his default DB is X?
THANKS FOR YOUR HELP..I REALLY APPRECIATE IT.
I am trying to
add a new user who will be the owner of the DB X
and whose default db will be the DB X.
Here is what I have done so far:
sp_addlogin 'user', 'pass', 'master'
use X
EXEC sp_changedbowner 'user'
Now how do I default the DB to be X for user?
Is there a better way of creating a new user who is owner of the DB and also his default DB is X?
THANKS FOR YOUR HELP..I REALLY APPRECIATE IT.