我的 SQL Server 2008 运行良好。大约一个小时前,突然停止了——MSSQLSERVER服务停止了,我右键单击,单击启动,它说服务已经启动,然后停止
我查看了事件日志,看到了这两个错误:
17207 :
udopen: Operating system error 3(error not found) during the creation/opening of physical device C:\Program Files\Microsoft SQL Server\MSSQL\data\model.mdf.
17204 :
FCB::Open failed: Could not open device C:\Program Files\Microsoft SQL Server\MSSQL\data\model.mdf for virtual device number (VDN) 1.
model.mdf db 从未在该位置 - 我指定驱动器 F:在安装期间用于数据/日志。
我检查了 SQL 配置管理器,尝试设置启动参数,但 SQL Server 未列为服务之一......
编辑:
我现在已经将 db 移到了它要查找的位置:
C:\Program Files\Microsoft SQL Server\MSSQL\data\
目录。
现在,如果我启动该服务,它仍然无法工作 - 我在日志中收到以下错误消息:
Could not find row in sysindexes for database ID 3, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.
有趣的是,我检查了错误日志——大约在用户报告问题的时候,有这样的:
2010-01-08 17:11:26.44 spid51 Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
2010-01-08 17:11:26.44 spid51 FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
2010-01-08 17:11:26.44 spid51 Configuration option 'Agent XPs' changed from 1 to 0. Run the RECONFIGURE statement to install.
2010-01-08 17:11:26.44 spid51 FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
2010-01-08 17:11:26.44 spid51 Configuration option 'show advanced options' changed from 1 to 0. Run the RECONFIGURE statement to install.
2010-01-08 17:11:26.44 spid51 FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
2010-01-08 17:11:44.89 spid10s Service Broker manager has shut down.
2010-01-08 17:11:47.83 spid7s SQL Server is terminating in response to a 'stop' request from Service Control Manager. This is an informational message only. No user action is required.
2010-01-08 17:11:47.83 spid7s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
首先,似乎有人正在使用 sp_configure 更改您数据库的选项,您知道这是谁吗?看起来这发生在脚本中(时间很接近)他们也可能使用类似的过程更改了模型数据库的位置更改 后 sql server 服务已关闭,这就是您看到默认跟踪的原因& 服务代理停止(正常)。如果它被更改为不正确的位置,那么这将解释为什么 sql server 不会启动
3 的数据库 id 是模型数据库,因此您要么移动了模型的错误副本,要么它已损坏。根据您的设置,您有 2 个选项,具体取决于哪个更容易。
可能是愚蠢的问题,但是您是否在卷上运行了 chkdsk?
您是否确认您的 F: 驱动器和文件是您最后放置的位置?chkdsk 没有发现这些问题?
您是否验证了相关目录(和驱动器)的权限?
愚蠢的问题:您是否只是尝试重新启动服务器?