Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

840 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