all groups > sql server mseq > september 2003 >
You're in the

sql server mseq

group:

sql70


sql70 Mike Alemi
9/23/2003 6:36:54 PM
sql server mseq:

Hi;
my hard drive crushed and I lost everything. with a new
hard drive and Windows NT 4. Workstation OS(my previus
OS). I did reinstall and restored my data. I did install
the SQL7 and configured that as it was before. I need to
migrate or restore the backed up database to the original
location c:\sql70\data and I don't know how to do it.

Could you please let me know how to do this? is there any
documentation available to be downloaded or look as a
guide.

your advice is a great help and many thanks in advaned.

Thanks

Mike Alemi

949-837-0909 Cel-phone 949-338-0967 Fax:949-837-2999
Re: sql70 Vishal Parkar
9/24/2003 7:28:17 AM
[quoted text, click to view]

If you have already restored your database and want to move data files to the location of
c:\sql70\data, then you will have to make use of system stored procedure sp_detach_db and
sp_attach_db.
See following small example.

first use the sp_detach_db command to detach the database.

Eg
sp_detach_db 'pubs'

copy mdf and ldf files to the destination drive.

after copying the files, you can use the sp_attach_db stored procedure to reattach the files to SQL
Server with the new location

See more help on this in BOL.

[quoted text, click to view]

If you want to restore the database then you can simply use RESTORE command to do that. Books
online has ample of help on this.
Start Books online , under index tab type "restore database" double click this topic and you will
see bunch of different restore scenarios.

--
- Vishal

sql70 T.S.Ramesh
9/25/2003 1:09:08 AM
Hi Mike
It's very simple, Use Restore Database Option in SQL
Server Enterprise Manager to Restore the database from
backup. For more details see SQL Server Books Online for
the same.

[quoted text, click to view]
AddThis Social Bookmark Button