SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to Connect to a SQL 2005 Server When You Are Completely Locked Out


How to Connect to a SQL 2005 Server When You Are Completely Locked Out

Author
Message
MiguelSQL
MiguelSQL
Say Hey Kid
Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)

Group: General Forum Members
Points: 708 Visits: 1166
Yes, I am starting SQL using the -m parameter, for single use.
I guess I'll give it another try tonight... I'll keep you guys posted.
UMG Developer
UMG Developer
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4156 Visits: 2204
MiguelSQL (3/11/2011)
My windows ID is part of the Local Administrators Group
When I start the server in single mode, and I try to log in, I get the error:
Login Failed for user ". The user is not associated with a trusted SQL Server connection.


That sounds like your account might be in a different domain and that the trust between the two domains isn't working 100%.

I would try creating a local account on the server, add it to the local administrators group, then log on to the server using the local account and start SQL Server in single user mode. That way you take all the domain portions out of the picture. Once you have regained SA access you can just delete the local account.
Rudy Panigas
Rudy Panigas
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2518 Visits: 1322
Good point. I think this will correct the problem you are having.

Rudy



MiguelSQL
MiguelSQL
Say Hey Kid
Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)

Group: General Forum Members
Points: 708 Visits: 1166
SOLVE IT.

It is a problem with the domain trust.
So I created a local account, login using the LOCAL account, and was able to start SQL on single mode and connect using CMD.

Thanks all for your support.


PS: no idea how to solve that problem with the trust.
Now I added a Windows Group for all DBAs, but the DBAs can't connect to the server (get the trusted domain error) their account is not listed on the sysadmin group. Even though they are part of the Windows Group.
But that's another story for another post.


Miguel SQL
UMG Developer
UMG Developer
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4156 Visits: 2204
MiguelSQL (3/11/2011)
SOLVE IT.

It is a problem with the domain trust.
So I created a local account, login using the LOCAL account, and was able to start SQL on single mode and connect using CMD.

Thanks all for your support.


Glad we could help, and thanks for letting us know. (At least you should have the SA password now so you can get on to the server and look at/adjust things.)

PS: no idea how to solve that problem with the trust.


Your Windows Server/AD team will probably have to work on that, it is likely related to delegation and/or SPNs. It might end up being easier to join the server to the actual Domain you want, unless there is a reason for it to be different.
JKG
JKG
SSChasing Mays
SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)

Group: General Forum Members
Points: 647 Visits: 933
Useful article - scary but useful! I didn't realise this was possible.

Also works on SQL 2008 R2 by the way...
Steve Jones
Steve Jones
SSC Guru
SSC Guru (151K reputation)SSC Guru (151K reputation)SSC Guru (151K reputation)SSC Guru (151K reputation)SSC Guru (151K reputation)SSC Guru (151K reputation)SSC Guru (151K reputation)SSC Guru (151K reputation)

Group: Administrators
Points: 151380 Visits: 19455
It is scary, but requiring local access mitigates it a little. It's a back door that's designed this way, specifically for the people that forget SA or have a rouge administrator. I wasn't thrilled with it at first, but it probably makes some sense to have this.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Rudy Panigas
Rudy Panigas
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2518 Visits: 1322
Yes, this is scary and I can' think of any other way to provide a safer back door. If you have ever worked on a SQL server who's DBA was let go or fired then you can see why this is a good thing.

Scary can be good.

Rudy



Akkare
Akkare
Mr or Mrs. 500
Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)Mr or Mrs. 500 (572 reputation)

Group: General Forum Members
Points: 572 Visits: 452
If your windows accout dont have permission how will use sqlcmd and create login ?????/
MiguelSQL
MiguelSQL
Say Hey Kid
Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)Say Hey Kid (708 reputation)

Group: General Forum Members
Points: 708 Visits: 1166
Akkare (3/14/2011)
If your windows accout dont have permission how will use sqlcmd and create login ?????/


Akkare,
If you read the article carefully, you will see that by starting the SQL in Single Mode, every member of the Windows Administrators group becomes a sysadmin in SQL automagically.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search