Tuesday, March 27, 2012

Cannot register local sql server

I am having a problem registering my local SQL server.
When I try to use Windows authentication an error msg
appears saying "cannot open default db, using master db
instead" but it doesn't register. When I try using SQL
Server authentication (using the sa logon) a msg appears
saying "login failed for sa, not associated with a trusted
sql server connection".
I previously had the server registered ok and then it
suddenly stopped working so I deleted it and now it won't
reregister. I have no problem registering other SQL
Servers through EM on my pc. Any ideas how to fix this and
maybe what caused the problem in the first place?
Thanks
DaveTry changing your default database (which sounds like it has been dropped)
using osql e.g.
osql -E -Sservername -dmaster -Q"exec sp_defaultdb
'domain\username','master'"
replacing servername with the server you are trying to register and
domain\username with your nt login.Once this is done try registering the
server again. BTW you can also use Query Analyzer if that is more
comfortable by starting it from the command line and passing the database
e.g.
isqlw -E -dmaster -Sservername
and then run the command
exec sp_defaultdb 'domain\username','master'
again, you should now be able to register the server
The reason the sa login doesn't work is because the server you are
connecting to is set to Windows Authentication only.
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:09d301c3b438$d482b550$a001280a@.phx.gbl...
I am having a problem registering my local SQL server.
When I try to use Windows authentication an error msg
appears saying "cannot open default db, using master db
instead" but it doesn't register. When I try using SQL
Server authentication (using the sa logon) a msg appears
saying "login failed for sa, not associated with a trusted
sql server connection".
I previously had the server registered ok and then it
suddenly stopped working so I deleted it and now it won't
reregister. I have no problem registering other SQL
Servers through EM on my pc. Any ideas how to fix this and
maybe what caused the problem in the first place?
Thanks
Dave|||just change the loginmode to 2 in the registry
--
Shaju Thomas
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:09d301c3b438$d482b550$a001280a@.phx.gbl...
> I am having a problem registering my local SQL server.
> When I try to use Windows authentication an error msg
> appears saying "cannot open default db, using master db
> instead" but it doesn't register. When I try using SQL
> Server authentication (using the sa logon) a msg appears
> saying "login failed for sa, not associated with a trusted
> sql server connection".
> I previously had the server registered ok and then it
> suddenly stopped working so I deleted it and now it won't
> reregister. I have no problem registering other SQL
> Servers through EM on my pc. Any ideas how to fix this and
> maybe what caused the problem in the first place?
> Thanks
> Dave

No comments:

Post a Comment