我试图通过 .bak 文件恢复数据库,同时恢复我遇到了这个错误
如何避免此错误并成功还原,
注意:针对这个 Dababase
1. one .mdf file Ex: <DBNAME>_Primary01.mdf (Logical Name: FI_Primary)
2. one .ldf file EX: <DBNAME>_Log01.ldf (Logical Name: FI_Log)
3. six .ndf file Ex: <DBNAME>_Data01.ndf (Logical Name: FI_Data)
Ex: <DBNAME>_Data_201.ndf(Logical Name: FI_Data_2)
Ex: <DBNAME>_Index01.ndf(Logical Name: FI_Index)
Ex: <DBNAME>_Index_201.ndf(Logical Name: FI_Index_2)
Ex: <DBNAME>_Large01.ndf(Logical Name: FI_Large)
Ex: <DBNAME>_Large_Index01.ndf(Logical Name: FI_Large_Index)
RESTORE DATABASE [MESDB] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup\MESDB.bak'
WITH FILE = 1, MOVE N'FI_Primary' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.mdf',
MOVE N'FI_Data' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.ndf',
MOVE N'FI_Index' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.ndf',
MOVE N'FI_Data_2' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.ndf',
MOVE N'FI_Index_2' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.ndf',
MOVE N'FI_Large' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.ndf',
MOVE N'FI_Large_Index' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.ndf',
MOVE N'FI_Log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MESDB.ldf', NOUNLOAD, STATS = 10
GO