我最近安装了SQL Server Management Studio 2008 R2。但我无法连接到数据库,我发现了问题。
问题是SQL Server(SQLEXPRESS
)服务未启动。
我尝试启动它,但它什么都没有。我检查了事件查看器,我收到了消息,但我不知道如何解决它。
请帮帮我。非常感谢你们。
这是来自事件查看器日志
FileMgr::StartLogFiles: Operating system error 2(failed to retrieve text for this error. Reason: 15105)
occurred while creating or opening file 'e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\MSDBLog.ldf'.
Diagnose and correct the operating system error, and retry the operation.
这是来自C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log
2014-05-31 11:26:12.54 Server Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86)
Mar 29 2009 10:27:29
Copyright (c) 1988-2008 Microsoft Corporation
Express Edition on Windows NT 6.1 <X86> (Build 7600: )
2014-05-31 11:26:12.54 Server (c) 2005 Microsoft Corporation.
2014-05-31 11:26:12.54 Server All rights reserved.
2014-05-31 11:26:12.54 Server Server process ID is 4560.
2014-05-31 11:26:12.55 Server System Manufacturer: 'SAMSUNG ELECTRONICS CO., LTD.', System Model: '300E4C/300E5C/300E7C'.
2014-05-31 11:26:12.55 Server Authentication mode is WINDOWS-ONLY.
2014-05-31 11:26:12.55 Server Logging SQL Server messages in file 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log\ERRORLOG'.
2014-05-31 11:26:12.55 Server This instance of SQL Server last reported using a process ID of 1688 at 31/05/2014 11:20:48 (local) 31/05/2014 4:20:48 (UTC). This is an informational message only; no user action is required.
2014-05-31 11:26:12.55 Server Registry startup parameters:
-d c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\master.mdf
-e c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log\ERRORLOG
-l c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2014-05-31 11:26:12.58 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2014-05-31 11:26:12.58 Server Detected 2 CPUs. This is an informational message; no user action is required.
2014-05-31 11:26:12.63 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2014-05-31 11:26:12.70 Server Node configuration: node 0: CPU mask: 0x00000003 Active CPU mask: 0x00000003. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2014-05-31 11:26:12.75 spid7s Starting up database 'master'.
2014-05-31 11:26:12.92 spid7s FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLEXPRESS'.
2014-05-31 11:26:12.97 spid7s SQL Trace ID 1 was started by login "sa".
2014-05-31 11:26:12.97 spid7s Starting up database 'mssqlsystemresource'.
2014-05-31 11:26:13.00 spid7s The resource database build version is 10.00.2531. This is an informational message only. No user action is required.
2014-05-31 11:26:13.17 spid7s Server name is 'MARTIN-PC\SQLEXPRESS'. This is an informational message only. No user action is required.
2014-05-31 11:26:13.17 spid10s Starting up database 'model'.
2014-05-31 11:26:13.17 spid7s Informational: No full-text supported languages found.
2014-05-31 11:26:13.17 spid7s Starting up database 'msdb'.
2014-05-31 11:26:13.86 Server A self-generated certificate was successfully loaded for encryption.
2014-05-31 11:26:13.86 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].
2014-05-31 11:26:13.86 Server Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].
2014-05-31 11:26:13.86 Server Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2014-05-31 11:26:13.87 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b, state: 3. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
2014-05-31 11:26:13.87 Server SQL Server is now ready for client connections. This is an informational message; no user action is required.
2014-05-31 11:26:13.94 spid10s Error: 17204, Severity: 16, State: 1.
2014-05-31 11:26:13.94 spid10s FCB::Open failed: Could not open file e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\model.mdf for file number 1. OS error: 21(failed to retrieve text for this error. Reason: 15100).
2014-05-31 11:26:13.94 spid10s Error: 5120, Severity: 16, State: 101.
2014-05-31 11:26:13.94 spid10s Unable to open the physical file "e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\model.mdf". Operating system error 21: "21(failed to retrieve text for this error. Reason: 15105)".
2014-05-31 11:26:13.95 spid7s Error: 17204, Severity: 16, State: 1.
2014-05-31 11:26:13.95 spid7s FCB::Open failed: Could not open file e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\MSDBData.mdf for file number 1. OS error: 21(failed to retrieve text for this error. Reason: 15105).
2014-05-31 11:26:13.95 spid7s Error: 5120, Severity: 16, State: 101.
2014-05-31 11:26:13.95 spid7s Unable to open the physical file "e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\MSDBData.mdf". Operating system error 21: "21(failed to retrieve text for this error. Reason: 15105)".
2014-05-31 11:26:15.57 spid10s Error: 17207, Severity: 16, State: 1.
2014-05-31 11:26:15.57 spid10s FileMgr::StartLogFiles: Operating system error 2(failed to retrieve text for this error. Reason: 15105) occurred while creating or opening file 'e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
2014-05-31 11:26:15.57 spid10s File activation failure. The physical file name "e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\modellog.ldf" may be incorrect.
2014-05-31 11:26:15.57 spid10s Error: 945, Severity: 14, State: 2.
2014-05-31 11:26:15.57 spid10s Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
2014-05-31 11:26:15.57 spid10s Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.
2014-05-31 11:26:15.57 spid10s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2014-05-31 11:26:15.58 spid7s Error: 17207, Severity: 16, State: 1.
2014-05-31 11:26:15.58 spid7s FileMgr::StartLogFiles: Operating system error 2(failed to retrieve text for this error. Reason: 15105) occurred while creating or opening file 'e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\MSDBLog.ldf'. Diagnose and correct the operating system error, and retry the operation.
Cannot close event log because there are still event handle users active.
答案 0 :(得分:1)
启动日志中存在许多问题。安装新实例可能比修复乱搞的实例更容易。
您必须拥有模型数据库。您的启动日志显示它显然是丢失的。您是否尝试将SQL数据文件文件移动到其他位置?如果没有,不知道为什么会遇到这些问题。如果你没有复制到model.mdf&amp; model.ldf你可以从运行相同版本的sql的另一台计算机上复制它们。
请参阅for an article,逐步完成&#34;修复&#34;模型数据库的位置。
这个article本质上是同一篇文章,但它适用于msdblog。
当然,您必须调整文件引用以匹配您的本地设置。
修复这些数据库文件后,您可以启动管理工作室。