Solved

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

Posted on 2013-05-24
3
394 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now