SQL Server ndf和ldf文件还原数据库

USE master;
 GO 
 CREATE DATABASE tr_west
 ON (FILENAME = 'D:\test.ndf'),
 (FILENAME = 'D:\test.ldf')
 FOR ATTACH; 
GO

USE master;
 GO 
 CREATE DATABASE back_doc
 ON (NAME = N'back_doc', FILENAME = 'D:\back_doc.mdf'),
 ( FILENAME = 'D:\back_doc\DocFileStream'),
 (FILENAME = 'D:\back_doc\TempFileStream'),
 (FILENAME = 'D:\back_doc_log.ldf')
 FOR ATTACH; 
GO

你可能感兴趣的:(sqlserver)