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 |
|
Ex
Posting Yak Master
166 Posts |
Posted - 2005-01-10 : 22:55:47
|
| Hey all i know this is such a newbit question but having some problems in googling the solutioni want change the default USER in the database (in query analyser)at the moment i get dbo i want say 'IAMAUSER' or something like thishelp would be appricated laughter would be understandable :) hehethanks |
|
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2005-01-10 : 22:58:21
|
I think this is picked up based on the last login. |
 |
|
|
Ex
Posting Yak Master
166 Posts |
Posted - 2005-01-10 : 23:48:09
|
| i figured outsp_grantdbaccess does kinda what i wanti can create a new user like sosp_addlogin @loginame = 'newuser', @passwd = 'newpass'sp_grantdbaccess 'newuser'sp_addrolemember 'db_owner', 'newuser'and i can name it like sosp_addlogin @loginame = 'newuser', @passwd = 'newpass'sp_grantdbaccess 'newuser', 'MEEEEEEEEE'sp_addrolemember 'db_owner', 'newuser'so if i did a SELEC USER now the result would be 'MEEEEEEEEE'but how can i do that for the default sa account change the value given so its not dbo? anyone know a sp? |
 |
|
|
Ex
Posting Yak Master
166 Posts |
Posted - 2005-01-11 : 00:22:15
|
| for a bit more infoif i run the spsp_helploginsthe value i want to change is the USERNAME for the LoginName sa:) if possible |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-01-11 : 01:54:41
|
from experience, sa account "name" is not editable, but you can try to map it to another user, though haven't tried this (nor do i have any use for doing so, coz you can assign sa privileges anyway)try sp_change_users_loginalso, you might hit something in SQL which will change laughter to tears if you change this account aside from password--------------------keeping it simple... |
 |
|
|
|
|
|