在新UAT服务器上,需要将tempdb放置在SSD(固态硬盘)上。由于SSD(固态硬盘)特性,所以tempdb的文件只能放置在D盘下面,而不能是D盘下的某一个目录下面。

ALTER  DATABASE tempdb

MODIFY FILE(name='tempdev', filename='D:\tempdb.mdf') ;

 

GO

 

ALTER  DATABASE tempdb

MODIFY FILE(name='templog', filename='D:\templog.ldf') ;

GO

修改了tempdb的目录后,重启数据库服务,结果出现错误信息:“FCB::Open failed: Could not open file D:\tempdb.mdf for file number 1.  OS error: 2(The system cannot find the file specified.)" ,具体错误信息如下所示:

2015-05-27 ;11:56:44.88 spid9s      The resource database build version is 12.00.2000. This is an informational message only. No user action is required.

2015-05-27 ;11:56:45.49 spid9s      Starting up database 'model'.

2015-05-27 ;11:56:45.67 Server      The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/GEK-MIS01UAT.gfg1.esquel.com ] for the SQL Server service.

2015-05-27 ;11:56:45.67 Server      The SQL Server Network Interface library successfully registered the Service Principal Name (SPN) [ MSSQLSvc/GEK-MIS01UAT.gfg1.esquel.com:1433 ] for the SQL Server service.

2015-05-27 ;11:56:45.83 spid9s      Clearing tempdb database.

2015-05-27 ;11:56:45.84 spid9s      Error: 5123, Severity: 16, State: 1.

2015-05-27 ;11:56:45.84 spid9s      CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'D:\tempdb.mdf'.

2015-05-27 ;11:56:45.94 spid9s      Error: 17204, Severity: 16, State: 1.

2015-05-27 ;11:56:45.94 spid9s      FCB::Open failed: Could not open file D:\tempdb.mdf for file number 1.  OS error: 2(The system cannot find the file specified.).

2015-05-27 ;11:56:45.94 spid9s      Error: 5120, Severity: 16, State: 101.

2015-05-27 ;11:56:45.94 spid9s      Unable to open the physical file "D:\tempdb.mdf". Operating system error 2: "2(The system cannot find the file specified.)".

2015-05-27 ;11:56:45.94 spid9s      Error: 1802, Severity: 16, State: 4.

2015-05-27 ;11:56:45.94 spid9s      CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

2015-05-27 ;11:56:45.94 spid9s      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.

2015-05-27 ;11:56:45.94 spid9s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

2015-05-27 ;11:56:46.20 spid16s     The SQL Server Network Interface library could not deregister the Service Principal Name (SPN) [ MSSQLSvc/xxxx.xxxx.xxxx.com ] for the SQL Server service. Error: 0x2af9, state: 61. Administrator should deregister this SPN manually to avoid client authentication errors.

2015-05-27 11:56:46.20 spid16s     The SQL Server Network Interface library could not deregister the Service Principal Name (SPN) [ MSSQLSvc/xxxx.xxx.xxxx.com:1433 ] for the SQL Server service. Error: 0x2af9, state: 61. Administrator should deregister this SPN manually to avoid client authentication errors.


我猜测是系统权限问题导致,于是我右键单击D盘的属性选项,在”Security“里面找到Users(xxxx\Users),授予用户”Full Control“权限,然后重启数据库实例,问题解决。我后面测试了一下,其实在Windows Server 2012下,将任何数据库文件放置在磁盘根目录下都有这个权限问题.

