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

kitesky發表於2013-07-23
%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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章