SQL server password

Posted on 2015-01-09
Last Modified: 2015-01-26
So SQL is loaded on a server. Apparently no one knows what the password is to get into the server, imagine that. Does anyone know of anyway to get in?
SQL server authentication...
tried Windows auth and nothing...

Question by:dlewis61
  • 2
  • 2
  • 2
  • +3
LVL 25

Expert Comment

by:Lee Savidge
ID: 40540480
So you can't get into the server or the SQL install?
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 40540483

You can pass a -m or -f and then any local administrator on the box should be able to connect to it with windows authentication.  From there you can reset the SA password.

Step by step:
LVL 25

Expert Comment

by:Lee Savidge
ID: 40540496
Once you're on the box and loaded SQL Management Studio you should be able to issue this:

exec sp_password null, null, 'sa'

Pretty sure that's the syntax.
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 40540524
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

LVL 46

Expert Comment

by:Vitor Montalvão
ID: 40540613
All the solutions (links) provided only works if there's someone with sysadmin role otherwise SQL Server would have an huge security issue.
So dlewis61 if you or someone has sysadmin role to the SQL Server, he or she need to connect to the instance and give access to the others or at least activate sa login and reset his password.
Alternative is that the SQL Server service account is a domain account so you can connect to SQL Server with that account and provide the necessary access to you or to your colleagues.
LVL 40

Accepted Solution

Kyle Abrahams earned 500 total points
ID: 40540749
Vitor - you are incorrect.

An administrator on the box CAN gain administrative control and reset the password of the sa account without ever knowing a password or being apart of the DB security roles.  Please see my link.  I too view this as a security hole but the powers at be (eg: Microsoft) allow this in case of a rogue user or a legit mistake.

Author Comment

ID: 40540751
It was the case that I could get in with windows authentication, but now I can't. I do not have sysadmin role. So I have to wait for those with god rights to get me going again.
LVL 42

Expert Comment

ID: 40540945
what is your sql server version?
if sql 2005 + use the above links
if sql2000- if you are local admin on the box (same with sql 2005)
you maybe can access sql server ..
if not foe sql2000- you may need to reinstall master db (sql server) ...
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 40543874
@Kyle: Yes, you're right. I did the test following the link you posted and worked. You can't perform any query but you can create a new login and give him sysadmin role. What a security hole!

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

932 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

13 Experts available now in Live!

Get 1:1 Help Now