Unable to open the physical file xxxx. Operating system error 2
2015-05-27 17:19
549 查看
在新UAT服务器上,需要将tempdb放置在SSD(固态硬盘)上。由于SSD(固态硬盘)特性,所以tempdb的文件只能放置在D盘下面,而不能是D盘下的某一个目录下面。
修改了tempdb的目录后,重启数据库服务,结果出现错误信息:“FCB::Openfailed:CouldnotopenfileD:\tempdb.mdfforfilenumber1.OSerror:2(Thesystemcannotfindthefilespecified.)",具体错误信息如下所示:
我猜测是系统权限问题导致,于是我右键单击D盘的属性选项,在”Security“里面找到Users(xxxx\Users),授予用户”FullControl“权限,然后重启数据库实例,问题解决。我后面测试了一下,其实在WindowsServer2012下,将任何数据库文件放置在磁盘根目录下都有这个权限问题.
ALTERDATABASEtempdb
MODIFYFILE(name='tempdev',filename='D:\tempdb.mdf');
GO
ALTERDATABASEtempdb
MODIFYFILE(name='templog',filename='D:\templog.ldf');
GO
修改了tempdb的目录后,重启数据库服务,结果出现错误信息:“FCB::Openfailed:CouldnotopenfileD:\tempdb.mdfforfilenumber1.OSerror:2(Thesystemcannotfindthefilespecified.)",具体错误信息如下所示:
2015-05-27;11:56:44.88spid9sTheresourcedatabasebuildversionis12.00.2000.Thisisaninformationalmessageonly.Nouseractionisrequired.
2015-05-27;11:56:45.49spid9sStartingupdatabase'model'.
2015-05-27;11:56:45.67ServerTheSQLServerNetworkInterfacelibrarysuccessfullyregisteredtheServicePrincipalName(SPN)[MSSQLSvc/GEK-MIS01UAT.gfg1.esquel.com]fortheSQLServerservice.
2015-05-27;11:56:45.67ServerTheSQLServerNetworkInterfacelibrarysuccessfullyregisteredtheServicePrincipalName(SPN)[MSSQLSvc/GEK-MIS01UAT.gfg1.esquel.com:1433]fortheSQLServerservice.
2015-05-27;11:56:45.83spid9sClearingtempdbdatabase.
2015-05-27;11:56:45.84spid9sError:5123,Severity:16,State:1.
2015-05-27;11:56:45.84spid9sCREATEFILEencounteredoperatingsystemerror5(Accessisdenied.)whileattemptingtoopenorcreatethephysicalfile'D:\tempdb.mdf'.
2015-05-27;11:56:45.94spid9sError:17204,Severity:16,State:1.
2015-05-27;11:56:45.94spid9sFCB::Openfailed:CouldnotopenfileD:\tempdb.mdfforfilenumber1.OSerror:2(Thesystemcannotfindthefilespecified.).
2015-05-27;11:56:45.94spid9sError:5120,Severity:16,State:101.
2015-05-27;11:56:45.94spid9sUnabletoopenthephysicalfile"D:\tempdb.mdf".Operatingsystemerror2:"2(Thesystemcannotfindthefilespecified.)".
2015-05-27;11:56:45.94spid9sError:1802,Severity:16,State:4.
2015-05-27;11:56:45.94spid9sCREATEDATABASEfailed.Somefilenameslistedcouldnotbecreated.Checkrelatederrors.
2015-05-27;11:56:45.94spid9sCouldnotcreatetempdb.Youmaynothaveenoughdiskspaceavailable.FreeadditionaldiskspacebydeletingotherfilesonthetempdbdriveandthenrestartSQLServer.Checkforadditionalerrorsintheeventlogthatmayindicatewhythetempdbfilescouldnotbeinitialized.
2015-05-27;11:56:45.94spid9sSQLTracewasstoppedduetoservershutdown.TraceID='1'.Thisisaninformationalmessageonly;nouseractionisrequired.
2015-05-27;11:56:46.20spid16sTheSQLServerNetworkInterfacelibrarycouldnotderegistertheServicePrincipalName(SPN)[MSSQLSvc/xxxx.xxxx.xxxx.com]fortheSQLServerservice.Error:0x2af9,state:61.AdministratorshouldderegisterthisSPNmanuallytoavoidclientauthenticationerrors.
2015-05-2711:56:46.20spid16sTheSQLServerNetworkInterfacelibrarycouldnotderegistertheServicePrincipalName(SPN)[MSSQLSvc/xxxx.xxx.xxxx.com:1433]fortheSQLServerservice.Error:0x2af9,state:61.AdministratorshouldderegisterthisSPNmanuallytoavoidclientauthenticationerrors.
我猜测是系统权限问题导致,于是我右键单击D盘的属性选项,在”Security“里面找到Users(xxxx\Users),授予用户”FullControl“权限,然后重启数据库实例,问题解决。我后面测试了一下,其实在WindowsServer2012下,将任何数据库文件放置在磁盘根目录下都有这个权限问题.
相关文章推荐
- 解决:Unable to open the physical file "…….ldf". Operating system error 5: "5(拒绝访问。)".
- Unable to open the physical file "d:\***.mdf". Operating system error 5: "5(Access is denied.)".
- AdventureWorksDW2008R2 attach: Unable to open the physical file. Operating system error 5: "5(Access is denied.)
- SQL - Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Error 5120
- Unable to open the physical file "F:\DATA\TestDB.mdf"
- Error “Unable to copy the file xxx from the project template to the project. Can't find the file \xxxx” when create VS template
- OGG-01091 Unable to open file (error 89, Invalid file system control data detected)
- Unable to open the physical file XXX.mdf
- [置顶] OGG-01091 Unable to open file (error 89, Invalid file system control data detected)
- 从C调用Python脚本unableto load the file system codec ImportError错误解决方法
- expdp ORA-39070:Unable to open the log file
- Error: unable to open database "BookStore.db": unable to open database file
- Xcode: Unable to open project… cannot be opened because the project file cannot be parsed
- PCC-F-NOERRFILE, unable to open error message file, facility PR2
- Unable to open Web project 'ProjectName'. An HTTP error occurred. The server ......
- 手把手教你:Ubuntu+django+apache下配置网页错误OperationalError: Unable to Open Database File 的解决方法
- Error[e12]: Unable to open file 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\8051\config\lnk
- ERROR: Unable to open class file E:\。。。\R.java: Permission denied
- Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
- unable to get system library for the project" error when import android project to eclips