Solved

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

Posted on 2013-05-24
3
419 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

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.
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…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

689 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