성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
[정성태] Modules 창(Ctrl+Shift+U)을 띄워서, 해당 Op...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>SQL Server Express 시작 오류 - error code 3417</h1> <p> SQL Server Express를 서비스 관리자에서 시작했더니 다음과 같은 오류가 발생합니다.<br /> <br /> <img alt='sql_express_start_error3417.png' src='/SysWebRes/bbs/sql_express_start_error3417.png' /><br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> "<br /> 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.<br /> "<br /> </div><br /> <br /> 아울러 이벤트 로그에는 이런 항목들이 남아 있었습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 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. </pre> <br /> 이와 함께 로그 파일이 있음을 알려줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 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'. </pre> <br /> 로그 파일의 내용도 일관성있게 "Access is denied"라고 하는데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 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.). ...[생략]... </pre> <br /> 하지만 실제로는 해당 폴더에 권한을 주어도 마찬가지 상황만 연출됩니다. 더욱 황당하게도 이벤트 로그에는 다음과 같은 항목도 보입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 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 <span style='color: blue; font-weight: bold'>e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf</span> for file number 1. OS error: 3(The system cannot find the path specified.). </pre> <br /> 도대체 저 경로가 어떻게 나올 수 있는 걸까요? 다행히 검색해 보면 이런 글이 나오는데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > SQL Server express service is not starting [closed] ; <a target='tab' href='http://serverfault.com/questions/447808/sql-server-express-service-is-not-starting'>http://serverfault.com/questions/447808/sql-server-express-service-is-not-starting</a> </pre> <br /> 위의 글에 따라 다음과 같이 실행을 하니 서비스는 일단 시작이 되었습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > NET START MSSQL$SQLEXPRESS /f /T3608 (또는, NET START MSSQLSERVER /f /T3608) </pre> <br /> 오호~~~ 이렇게 시작하면 DB를 로딩하지 않고 순수하게 SQL 프로세스만 시작시키나 봅니다. 재미있는 것을 알았군요. ^^<br /> <br /> 그리곤, 각각의 DB 파일 경로를 "alter database" 명령을 통해 원래의 파일 경로로 새롭게 잡아주었습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\Windows\system32><span style='color: blue; font-weight: bold'>NET START MSSQL$SQLEXPRESS /f /T3608</span> The SQL Server (SQLEXPRESS) service is starting. The SQL Server (SQLEXPRESS) service was started successfully. C:\Windows\system32><span style='color: blue; font-weight: bold'>SQLCMD -S .\SQLEXPRESS</span> 1> <span style='color: blue; font-weight: bold'>ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBData, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\MSDBData.mdf');</span> 2> <span style='color: blue; font-weight: bold'>ALTER DATABASE msdb MODIFY FILE ( NAME = MSDBLog, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\MSDBLog.ldf');</span> 3> <span style='color: blue; font-weight: bold'>ALTER DATABASE tempdb MODIFY FILE ( NAME = tempdev, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\temp.mdf');</span> 4> <span style='color: blue; font-weight: bold'>ALTER DATABASE tempdb MODIFY FILE ( NAME = templog, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\temp.ldf');</span> 5> <span style='color: blue; font-weight: bold'>ALTER DATABASE model MODIFY FILE ( NAME = modeldev, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\model.mdf');</span> 6> <span style='color: blue; font-weight: bold'>ALTER DATABASE model MODIFY FILE ( NAME = modellog, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\modellog.ldf');</span> 7> <span style='color: blue; font-weight: bold'>go</span> 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> <span style='color: blue; font-weight: bold'>exit</span> C:\Windows\system32><span style='color: blue; font-weight: bold'>NET STOP MSSQL$SQLEXPRESS</span> The SQL Server (SQLEXPRESS) service is stopping. The SQL Server (SQLEXPRESS) service was stopped successfully. </pre> <br /> 이렇게 직접 해당 파일들에 대한 경로 설정을 한 이후로는 서비스가 정상적으로 시작되었습니다.<br /> <br /> <hr style='width: 50%' /><br /> <br /> 위와 같이 해주었는데도 서비스 관리자에서 SQL Express 서비스 시작을 할 때 다음과 같은 오류가 발생할 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. Error 1067: The process terminated unexpectedly. </pre> <br /> 그런 경우에는 실제로 권한이 없어서 그럴 수 있습니다. 만약 SQL Server Express 서비스의 계정이 "NETWORK SERVICE"로 되어 있다면 다음의 파일들에 대해 "Full Control" 권한을 "NETWORK SERVICE" 계정에 부여해야 합니다. (테스트 해보니, Write 또는 Modify 권한만으로는 부족하고 반드시 "Full Control" 권한이 있어야 합니다.)<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 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 </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1451
(왼쪽의 숫자를 입력해야 합니다.)