??????????????????????mydbd?????????????????????????????mydb.mdf???????????mydblog.ldf???????????????????????????????????????????洢????sp_attach_db???????????????????г???
???????′???????????
????use master
????go
????exec sp_detach_db 'mydb'
????go
??????????????????????λ??(D:mssqldata)???????λ??(E:sqldata)
????use master
????go
????exec sp_attach_db 'mydb'??'E:sqldatamydbdata.mdf'??'E:sqldatamydblog.ldf'
????go
???????sp_helpfile??????λ??????
????exec sp_helpfile