Unable to open the physical file xxxx. Operating system error 2的更多相关文章

  1. CREATE FILE encountered operating system error 5(Access is denied.)

    这篇博文主要演示"CREATE FILE encountered operating system error 5(Access is denied.)"错误如出现的原因(当然只是 ...

  2. InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法

    InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法 140628  8:10:48 [Note] Plugi ...

  3. mysql数据库报错:InnoDB: Operating system error number 13 in a file operation

    环境:centos6.5 x86_64 启动mysql发现日志报错(日志路径可以查看/etc/my.cnf的配置) 160722 10:34:08 [Note] Found 42570716 of 4 ...

  4. DBCC CHECKDB 遭遇Operating system error 112(failed to retrieve text for this error. Reason: 15105) encountered

    我们一个SQL Server服务器在执行YourSQLDBa的作业YourSQLDba_FullBackups_And_Maintenance时遇到了错误: Exec YourSQLDba.Maint ...

  5. Error: 17053 LogWriter: Operating system error 21(The device is not ready.)

    今天在Detach数据库的时候出现错误,运行DBCC CHECKDB从SQL Server error log中看到下面的信息: Error: 17053, Severity: 16, State: ...

  6. LogWriter: Operating system error 21(error not found) encountered

      一台老旧的数据库服务器(SQL Server 2005)突然报如下错误,而且数据库处于RECOVERY PENDING ,检查错误日志,发现这个错误是突然出现的.没有任何其它人为误操作导致 Dat ...

  7. 如何定位“Operating system error 32(failed to retrieve text for this error. Reason: 15105)”错误中被占用的文件

      之前在这篇"Operating system error 32(failed to retrieve text for this error. Reason: 15105)"博 ...

  8. Operating system error 32(failed to retrieve text for this error. Reason: 15105)

    一台数据库服务器的事务日志备份作业偶尔会出现几次备份失败的情况,具体的错误信息为: DATE/TIME:    2018/7/30 12:10:52 DESCRIPTION: BackupDiskFi ...

  9. AdventureWorksDW2008R2 attach: Unable to open the physical file. Operating system error 5: "5(Access is denied.)

    http://stackoverflow.com/questions/26014133/adventureworksdw2008r2-attach-unable-to-open-the-physica ...

随机推荐

  1. 改变word的语言字典

    改变word的语言字典 上周末看论坛有人提出否有方法用代码改变word的语言字典,因为默认的语言会影响现用语言输入的拼写器和其他校对工具.我们的Spire.doc正好支持,正好闲来无事所以我用西班牙语 ...

  2. Excel基础

    一.基础 一个Excel文档称为工作簿(workbook).一个工作簿中可以包含多个工作表(sheet) ctrl+向右箭头  查看最后一列 ctrl+向下箭头 查看最后一行 二.合并单元格 三.等高 ...

  3. 【中文分词】简单高效的MMSeg

    最近碰到一个分词匹配需求--给定一个关键词表,作为自定义分词词典,用户query文本分词后,是否有词落入这个自定义词典中?现有的大多数Java系的分词方案基本都支持添加自定义词典,但是却不支持HDFS ...

  4. 体验VS2015 Update 2 的 Android 和 Python

    趁着假期不用加班,又遇到build 2016的劲爆消息--Xamarin免费集成到VS中 所以立马把vs升级到update 2体验一下下(之前也体验过). 在安装的时候也是只勾选了部分,不需要太多(全 ...

  5. QTableWidget行选中/删除/添加行

    1  均分各列 tableWidget->horizontalHeader()->setStretchLastSection(true); //就是这个地方 tableWidget-> ...

  6. 使用canvas实现擦玻璃效果

    体验效果:http://hovertree.com/texiao/html5/25/ 效果图: 代码如下: <!DOCTYPE html> <html> <head la ...

  7. js补充小知识点(continue,break,ruturn)

    1.continue,break,ruturn eg:1-100的和 $(function () { $("#hello").click(function () { var iNu ...

  8. navicate怎么用sql语句插入一条语句

    1.打开数据库:找到表,双击要插入的表打开: 2.打开之后点击文件->查询表 3.输入要查询的语句,点击运行.成功后会有提示.

  9. C标准头文件<signal.h>

    信号即异常,或者理解为中断,一个进程接收到一个信号,如果没有处理机制,就会按照默认的处理方式进行处理,而默认的处理方式通常是终止当前进程或忽略该信号.当然,程序也可以编写相应的处理信号的函数,一旦接收 ...

  10. JAVA中常说的三大框架指:SSH

    即:spring.Struts.hibernate Spring:功能强大的组件粘合济,能够将你的所有的Java功能模块用配置文件的方式组合起来(还让你感觉不到spring的存在)成为一个完成的应用 ...