Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Fangfoo
Starting Member
3 Posts |
Posted - 2004-10-20 : 17:32:42
|
| I've restored a SQL 2000 db to a new server, restored the specific user accounts, and migrated the dbowner but I still have the defDBName set to a long retired database. Anyone know the select statement to change a users defDBName? Thanks!As a FYI (these are the bits I used to do the first few steps)to set a new owner:sp_changedbowner 'desired-user'and to find out what the accounts are set at currently:USE database-namegosp_helpdb 'database-name'gosp_helpusergoand to fix orphaned user:USE database-namegosp_change_users_login 'update_one', 'username' 'password' |
|
|
sphadke
Yak Posting Veteran
55 Posts |
Posted - 2004-10-20 : 17:43:25
|
| This should work for youEXEC sp_defaultdb 'login', 'databaseName'Sachin |
 |
|
|
Fangfoo
Starting Member
3 Posts |
Posted - 2004-10-20 : 17:48:30
|
| sweet. Worked like a charm. Thanks. |
 |
|
|
|
|
|