Microsoft MVP성태의 닷넷 이야기
오류 유형: 296. SQL Server Express 시작 오류 - error code 3417 [링크 복사], [링크+제목 복사],
조회: 21142
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

SQL Server Express 시작 오류 - error code 3417

SQL Server Express를 서비스 관리자에서 시작했더니 다음과 같은 오류가 발생합니다.

sql_express_start_error3417.png

"
Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417.
"


아울러 이벤트 로그에는 이런 항목들이 남아 있었습니다.

Log Name:      System
Source:        Service Control Manager
Date:          2015-07-02 오전 12:02:00
Event ID:      7005
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      thetest
Description:
The LoadUserProfile call failed with the following error: 
Only part of a ReadProcessMemory or WriteProcessMemory request was completed.

Log Name:      Application
Source:        Microsoft-Windows-User Profiles Service
Date:          2015-07-02 오전 12:02:00
Event ID:      1511
Task Category: None
Level:         Error
Keywords:      
User:          NT SERVICE\MSSQL$SQLEXPRESS
Computer:      thetest
Description:
Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.

Log Name:      Application
Source:        MSSQL$SQLEXPRESS
Date:          2015-07-02 오전 12:02:01
Event ID:      17204
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      thetest
Description:
FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\mastlog.ldf for file number 2.  OS error: 5(Access is denied.).

Log Name:      Application
Source:        Microsoft-Windows-User Profiles General
Date:          2015-07-02 오전 12:02:00
Event ID:      1509
Task Category: None
Level:         Warning
Keywords:      
User:          NT SERVICE\MSSQL$SQLEXPRESS
Computer:      thetest
Description:
Windows cannot copy file \\?\C:\Users\Default\AppData\Local\Microsoft\VSCommon\12.0\SQM\sqmdata-3916-039-00000.sqm to location \\?\C:\Users\MSSQL$SQLEXPRESS\AppData\Local\Microsoft\VSCommon\12.0\SQM\sqmdata-3916-039-00000.sqm. This error may be caused by network problems or insufficient security rights. 

 DETAIL - Access is denied.


Log Name:      Application
Source:        Microsoft-Windows-User Profiles Service
Date:          2015-07-02 오전 12:02:00
Event ID:      1511
Task Category: None
Level:         Error
Keywords:      
User:          NT SERVICE\MSSQL$SQLEXPRESS
Computer:      thetest
Description:
Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off.

이와 함께 로그 파일이 있음을 알려줍니다.

Log Name:      Application
Source:        MSSQL$SQLEXPRESS
Date:          2015-07-02 오전 12:02:01
Event ID:      17111
Task Category: Server
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      thetest
Description:
Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Log\ERRORLOG'.

로그 파일의 내용도 일관성있게 "Access is denied"라고 하는데요.

2015-07-01 23:55:08.69 Server      Microsoft SQL Server 2012 - 11.0.5058.0 (X64) 
    May 14 2014 18:34:29 
    Copyright (c) Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )

2015-07-01 23:55:08.69 Server      (c) Microsoft Corporation.
2015-07-01 23:55:08.69 Server      All rights reserved.
...[생략]...
2015-07-01 23:55:08.85 Server      Software Usage Metrics is disabled.
2015-07-01 23:55:08.85 spid5s      Starting up database 'master'.
2015-07-01 23:55:08.85 spid5s      Error: 17204, Severity: 16, State: 1.
2015-07-01 23:55:08.85 spid5s      FCB::Open failed: Could not open file c:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\master.mdf for file number 1.  OS error: 5(Access is denied.).
...[생략]...

하지만 실제로는 해당 폴더에 권한을 주어도 마찬가지 상황만 연출됩니다. 더욱 황당하게도 이벤트 로그에는 다음과 같은 항목도 보입니다.

Log Name:      Application
Source:        MSSQL$SQLEXPRESS
Date:          2015-07-02 오전 12:16:04
Event ID:      17204
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      thetest
Description:
FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf for file number 1.  OS error: 3(The system cannot find the path specified.).

도대체 저 경로가 어떻게 나올 수 있는 걸까요? 다행히 검색해 보면 이런 글이 나오는데요.

SQL Server express service is not starting [closed]
; http://serverfault.com/questions/447808/sql-server-express-service-is-not-starting

위의 글에 따라 다음과 같이 실행을 하니 서비스는 일단 시작이 되었습니다.

NET START MSSQL$SQLEXPRESS /f /T3608

(또는, NET START MSSQLSERVER /f /T3608)

오호~~~ 이렇게 시작하면 DB를 로딩하지 않고 순수하게 SQL 프로세스만 시작시키나 봅니다. 재미있는 것을 알았군요. ^^

그리곤, 각각의 DB 파일 경로를 "alter database" 명령을 통해 원래의 파일 경로로 새롭게 잡아주었습니다.

C:\Windows\system32>NET START MSSQL$SQLEXPRESS /f /T3608
The SQL Server (SQLEXPRESS) service is starting.
The SQL Server (SQLEXPRESS) service was started successfully.

