Sql-server – Best way to copy MS SQL (2000) database files to an external drive

bulkcopysql serversql-server-2000

We have a system running on Windows 2003, with a MS SQL server 2000 (Standard) instance as the data source. As we have sold the product, we are in the process of moving everything to the purchasing party.

We have cloned the virtual machines, and when they set them up, they are stating that the databases are corrupt and would like copies of the MDF/LDF files directly.

What is the cleanest way to do this? There are approximately 90 separate databases configured, and I don't really want to go in, stop/detach/copy/attach/restart, especially as I've heard that reattaching doesn't always go well. I also don't know if every database is stored in the same place.

I am looking for the least involved method of confirming the storage location and copy process for 90+ database files to a connected external hard drive.

Best Answer

Per the specific requirements of getting copies of the .mdf and .ldf files, you can simply stop the SQL Server service, copy the files, then start the SQL Server service.

The way to do it without downtime would be to take full backups, but then the other party would be required to restore the backups instead of just copying files. This would be the preferred method in almost all cases, but if the other party doesn't want to manually restore 90 databases or take the time to automate the restoration, the file copy method is understandable.