Date post: | 05-Feb-2016 |
Category: |
Documents |
Upload: | satheeshbabun |
View: | 17 times |
Download: | 1 times |
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 1/14
Gert Van Gorpa blog about virtualization
May 26, 2011 100 Subscribe
Search
Recent Posts
VMware Support Assistant browser
incompatibility
Convert RDM to VMDK
Allow Virtual machines with duplicate MAC
address on vSphere 5.5
Where to find VMware version information
How long can an ESXi host run?
Recent Tweets
There are no recent tweets.
Categories
Select Category
Tags
Acronis Appliance Backup Certif ication Cloud
Datastore diskpart ESXi Expand IncreaseInfrastructure lab labcloud Launch
Management Mobile device PluginPowerCLI RDM Reset Passw ord resize Support
Assistant Update Manager Upgrade Uptime VCA
vCenter vCops VDR Version VirtualMachine VMDK VMware vmw orld
vSphere vSphere5 VSS
Login
Username
Password
Remember Me
Login →
About Contact
Home VMware About Contact
How to recover SA password on Microsoft SQLServer 2008 R2When you are using MS SQL Server in mixed mode, it is very important that you know your SA password.
There can be different reasons you lost the password
Person who installed the SQL Server knows the password but has left the building.
You did not write down the password in your password file
Password file is lost
…
Steps to recover the SA password
Start SQL Server Configuration Manager
Stop the SQL services
Edit the properties of the SQL Service
Change the startup parameters of the SQL service by adding a –m; in front of the existing parameters
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 2/14
Start the SQL services. These are now running in Single User Mode.
Start CMD on tthe SQL server
Start the SQLCMD command. Now you will see following screen
Now we create a new user. Enter following commands
CREATE LOGIN recovery WITH PASSWORD = ‘TopSecret 1′ (Remember SQL server has
default strong password policy
Go
Now this user is created
Now we grant the user a SYSADMIN roles using the same SQLCMD window.
sp_addsrvrolemember ‘recovery’, ‘sysadmin’
go
Stop the SQL service again
Change the SQL service properties back to the default settings
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 3/14
100 Comments Post a comment
bahareSep 19 2011
reply
Craig MartinFeb 10 2012
reply
Stephen MillerMar 1 2012
reply
SanchoMar 4 2012
reply
VictorMar 10 2012
reply
FredrikMar 15 2012
reply
very Well It works!thank you for sharing your information in such a good way!!!
This was EXACTLY what I needed. Thanks much!
Thank you thank you thank you
I also find other 3 methods to reset forgotten SA password, learn more details at:
http://www.toppassword.com/knowledge/changesqlserverpassword.html
Nice job !!! Thank you !!! *****
Super! You made my day!
great how to, Thanks a lot
Read more from General, Security, SQL
Start the SQL service again and use the new created login (recovery in my example)
Go via the security panel to the properties and change the password of the SA account.
Now write down the new SA password.
Share and Enjoy:
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 4/14
Adnan HassanMar 28 2012
reply
GauravMar 29 2012
reply
HarishMar 30 2012
reply
JRHApr 5 2012
reply
Ismat AyashApr 11 2012
reply
rajuApr 13 2012
reply
TApr 14 2012
reply
Diego R.Apr 25 2012
reply
Anji varikutiApr 21 2012
Thanks a lot .. it worked for me .. saved my lot of time for reinstallation
Very very useful,, this resolves my issue,,,
I was very much happy,,,,,,,
Thanks a lot for the guys who have found this…
This works (as you knew it would) Thank you.
Thank you the above article is very helpfull
This article saved a lot of time for me. Thank you
Thanks for the step by step details, this helped a lot with the default instance. Would
you know how to make it do it for a named instance? I have searched and searched
by no one seems to be plagued by a named instance. So maybe I’m missing
something really obvious?
Hey,
I was having the same problem but finally found a solution, now
I just can’t login, i’ve been able to create the user but
somehow I keep getting a Login failed for user ‘recovery’ (Even
when copying user and password straight from the console
statement)
sqlcmdS .\
or
sqlcmd S \
e.g.
sqlcmdS HOMEPC\SQLSERVER2
More about it at
http://msdn.microsoft.com/enus/library/ms188247.aspx
It’s not Working properly……It’s getting Occur
Sqlcmd: Error:Sqlserver Native Client 10.0 login Timeout Expaired…
How to solve it…
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 5/14
reply
gertvangorpApr 24 2012
reply
DezNov 14 2012
reply
KazApr 23 2012
reply
DennisMay 15 2012
reply
SanjayMay 26 2012
reply
PaulJun 11 2012
reply
Heby JosephJun 14 2012
reply
tristanJun 22 2012
reply
ValiJun 27 2012
reply
Hi,
Can you send me the steps you followed and where it went
wrong??
Thanks
Gert
Had to use:
SQLCMD E S ‘server_name\db_name’
to solve “Sqlcmd: Error:Sqlserver Native Client 10.0 login
Timeout Expired” error. Worked terrific after that, thank you!
Thank you – just what I was looking for and very easy to follow.
Wanted to say BIG THANK YOU!!! for super easy instruction that work well. Unlike
other site they lure people using techniques that not going to work and giving us
option to purchased software ect.
thanks a lot for the info. it save lots my time as I was planning to do reinstall itself
These instructions are the best. Thank you.
yesss .i can solve my issue. Thanks very very much
Bless your cotton socks!
THANK YOU!!!!
Merci, merci, merci, merci, merci, merci !
Beautiful work,definitely we can try for this tool to recovery the password.Many thanks
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 6/14
Jonathan RobortJul 30 2012
reply
MonsterCableAug 8 2012
reply
JeepAug 28 2012
reply
modtanoySep 5 2012
reply
SalehKhadempourSep 11 2012
reply
Ashok TewatiaSep 19 2012
reply
CornelSep 28 2012
reply
PedroSep 29 2012
reply
FabienOct 4 2012
reply
XiaoYuOct 5 2012
reply
for well information and share.
Thank you so much! After searching and searching online, this was exactly what I
was looking for. I guess most people don’t understand what it means to lose the SQL
SA password.
Thanks again!
Great – Thanks!
Thank you very much.
Nice job !!! Thank you !!!
This works for me . Thanks
Thank you!
Had to use:
sqlcmd S
othewise it would not connect to any instance. Also if you cut and paste from this web
page, retype the single quotes to avoid syntax errors.
You are great!!!! Very Well It works!thank you for sharing your information in such a
good way!!!
Thank you so much !!!!
All the best to you in your life man !!
This is great, well written step by step instruction. THANK YOU. One more unrelated
question, how did you make the screen shot looks like a broken paper edge? Thank
you again.
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 7/14
RobertoOct 12 2012
reply
Lothar GeisingerOct 22 2012
reply
SamOct 26 2012
reply
HackedOct 29 2012
reply
DerekNov 2 2012
reply
TeezeeAug 27 2013
reply
AldoArmisiNov 6 2012
reply
MattNov 7 2012
reply
Thanks, you saved my day!
Respect! Thanks a lot!
Perfect! You made my day! Thanks!
Worked perfectly and saved the day! Thank you!
Thanks for the awesome solution!
Just a few tips:
Since you’re in singleuser mode, you may receive the following error:
“Login failed for user ‘[user]’. Reason: Server is in single user mode. Only one
administrator can connect at this time. (Microsoft SQL Server, Error: 18461).
To resolve this, make sure you stop SSAS and SSRS and SQL Server Agent for the
instance that you’re working with. You can then get in.
Also, if you have direct access to the server, you’ll be able to login to SQL
Management Studio (if installed) and then do your management through the GUI.
For my case, I needed to get my network account to authenticate on my local PC,
which was being denied because someone else installed SQL on my machine. I was
part of the Administrators group, so it let me take it over.
Happy coding!
Thanks a million times Derek. This one worked so well for me
as I had the same problem.
Cheers
Problem solved, thank You very much!
Worked amazingly. Cheers!
You need to run command prompt with administrative rights.
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 8/14
Rafik BerziNov 14 2012
reply
JimmySep 10 2013
reply
SunanNov 15 2012
reply
TahirNov 26 2012
reply
JerryNov 28 2012
reply
tskeggsDec 14 2012
reply
RajeshDec 15 2012
reply
SQLn00bDec 17 2012
reply
AliJan 9 2013
reply
Suday KumarGhoshJan 20 2013
@Rafik Berzi
Thank you so much, I was getting authentication failures even
though I was logged in with admin credentials. This got me in.
Thanks a lot brow. It’s worked..Great Tutorial
Nice post mate, helped me out just now (inherited a developer machine with no idea
what the local password was!)
It works.
a few advise
1. this password recovery is for single login mode, not mixed mode(as mentioned at
very begining). if you SQL setup in mixed mode, you can reset your sa password
using OS admin account.
2.Derek’s tip very useful. I had same situation.
Brillant, that was a life saver !
It’s working fine.Thanks..
After adding m; the “SQLCMD” command worked for me when I started only the “SQL
Server (MSSQLSERVER)” service.
Hi,
It was so complete and useful for me.
Thanks a lot
Superb!!!!!!!! Thanks from my heart…………..
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 9/14
reply
SaskiaJan 21 2013
reply
KumaresanFeb 11 2013
reply
ShaneFeb 27 2013
reply
gertvangorpAug 16 2013
reply
JodiMar 13 2013
reply
gertvangorpAug 16 2013
reply
Amin RezaMar 17 2013
reply
JortxMar 21 2013
reply
kannan.gMar 26 2013
reply
StevekApr 3 2013
This solution also works for SQL Server 2012. Thanks a lot!
Thank you man. Its great.
Looks like this does not work for 2012 bummer – or I am missing something?
not sure, not yet tested on SQL 2012
Gert
I’m really enjoying the design and layout of your site. It’s a very easy on the eyes
which makes it much more enjoyable for me to come
here and visit more often. Did you hire out a developer to create your theme?
Fantastic work!
I am using Traction PRO as theme
Gert
tnx a lot
Awesome. Cheers!
thanks a lot!!!!!!!!!!
Thank you, very effective with easy to follw instructions!
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 10/14
reply
AndyApr 24 2013
reply
Rakesh KumarSinghMay 22 2013
reply
peleMay 29 2013
reply
WilliamClementDec 17 2013
reply
Ali AzsariJun 19 2013
reply
pareshJun 27 2013
reply
KakeJul 8 2013
reply
SheilaJul 17 2013
reply
fondspararnaJul 26 2013
reply
ChristianeAug 1 2013
Nearly 2 years later and it’s still helping people! Thanks.
Thank you very Much
In the line sp_addsrvrolemember ‘recovery’, ‘sysadmin’
I had to write sp_addsrvrolemember “recovery”, “sysadmin”
even so it works very well
sp_addsrvrolemember ‘recovery’, ‘sysadmin’ also threw an
error, but the following worked for me:
sp_addsrvrolemember recovery, sysadmin
Thanks again to the writer!
Thanks!
Great, it’s really helpful thanks
Saved my ass…
Wow! This could not have been written any better! Thanks so much!
Thanks a million, this fixed things right up.
You’re my hero !
Thank you so much !
And it is very very clear. Very good job.
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 11/14
reply
best naturalcures fordepressionAug 7 2013
reply
PerryAug 8 2013
reply
Florin ChirilasAug 14 2013
reply
GrahamAug 20 2013
reply
JuanAug 20 2013
reply
TeezeeAug 27 2013
reply
RemezAug 29 2013
reply
masiAug 31 2013
reply
MBSep 19 2013
reply
MirekSep 26 2013
reply
Hi excellent website! Does running a blog similar to this take a great
deal of work? I’ve virtually no knowledge of programming but I had been hoping to start
my own blog in the near future. Anyway, if you have any ideas or techniques for new
blog owners please share. I know this is off topic however I just wanted to ask. Many
thanks!
It Workzz !! Cheers
Worked great Thank you !
This saved me a lot of trouble!!!
Thanks for sharing.
Excellent, thank you
thanx a lot.
it’s work , Thank so much
Thanks,
You’re my hero !
With SQL Server 2008 R2 Express I had to use:
sqlcmd S [servername]\[instance]
This was even for the default instance sqlexpress.
Good job
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 12/14
kemal kayalıSep 28 2013
reply
Ronaldo BiccaOct 4 2013
reply
RajaonaryOct 9 2013
reply
shahpOct 15 2013
reply
glenn wongOct 17 2013
reply
glenn wongOct 17 2013
reply
DeviOct 23 2013
reply
fipsinatorOct 30 2013
reply
RossOct 31 2013
reply
YOU ARE THE MAN!!! saved me
Great Job. Thank you!
Thanks a lot, you save me
Thanks a lot!!!!!
This didn’t work for me.
It tells me “Alter failed for Login ‘sa’
An exception occurred while executing a TransactSQL statement or batch.
Cannot set a credential for principal ‘sa’ (Microsoft SQL Server, Error:15535)
found a solution, had to do the following:
select the “Map To Credential” check box on the General tab of
the Login Properties – sa dialog box.
that got rid of my error
Thanks a lot, very clearly explained
thank you!
still helps in 2013
Worked but only after doing something else, not mentioned in the article above…
Starting SQLCMD without any other parameters only starts it in the default instance of
SQL, if you are trying to create an SA account in a named instance (e.g.
sqlServer\sql2008), you need to connect SQLCMD to that named instance. Mine for
example, is \SQL2008 so to connect SQLCMD to that, I had to open the cmd prompt
and write:
SQLCMD S .\SQL2008
Thanks! Very, very helpful!
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 13/14
PeterNov 1 2013
reply
KhalidNov 21 2013
reply
AndrewDec 11 2013
reply
RudyDec 19 2013
reply
EnriqueJan 17 2014
reply
Daljit BhanaJun 17 2014
reply
gertvangorpSep 5 2014
reply
sidAug 1 2014
reply
Name
The instructions are very clear and straight forward. Thanks!
Excellent article. Really got me out of a bind. thank you.
thanks, it works like a charm
this process is very complicated i have another solution to recover the SQL Server
Password which is highly reliable and robust the SQL Password recovery software.
You can use its demo version which ensured you how it perform riskfree password
recovery process.
http://www.sqlmdfviewer.org/sqlpasswordrecoveryfreeware.html
I do not want to change the SQL SA password as many applications explicitly depend
on this password such as Sun finance system , Ifor etc.
Is there a tool that can show the the password !
Dal
There no tool that can do this
Superb! Very simple and straightforward to follow.
Trackbacks & Pingbacks
1. Lost SA Password for SQL 2008 R2 | Squishnet
Leave a comment
required
required
7/17/2015 How to recover SA password on Microsoft SQL Server 2008 R2 | Gert Van Gorp
http://vconsult.be/2011/05/26/recoversapasswordmicrosoftsqlserver2008r2/ 14/14
Website
Comment
Note: HTML is allowed. Your email address will never be published.
Subscribe to comments
Submit Comment
About
Did you know you can write your own about section justlike this one? It's really easy. Navigate to Appearance →Widgets and create a new Text Widget. Now move it intothe "Footer Left" sidebar.
Pages
About
Contact
Search
Search
Traction Theme by The Theme FoundryCopyright © 2015 Gert Van Gorp. All rights reserved.