C:\Windows\system32>SQLCMD -S .\SQLEXPRESS
1> ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBData, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\MSDBData.mdf');
2> ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBLog, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\MSDBLog.ldf');
3> ALTER DATABASE tempdb MODIFY FILE ( NAME = tempdev, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\temp.mdf');
4> ALTER DATABASE tempdb MODIFY FILE ( NAME = templog, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\temp.ldf');
5> ALTER DATABASE model MODIFY FILE ( NAME = modeldev, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\model.mdf');
6> ALTER DATABASE model MODIFY FILE ( NAME = modellog, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\modellog.ldf');
7> go
The file "MSDBData" has been modified in the system catalog. The new path will be used the next time the database is started.
The file "MSDBLog" has been modified in the system catalog. The new path will be used the next time the database is started.
The file "tempdev" has been modified in the system catalog. The new path will be used the next time the database is started.
The file "templog" has been modified in the system catalog. The new path will be used the next time the database is started.
The file "modeldev" has been modified in the system catalog. The new path will be used the next time the database is started.
The file "modellog" has been modified in the system catalog. The new path will be used the next time the database is started.
1>
1> exit

C:\Windows\system32>NET STOP MSSQL$SQLEXPRESS
The SQL Server (SQLEXPRESS) service is stopping.
The SQL Server (SQLEXPRESS) service was stopped successfully.

이렇게 직접 해당 파일들에 대한 경로 설정을 한 이후로는 서비스가 정상적으로 시작되었습니다.




위와 같이 해주었는데도 서비스 관리자에서 SQL Express 서비스 시작을 할 때 다음과 같은 오류가 발생할 수 있습니다.

Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. 

Error 1067: The process terminated unexpectedly.

그런 경우에는 실제로 권한이 없어서 그럴 수 있습니다. 만약 SQL Server Express 서비스의 계정이 "NETWORK SERVICE"로 되어 있다면 다음의 파일들에 대해 "Full Control" 권한을 "NETWORK SERVICE" 계정에 부여해야 합니다. (테스트 해보니, Write 또는 Modify 권한만으로는 부족하고 반드시 "Full Control" 권한이 있어야 합니다.)

C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\MSDBData.mdf
C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\MSDBLog.ldf
C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\temp.mdf
C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\temp.ldf

C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\model.mdf
C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\modellog.ldf




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 8/23/2019]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 46  47  48  49  50  51  52  53  54  [55]  56  57  58  59  60  ...
NoWriterDateCnt.TitleFile(s)
12257정성태7/7/20209383.NET Framework: 925. C# - ETW를 이용한 Monitor Enter/Exit 감시파일 다운로드1
12256정성태7/7/20209804.NET Framework: 924. C# - Reflection으로 변경할 수 없는 readonly 정적 필드 [4]
12255정성태7/6/202010245.NET Framework: 923. C# - ETW(Event Tracing for Windows)를 이용한 Finalizer 실행 감시파일 다운로드1
12254정성태7/2/202010072오류 유형: 626. git - REMOTE HOST IDENTIFICATION HAS CHANGED!
12253정성태7/2/202011162.NET Framework: 922. C# - .NET ThreadPool의 Local/Global Queue파일 다운로드1
12252정성태7/2/202013145.NET Framework: 921. C# - I/O 스레드를 사용한 비동기 소켓 서버/클라이언트파일 다운로드2
12251정성태7/1/202011099.NET Framework: 920. C# - 파일의 비동기 처리 유무에 따른 스레드 상황 [1]파일 다운로드2
12250정성태6/30/202013717.NET Framework: 919. C# - 닷넷에서의 진정한 비동기 호출을 가능케 하는 I/O 스레드 사용법 [1]파일 다운로드1
12249정성태6/29/20209862오류 유형: 625. Microsoft SQL Server 2019 RC1 Setup - 설치 제거 시 Warning 26003 오류 발생
12248정성태6/29/20208257오류 유형: 624. SQL 서버 오류 - service-specific error code 17051
12247정성태6/29/20209821.NET Framework: 918. C# - 불린 형 상수를 반환값으로 포함하는 3항 연산자 사용 시 단축 표현 권장(IDE0075) [2]파일 다운로드1
12246정성태6/29/202010637.NET Framework: 917. C# - USB 관련 ETW(Event Tracing for Windows)를 이용한 키보드 입력을 감지하는 방법
12245정성태6/24/202011119.NET Framework: 916. C# - Task.Yield 사용법 (2) [2]파일 다운로드1
12244정성태6/24/202010957.NET Framework: 915. ETW(Event Tracing for Windows)를 이용한 닷넷 프로그램의 내부 이벤트 활용 [1]파일 다운로드1
12243정성태6/23/20208522VS.NET IDE: 147. Visual C++ 프로젝트 - .NET Core EXE를 "Debugger Type"으로 지원하는 기능 추가
12242정성태6/23/20209281오류 유형: 623. AADSTS90072 - User account '...' from identity provider 'live.com' does not exist in tenant 'Microsoft Services'
12241정성태6/23/202012604.NET Framework: 914. C# - Task.Yield 사용법파일 다운로드1
12240정성태6/23/202013881오류 유형: 622. 소켓 바인딩 시 "System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions" 오류 발생
12239정성태6/21/202010347Linux: 30. (윈도우라면 DLL에 속하는) .so 파일이 텍스트로 구성된 사례 [1]
12238정성태6/21/202010237.NET Framework: 913. C# - SharpDX + DXGI를 이용한 윈도우 화면 캡처 라이브러리
12237정성태6/20/20209998.NET Framework: 912. 리눅스 환경의 .NET Core에서 "test".IndexOf("\0")가 0을 반환
12236정성태6/19/202010385오류 유형: 621. .NET Standard 대상으로 빌드 시 dynamic 예약어에서 컴파일 오류 - error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'
12235정성태6/19/20209995오류 유형: 620. Windows 10 - Inaccessible boot device 블루 스크린
12234정성태6/19/20209727개발 환경 구성: 494. NuGet - nuspec의 패키지 스키마 버전(네임스페이스) 업데이트 방법
12233정성태6/19/20209437오류 유형: 619. SQL 서버 - The transaction log for database '...' is full due to 'LOG_BACKUP'. - 두 번째 이야기
12232정성태6/19/20208397오류 유형: 618. SharePoint - StoreBusyRetryLater 오류
... 46  47  48  49  50  51  52  53  54  [55]  56  57  58  59  60  ...