all groups > sql server connect > november 2003 >
You're in the

sql server connect

group:

default database issue


default database issue KC
11/28/2003 12:41:07 PM
sql server connect: Hi Gurus,
I detached a database from my sql server 2000 which happended to be the
default database. Now, I can't log onto the server with my NT login any
more. And, I don't know/remember the "sa" password. Is there any other way
to log on in this case?

thanks,
KC

Re: default database issue John Bell
11/28/2003 8:52:25 PM
Hi
If you have mixed mode authentication and are a local administrator on the
SQL server you should be able to change the sa password.


John

[quoted text, click to view]

Re: default database issue Sue Hoegemeier
12/1/2003 7:42:50 AM
From the command line, you can log in using osql and specify
the database when logging in using the -d argument, e.g.
osql -S YourServer -d master -E
You can then change the default database using sp_defaultdb.
You can also accomplish both by executing something like:
osql -S YourServer -d master -E -Q"exec sp_defaultdb
'DOMAIN\YourLogin','master'"

-Sue

On Fri, 28 Nov 2003 12:41:07 -0800, "KC"
[quoted text, click to view]
AddThis Social Bookmark Button