Only filestream.hdr? Not the actual files?
What you can try is to create a new database, and then take that database offline, and copy the files of this database over the files of the new database. No guarantees, though.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a database, there is no backup.
This database was created on SQL Server version 14 and that server is no longer available.
I have the MDF, LDF and the filestream.hdr files.
Now I want to attached this database to SQL Server 2017.
As you guess it, the attached process fails.
If I try to attached from Management Studio, I get an error that the file stream folder cannot be located.
However, if I point to the folder in script, I get File Activation Error.
CREATE DATABASE [MyDB] ON
( FILENAME = N'D:\MSSQL14.InstanceName\MSSQL\DATA\MyDB.mdf' ),
( FILENAME = N'L:\MSSQL14.InstanceName\MSSQL\Log\MyDB_log.ldf' ),
FILEGROUP [MyFileStream] CONTAINS FILESTREAM DEFAULT
( NAME = N'MyFileStream', FILENAME = N'D:\MSSQL14.InstanceName\MSSQL\DATA\FileStreamFolder' )
FOR ATTACH
GO
Only filestream.hdr? Not the actual files?
What you can try is to create a new database, and then take that database offline, and copy the files of this database over the files of the new database. No guarantees, though.
Hello friends:
Similar to what @Erland Sommarskog suggested:
I did the following as I read on SO.
I did the above and everything worked.
I immediately backed-up the databases.
Hi,
After I moved the mdf, ldf files and FileStream folders to different path like you did, I tested the script you showed in the question, but there was no problem and the database was successfully attached. Of course, if there is only the filestream.hdr file, the FileStream data will be lost, but it will not prevent the database from being successfully attached.