我损坏了数据库中与 FILESTREAM 相关的文件。
在.mdf和.ldf文件仍然完好,但是当我尝试上网的数据库,它抱怨,说有关FILESTREAM的文件是不正确的。
我不关心存储在 FILESTREAM 中的数据,但我关心其他数据。我可以从.mdf和.ldf文件中取回它吗?如何?
当我执行:
sp_attach_db @dbname = 'Demo',
@filename1 = N'<File path>.mdf',
@filename2 = N'<File path>.ldf'
Run Code Online (Sandbox Code Playgroud)
答复是:
Msg 5120, Level 16, State 105, Line 1
Unable to open the physical file "<Location>". Operating system error 2: "2(The system cannot find the file specified.)".
Msg 5105, Level 16, State 14, Line 1
A file activation error occurred. The physical file name '<Location>' may be incorrect. Diagnose and correct additional …Run Code Online (Sandbox Code Playgroud)