在新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. 关于Java中的transient关键字

    Java中的transient关键字是在序列化时候用的,如果用transient修饰变量,那么该变量不会被序列化. 下面的例子中创建了一个Student类,有三个成员变量:id,name,age.ag ...

  2. DotNet指定文件显示的尺寸

    在项目中开发中,有时候需要将文件的尺寸进行控制,例如需要将文件的尺寸指定为字节,TB等.现在提供一个方法,实现将指定文件的尺寸, 提供:"字节", "KB", ...

  3. IO多路复用之epoll总结

    1.基本知识 epoll是在2.6内核中提出的,是之前的select和poll的增强版本.相对于select和poll来说,epoll更加灵活,没有描述符限制.epoll使用一个文件描述符管理多个描述 ...

  4. opengl 读取3ds(stl)文件

    没有解决: mark 几个网站: 1 http://blog.csdn.net/icebergkevin/article/details/18974235 能实现二维的 2 http://www.cn ...

  5. json是个啥东东

    xml 不用说 只要是搞web开发的 没听说谁不知道的 一种类似数据传输格式定义的语言 但是他却不是一个真正的轻量级的东西 其他的不说 只要传输一点很少的数据 经过他那左括号右括号 还有什么属性 一包 ...

  6. entity framework 5 批量增删改效率优化

    对于数据的批量增删改最慢的就是操作一条就提交一次事务. 以下是对增删改操作的优化测试 同样的300条数据 批量新增只提交一次事务 用时:10673.5444ms 批量新增只提交一次事务并把contex ...

  7. html自我设计login登录

    效果图如下: 第一次设计出能看的前台,就当留作纪念吧.

  8. c#中奖算法的实现

    算法名称 Alias Method public class AliasMethod { /* The probability and alias tables. */ private int[] _ ...

  9. php实现设计模式之 访问者模式

    <?php /** * 访问者模式 * 封装某些作用于某种数据结构中各元素的操作,它可以在不改变数据结构的前提下定义作用于这些元素的新的操作. * 行为类模式 */ /** 抽象访问者:抽象类或 ...

  10. 从零开始学 Java - Spring 一主多从、多主多从 数据库配置

    待会苹果要开发布会 我写完这篇文章就准备去看发布会了,因为我买了好几包瓜子和啤酒.由于苹果的保密做的越来越差劲,该曝光的信息差不多全部曝光了,我们这种熬夜看发布会的只不过是让这些信息更加真实,或者说是 ...