新建查询:
EXEC sp_attach_db @dbname = N'DBNAME', @filename1 = N'D:\FileName.mdf', @filename2 = N'D:\FileName.ldf' ;
ok,注意文件所在路径!
ref:
http://www.blogjava.net/fl1429/archive/2009/04/28/267964.html
http://www.51testing.com/?uid-164083-action-viewspace-itemid-82496