I am currently trying to restore my old sql server database, but I don't have the partition file. (I set up the partition in a different drive but didn't actually use it. The main mdf is 10GB and should contain most of the data.) )
If I try:
USE master;
CREATE DATABASE MY_DB
ON ( FILENAME = N'D:\DATA\MY_DB.mdf' )
FOR ATTACH_FORCE_REBUILD_LOG;
GO
The Sql server would complain
Unable to open the physical file "D:\MY_DB\TablePartitionFile\GranularityPartitionFile1.ndf". Operating system error 2: "2(The system cannot find the file specified.)".
Msg 5120, Level 16, State 5, Line 11
Unable to open the physical file "D:\MY_DB\TablePartitionFile\GranularityPartitionFile2.ndf". Operating system error 2: "2(The system cannot find the file specified.)".
Msg 5120, Level 16, State 5, Line 11
I even try to create an empty partition file to trick the sql server, still failed.
If there a way to only use the main mdf to restore the database without the partition file?