if you forgot the SA password or accidently delete the administrator account where you cant access the sql server
follow the below steps to create an administrator account.
This requires to restart the sql server in single user mode till you create the login with sysadmin access
1.open sql server configuration manager (click on All Programs-->Microsoft SQL Server 2008-->SQL Server configuration manager
2.double click on SQL Server --> properties -->advanced.
at the startup Parameters add ;-m at the end.
3.restart the SQL Server
4.stop all the services except SQL Server
5.right click on cmd tool . select [run as administrator]
6. at the cmd prompt type sqlcmd
7. add your own administrator account by copy paste the below
USE [master] |
8.open configuration manager --> advanced -->startup parameters - remove the ;-m parameter which you have added at step 2
9.restart the SQL Server
10. restart all the services which have disabled at step 4
No comments:
Post a Comment