Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««678910»»

How to Connect to a SQL 2005 Server When You Are Completely Locked Out Expand / Collapse
Author
Message
Posted Friday, March 11, 2011 12:36 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: 2 days ago @ 12:28 PM
Points: 95, Visits: 748
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.
Post #1077136
Posted Friday, March 11, 2011 1:11 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, September 5, 2014 2:00 PM
Points: 2,160, Visits: 2,191
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.
Post #1077146
Posted Friday, March 11, 2011 1:13 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 9:22 AM
Points: 315, Visits: 1,114
Good point. I think this will correct the problem you are having.

Rudy



Post #1077147
Posted Friday, March 11, 2011 3:48 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: 2 days ago @ 12:28 PM
Points: 95, Visits: 748
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
Post #1077211
Posted Friday, March 11, 2011 4:20 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, September 5, 2014 2:00 PM
Points: 2,160, Visits: 2,191
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.
Post #1077222
Posted Friday, March 11, 2011 5:59 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 12:15 AM
Points: 434, Visits: 878
Useful article - scary but useful! I didn't realise this was possible.

Also works on SQL 2008 R2 by the way...
Post #1077243
Posted Saturday, March 12, 2011 1:20 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 5:59 PM
Points: 31,082, Visits: 15,529
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
Post #1077358
Posted Monday, March 14, 2011 7:12 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 9:22 AM
Points: 315, Visits: 1,114
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



Post #1077679
Posted Monday, March 14, 2011 7:46 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 1:08 AM
Points: 102, Visits: 416
If your windows accout dont have permission how will use sqlcmd and create login ?????/
Post #1077701
Posted Monday, March 14, 2011 8:27 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: 2 days ago @ 12:28 PM
Points: 95, Visits: 748
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.
Post #1077742
« Prev Topic | Next Topic »

Add to briefcase «««678910»»

Permissions Expand / Collapse