• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Problems connecting to MS SQL database

Got a problem with MS SQL login and I will need help to rectify it.

My customer's domain controller crashed (SBS 2003) and according to their IT guy there was no way to recover any data of the SBS 2003

So he started clean with a new domain controller.

I do development for them and have a MS SQL database on a Win 2008 R2 server that was part of the old domain.

Now that the new domain controller is in place and the Win 2008 R2 is joined to the domain I can't log in to the MS SQL database.

I know what the old username and password are but I'm not able to log in.

Can someone help me with this? The SQL server version is 2008 R2
0
Gerhardpet
Asked:
Gerhardpet
  • 10
  • 4
  • 2
1 Solution
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
You can start the SQL Server in single user mode (sqlservr -m) from the Binn folder of SQL Server. When started this way, you can add your new account to the SQL Server sysadmin group.

But a caveat, if you have changed domains and this SQL Server is not a part of the new domain, it may cause you problems because the machine membership in the domain will determine whether that account can be recognized.

There are Microsoft articles about starting your SQL Server in single user mode.
0
 
NormanMainaCommented:
You have to realise that the old domain account and the new domain account are different even though they have the same names - they have different security entities.

Two things need to be done:
1.Map sql account to new domain account.
Login to the windows server where sql server is installed and type run>services.msc
In the SQL Server Service,double click to open properties and then go to the Log On tab.
Enter the domain account running sql.

2.Add The SQL LogIN
You have to login to SQL Server Management studio using the sa account or using the local server administrator account(sql sever box)
Then In the security tab,add the new domain account you want to use.
0
 
GerhardpetAuthor Commented:
@dbaduck
When I try it start SQL in single user mode as per your suggestion I get the following
error
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
GerhardpetAuthor Commented:
btw...the SQL server is part of the new domain already. Also I have full domain admin rights on all servers
0
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
What account is the SQL Server service set to startup as?  Check in SQL Configuration Manager.
0
 
GerhardpetAuthor Commented:
Here is the screenshot of the services
account config
0
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
So the first thing I would do is to edit the SQL Server Service and change it to Network Service, and then change it back to SYSTEM.  The SIDs may have become messed up on the change.
0
 
GerhardpetAuthor Commented:
Ok did that but still get the same results with sqlservr -m
0
 
DBAduck - Ben MillerPrincipal ConsultantCommented:
Then you can try to see if it will start in minimal mode.

sqlservr -f
0
 
GerhardpetAuthor Commented:
Ok now I also created a local admin user on the server as per NormanMaina and this is what I get when I try to log in with the local admin
sql error
0
 
GerhardpetAuthor Commented:
Get the same error with sqlservr -f as before
0
 
NormanMainaCommented:
what you need to do is remove the sql server machine from the domain and then rejoin it to the domain -if thats not been done already.
0
 
GerhardpetAuthor Commented:
Yes that has been done already. It is part of the new domain
0
 
GerhardpetAuthor Commented:
I have tried other articles I found on this but so far have not been successful in connecting to the database. My last resort is to call Microsoft support to help with this.

Anyone else got any ideas for me?
0
 
GerhardpetAuthor Commented:
Problem solved by calling microsoft for help

Here are few articles that may he helpful on this issue

Start SQL Server in Single-User Mode:
http://msdn.microsoft.com/en-us/library/ms188236.aspx 

How to: Start an Instance of SQL Server (sqlservr.exe):
http://msdn.microsoft.com/en-us/library/ms180965(v=sql.105).aspx 

sqlcmd Utility:
http://msdn.microsoft.com/en-us/library/ms162773.aspx 

DROP LOGIN (Transact-SQL):
http://msdn.microsoft.com/en-in/library/ms188012.aspx
0
 
GerhardpetAuthor Commented:
Solved
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 10
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now