cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
swamy2387
Level 3

Command to detach database during uninstallation

Please tell the command which i can use in VBscript to detach the database, attached to SQL Server 2005 Enterprise. I have installed the SQL with default instance.
Labels (1)
0 Kudos
(1) Reply
rguggisberg
Level 13

As an alternative, you can use this to detach database in a .bat file.

SQLCMD -b -E -S "ServerName" -Q "sp_detach_db 'DatabaseName'"

Do SQLCMD /? from a CMD prompt for help.
0 Kudos