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
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
  • 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.
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 40540524
LVL 50

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 43

Expert Comment

by:Eugene Z
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 50

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of the biggest threats facing all high-value targets are APT's.  These threats include sophisticated tactics that "often starts with mapping human organization and collecting intelligence on employees, who are nowadays a weaker link than network…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

690 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