Krishna Potlakayala (3/28/2009)
You can't copy the .mdf file if the server is online.
"Au contrair mon pere"
you dont need to shutdown sql server!
you dont need to detach the database!
you dont even need to back it up and restore it!
For the database you wish to retrieve, ensure no users are connected and then issue
alter database [mydatabase] set offline
copy the disk files (mdf and ldf) then bring back online using
alter database [mydatabase] set online
😉
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