Sql server 2008 R2 Forget Password for Sa

来源:互联网 发布:文章千古事得失寸心知 编辑:程序博客网 时间:2024/06/05 16:26
  1. Open the command prompt (Right-Click on and select "Run As Administrator")
  2. From the command prompt type net stop MSSQLSERVER
  3. Next type net start MSSQLSERVER /m
  4. Open SQL Server Management Studio. Do not login, cancel the login dialog.
  5. From the file Menu select New->Database engine query, and login (Make sure you use the host name and not localhost).
  6. Execute the query ALTER LOGIN sa WITH PASSWORD = ''; to reset the password (if the sa is not enabled then type ALTER LOGIN sa ENABLE to do so)
  7. Login with the sa user and add the Administrator user.
原创粉丝点击