SQL Server 단일 사용자 모드로 시작 시, 클라이언트 응용 프로그램 제한하기
1. sqlcmd로 제한하기
net start mssqlserver /m"SQLCMD" (주의 : SQLCMD 대문자만 입력)
>>
sqlcmd -S. -E
or
sqlcmd -S서버명\인스턴스명 -E
or
sqlcmd -S클러스터SQL가상이름\인스턴스명 -E (클러스터환경시)
2. SSMS로 제한하기
net start msqlserver /m"Microsoft SQL Server Management Studio - 쿼리"
or
net start msqlserver /m"Microsoft SQL Server Management Studio - Query"
>>
SSMS를 실행하여 작업한다.
[참고문서]
Using the SQL Server Service Startup Options
https://technet.microsoft.com/en-us/library/ms190737(v=sql.105).aspx
-m"Client Application Name" | When you use the -m option with SQLCMD or SQL Server Management Studio, you can limit the connections to a specified client application. For example, -m"SQLCMD" limits connections to a single connection and that connection must identify itself as the SQLCMD client program. Use this option when you are starting SQL Server in single-user mode and an unknown client application is taking the only available connection. To connect through the Query Editor in Management Studio, use -m"Microsoft SQL Server Management Studio - Query". Client Application Name is case sensitive. Important Do not use this option as a security feature. The client application provides the client application name, and can provide a false name as part of the connection string. |
[관련포스트]
[MSSQL] 클러스터 환경에서 SQL Server 단일모드 시작하기