Solved

Cannot get full control of SQL Server after host server disconnected from domain

Posted on 2013-05-24
3
402 Views
Last Modified: 2013-05-30
I have a SQL 2008 server that is currently on a VM having been recovered from a physical disk.

The SQL server used to be part of a domain, but the DC for that domain no longer exists.

I am logging into the server using a local admin account. Using SQL Server Management Studio, I can connect to the server and display the databases. I can add and delete data from those database tables.

However, if I try to do anything more than simple data manipulation, I'm getting a msg, "The user does not have permission to perform this action." This includes right-clicking on the database name and trying to view Properties. A backup also fails.

In the Security section of the DATABASE, I can see BUILTIN\Administrators as a user; the only Database Role assigned is db_owner.

In the Security section of the server, I see Logins for BUILTIN/Administators and sa. The only server role granted to BUILTIN/Administrators is public. The sa account is granted sysadmin priviliges.

I do not have the sa password, and I get a perms error when I try to set it. My sense is that the db that I care about has sa authentication set on it, rather than Windows perms.

SSMS comes up fine. I tried a manual start from the command prompt, but I just get a dialog box with a red X and "OK".

How do I get full control of this instance?

Thanks.
0
Comment
Question by:ovidbailey
  • 2
3 Comments
 
LVL 57

Assisted Solution

by:Raja Jegan R
Raja Jegan R earned 100 total points
ID: 39193685
With sa credentials or any account having sysadmin privileges you cannot get complete control of the instance. If sa credentials are known to anyone else in your organization, check with them and connect with sa credentials once and grant sysadmin rights to either BUILTIN\Adminstrators login or your login to gain full privileges.

If no one is aware of sa credentials, then you need to use some third party tools(all paid and not free) to reset your sa password and gain full control of your instance.
0
 

Accepted Solution

by:
ovidbailey earned 0 total points
ID: 39196636
Figured this out without needing a third party tool.

1. Logged into the Windows server as a local admin
2. Opened SQL Server Configuration Manager and select SQL Server Services
3. Found the instance that I wanted, right-click, Properties
4. Under Startup Parameters, added  -m; to the beginning of that line. Clicked OK/OK.
5. Restarted SQL Server (which now starts in single-user/ protected mode)
6. Opened SSMS and did two things:
    a. Under Security/ Logins, changed the pwd of the sa account
    b. Under Security/ Logins, selected BUILTIN/Administators properties/ Server Roles and clicked the sysadmin role (can also do this from Security/ Server Roles and add the BUILTIN/Administrators account to the sysadmin role).
7. Returned to SQL Server Configuration Manager and removed the -m; from the beginning of the Startup Parameters for this instance.
8. Restarted SQL.

I now have full control of the server as a local admin, and I also now know the SA password.
0
 

Author Closing Comment

by:ovidbailey
ID: 39207098
From rrjegan17's comment, I searched bing for "reset sql server sa password". First hit was for passwordunlocker.com. Even though they had a tool for changing the sa password, they also had the helpful instruction (Option 3) for the steps that I used:
http://www.passwordunlocker.com/knowledge/how-to-reset-sa-password-or-other-sql-password.html
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question