Attach / Detach Database Script

This script is convenient for anyone who needs to move a lot of SQL server data or log files around for any reason. It dynamically generates the scripts needed to detach and attach all your databases. It can be edited to change file locations on the attach statements if needed.

The script has been tested under both SQL 7.0 and SQL 2000.

Author: Adam Wiedenhaefer

Download Script:
AttachDetach_Scripter.sql



Disclaimer:
We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
“as -is”, without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose…

Disclaimer Continued

Back to Database Journal Home

Latest Articles