1: 无需新建数据库,直接运行
USE master;
GO
CREATE DATABASE test
ON (FILENAME = 'D:Program FilesMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLDATAtest.mdf'),
(FILENAME = 'D:Program FilesMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLDATAtest_log.ldf')
FOR ATTACH;
GO
如需其它文件,复制到相应位置即可
2: 刷新下就会出来
更多信息请查看IT技术专栏