C:\>sqlcmd -U your_username -P your_password
1> use msdb
2> go
Changed database context to 'msdb'.
1> sp_attach_db 'database_name', 'data_file', 'log_file'
2> go
Update: And here is how to detach a database by command line
C:\>sqlcmd -U your_username -P your_password
1> use msdb
2> go
Changed database context to 'msdb'.
1> sp_detach_db 'database_name'
2> go
No comments:
Post a Comment