1. 关于下面的错误
The
file "G:\..........\abc.mdf" is compressed but does not reside in a
read-only database or filegroup. The file must be decompressed.
Could not open new database 'Dotnet67'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 5118)
把数据文件的属性的compress选项的勾去掉就可以解决。
Basically I wanted to keep the db file on a drive other than the default operating system drive. But as my other drives are compressed, so I was having problem. But I can still keep the db file on the compressed drive and attach it in sql server. This can be done by going in the properties of the folder that contains the db file. Right click the folder and select properties. Then click Advanced. There un-check the option "Compress contents to save disk space". In this way I am able to keep the db file on a compressed drive and still attach it in sql server.
2. Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Error 5120
打开SQL Server Configuration Mananger窗口,右键单击SQLServer属性,然后点advanced,把数据的log文件位置变成你新的位置
本文将指导您如何解决在使用SQL Server时遇到的两个常见错误:数据库无法打开(错误5118)和物理文件无法打开(错误5:5)。通过调整数据库文件的属性和配置SQL Server属性,您可以成功解决问题,允许在压缩驱动器上保存和附加数据库。
1189

被折叠的 条评论
为什么被折叠?



