ITPub博客

Troubleshooting: Connecting to SQL Server When System Administrators Are Locked Out

原创 SQL Server 作者:kitesky 时间:2013-07-23 15:34:58 0 删除 编辑
http://msdn.microsoft.com/en-us/library/dd207004%28v=sql.105%29.aspx[@more@]

[run as Admin]

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:Windowssystem32>

C:Windowssystem32>net stop mssqlserver

The SQL Server (MSSQLSERVER) service is stopping.

The SQL Server (MSSQLSERVER) service was stopped successfully.

C:Windowssystem32>net start mssqlserver /m

The SQL Server (MSSQLSERVER) service is starting.

The SQL Server (MSSQLSERVER) service was started successfully.

C:Windowssystem32>sqlcmd

1> EXEC sp_addsrvrolemember 'MSDOMAIN1RT-DBA', 'sysadmin';

2> GO

1> quit

C:Windowssystem32>net stop mssqlserver

The SQL Server (MSSQLSERVER) service is stopping.

The SQL Server (MSSQLSERVER) service was stopped successfully.

C:Windowssystem32>net start mssqlserver

The SQL Server (MSSQLSERVER) service is starting.

The SQL Server (MSSQLSERVER) service was started successfully.

C:Windowssystem32>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/66009/viewspace-1060770/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Database Unit Testing
请登录后发表评论 登录
全部评论

注册时间:2009-04-22

  • 博文量
    273
  • 访问量
    2162635