Login failed for user 'sa'. Reason: Server is in single user mode.

SQL Server 2005 SP2 2005.090.3054.00

I'm trying to move master/model/msdb to a new spot. I restart SQL
Server in single user mode with the "-c;-m;-T3608" startup params.

When I try to connect to do the detach, I get:
Login failed for user 'sa'. Reason: Server is in single user mode. Only
one administrator can connect at this time. (Microsoft SQL Server,
Error: 18461)

But no one else is trying to connect....????

I have stopped all other services other than the main MSSQLSERVER server
instance.. same result..

Any ideas appreciated..

aj
AJ [ Mo, 14 April 2008 16:17 ] [ ID #1942028 ]

Re: Login failed for user 'sa'. Reason: Server is in single usermode.

I found a workaround. I simply used SQLCMD rather than Mgmt Studio. I
guess Mgmt Studio must be trying to make a 2nd connection somehow, but
I don't know why. I scripted this out on my test server beforehand, and
Mgmt Studio connected just fine.... <scratching head>...

aj

aj wrote:
> SQL Server 2005 SP2 2005.090.3054.00
>
> I'm trying to move master/model/msdb to a new spot. I restart SQL
> Server in single user mode with the "-c;-m;-T3608" startup params.
>
> When I try to connect to do the detach, I get:
> Login failed for user 'sa'. Reason: Server is in single user mode. Only
> one administrator can connect at this time. (Microsoft SQL Server,
> Error: 18461)
>
> But no one else is trying to connect....????
>
> I have stopped all other services other than the main MSSQLSERVER server
> instance.. same result..
>
> Any ideas appreciated..
>
> aj
AJ [ Mo, 14 April 2008 23:51 ] [ ID #1942033 ]

Re: Login failed for user 'sa'. Reason: Server is in single user mode.

aj (ronald [at] mcdonalds.com) writes:
> I found a workaround. I simply used SQLCMD rather than Mgmt Studio. I
> guess Mgmt Studio must be trying to make a 2nd connection somehow, but
> I don't know why. I scripted this out on my test server beforehand, and
> Mgmt Studio connected just fine.... <scratching head>...

If you have set up Mgmt Studio to open both a query window and an
Object Explorer when you startup, there will be two connections.

Not talking how funny this will be in SQL 2008 with intellisense,
which opens a second connection behind your back.


--
Erland Sommarskog, SQL Server MVP, esquel [at] sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx
Erland Sommarskog [ Mi, 16 April 2008 08:17 ] [ ID #1943686 ]
Datenbanken » comp.databases.ms-sqlserver » Login failed for user 'sa'. Reason: Server is in single user mode.

Vorheriges Thema: select cases where a datetime is not 3 or more hours older than asimilar case
Nächstes Thema: Re: UTF-8 Coding of MSSQL 2005 DB