September 29, 2004 at 10:34 pm
i know How to attach and detach a database in SQL 2000 but How to
> attach and detach a database in SQL 7.0. i think there is no option.
> please give me solution. Ajay Sharma (UserID=164137)
September 30, 2004 at 12:30 am
sp_attach_db and sp_detach_db are available in SQL 7.0 also...these can be used to attach and detach databases in SQL 7.0...
September 30, 2004 at 1:53 am
hi,
Thanks a lot for reply but how to attach and detach database in enterprise manager
Thanks
Ajay
September 30, 2004 at 2:30 am
I don't think attach / detach are available from EM in SQL 7.0...you'd have to use the stored procedures for the same...
October 1, 2004 at 9:31 am
Don't forget to put the database in single user mode first.
And run "update statistics" after you're finished.
Do something like...
exec sp_dboption 'your_database_name', 'single user', true
exec sp_detach_db 'your_database_name'
-------------------------------------------------------------
-- MANUALLY COPY/PASTE .MDF/.LDF FILES TO NEW SERVER --
-------------------------------------------------------------
exec sp_attach_db 'your_database_name',
'path\your_database_name.MDF',
'path\your_database_log.LDF'
use [your_database_name]
exec sp_updatestats
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply