Tuesday, March 27, 2012

cannot register local SQL server

I had SQL Server running locally on my pc and now I
suddenly can't connect. I deleted the registration and
tried re-registering it in EM. When I use Windows
authentication I get a msg saying "cannot open default
database, using master database instead"..but it doesn't
register.
When I use SQL authentication using the sa login, I get a
msg saying "login failed for sa, not associated with a
trusted SQL Server connection". (The SQL Server service
is still running OK on my pc).
Any ideas as to how to fix it, and why it went wrong in
the first place?
Thanks
DaveLooks like you:
1. Run in Windows authentication mode, no sa is permitted
2. you deleted the database (or sent it offline) you specified as defautl
database for the
Windows user you try to connect.
TO sign on as sa change the reg key use this manual:
---
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q285097
---
INF: How to Change the Default Login Authentication Mode to SQL While
Installing SQL Server 2000 Desktop Engine by Using Windows Installer
---
<snip>
Another way to change the security mode after installation is to stop
SQL Server and set the appropriate registry key for your installation:
Default instance:
HKLM\Software\Microsoft\MSSqlserver\MSSqlServer\LoginMode
Named instance:
HKLM\Software\Microsoft\Microsoft SQL Server\Instance
Name\MSSQLServer\LoginMode
to 2 for mixed-mode or 1 for integrated. (Integrated is the default
setup for the SQL Server 2000 Data Engine.)
</snip>
HTH, Jens Süßmeyer.
"dave" <anonymous@.discussions.microsoft.com> schrieb im Newsbeitrag
news:06d901c3b41f$68325220$a001280a@.phx.gbl...
> I had SQL Server running locally on my pc and now I
> suddenly can't connect. I deleted the registration and
> tried re-registering it in EM. When I use Windows
> authentication I get a msg saying "cannot open default
> database, using master database instead"..but it doesn't
> register.
> When I use SQL authentication using the sa login, I get a
> msg saying "login failed for sa, not associated with a
> trusted SQL Server connection". (The SQL Server service
> is still running OK on my pc).
> Any ideas as to how to fix it, and why it went wrong in
> the first place?
> Thanks
> Dave|||dave
>When I use Windows
> authentication I get a msg saying "cannot open default
> database, using master database instead"..but it doesn't
> register.
Do you have a login like (DOMAIN\Dave) ?
> When I use SQL authentication using the sa login, I get a
> msg saying "login failed for sa, not associated with a
> trusted SQL Server connection".
You can change an authentication settings of the server
Right click on the server ,then Properties ,then under Security Tab change
Authentication to SQL and Windows.
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:06d901c3b41f$68325220$a001280a@.phx.gbl...
> I had SQL Server running locally on my pc and now I
> suddenly can't connect. I deleted the registration and
> tried re-registering it in EM. When I use Windows
> authentication I get a msg saying "cannot open default
> database, using master database instead"..but it doesn't
> register.
> When I use SQL authentication using the sa login, I get a
> msg saying "login failed for sa, not associated with a
> trusted SQL Server connection". (The SQL Server service
> is still running OK on my pc).
> Any ideas as to how to fix it, and why it went wrong in
> the first place?
> Thanks
> Dave|||> You can change an authentication settings of the server
> Right click on the server ,then Properties ,then under Security Tab change
> Authentication to SQL and Windows.
But if you can´t register you are really f.... :)
Jens Süßmeyer.|||An alternative to change login mode to mixed is to login using ISQL.EXE (it will let you in even if
your default database doesn't exist) and use sp_defaultdb to change the default database to an
existing database.
I do not recommend changing default database for sysadmins (for the very reason we see here).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:06d901c3b41f$68325220$a001280a@.phx.gbl...
> I had SQL Server running locally on my pc and now I
> suddenly can't connect. I deleted the registration and
> tried re-registering it in EM. When I use Windows
> authentication I get a msg saying "cannot open default
> database, using master database instead"..but it doesn't
> register.
> When I use SQL authentication using the sa login, I get a
> msg saying "login failed for sa, not associated with a
> trusted SQL Server connection". (The SQL Server service
> is still running OK on my pc).
> Any ideas as to how to fix it, and why it went wrong in
> the first place?
> Thanks
> Dave|||Thanks Jens
Changed the registry setting to 2 and it worked using SQL authentication.
>--Original Message--
>Looks like you:
>1. Run in Windows authentication mode, no sa is permitted
>2. you deleted the database (or sent it offline) you specified as defautl
>database for the
>Windows user you try to connect.
>TO sign on as sa change the reg key use this manual:
>----
--
>http://support.microsoft.com/default.aspx?scid=3Dkb;EN-
US;q285097
>----
--
>INF: How to Change the Default Login Authentication Mode to SQL While
>Installing SQL Server 2000 Desktop Engine by Using Windows Installer
>----
--
><snip>
>Another way to change the security mode after installation is to stop
>SQL Server and set the appropriate registry key for your installation:
>Default instance:
>HKLM\Software\Microsoft\MSSqlserver\MSSqlServer\LoginMode
>Named instance:
>HKLM\Software\Microsoft\Microsoft SQL Server\Instance
>Name\MSSQLServer\LoginMode
>to 2 for mixed-mode or 1 for integrated. (Integrated is the default
>setup for the SQL Server 2000 Data Engine.)
></snip>
>HTH, Jens S=FC=DFmeyer.
>
>
>"dave" <anonymous@.discussions.microsoft.com> schrieb im Newsbeitrag
>news:06d901c3b41f$68325220$a001280a@.phx.gbl...
>> I had SQL Server running locally on my pc and now I
>> suddenly can't connect. I deleted the registration and
>> tried re-registering it in EM. When I use Windows
>> authentication I get a msg saying "cannot open default
>> database, using master database instead"..but it doesn't
>> register.
>> When I use SQL authentication using the sa login, I get a
>> msg saying "login failed for sa, not associated with a
>> trusted SQL Server connection". (The SQL Server service
>> is still running OK on my pc).
>> Any ideas as to how to fix it, and why it went wrong in
>> the first place?
>> Thanks
>> Dave
>
>.
>|||just change the loginmode parameter in the register to sa..
It should work
--
Shaju Thomas
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:06d901c3b41f$68325220$a001280a@.phx.gbl...
> I had SQL Server running locally on my pc and now I
> suddenly can't connect. I deleted the registration and
> tried re-registering it in EM. When I use Windows
> authentication I get a msg saying "cannot open default
> database, using master database instead"..but it doesn't
> register.
> When I use SQL authentication using the sa login, I get a
> msg saying "login failed for sa, not associated with a
> trusted SQL Server connection". (The SQL Server service
> is still running OK on my pc).
> Any ideas as to how to fix it, and why it went wrong in
> the first place?
> Thanks
> Dave

No comments:

Post a Comment