Friday, March 30, 2012

how to attach a DB

I have database DB1 on Box1 and I have the full backup of that database and also have data file and log file.If I want to restore the database on a diff box How can do that.
1.How can I restore the Database?
2.How ca I attach the data file to the database on new Box?
Thanks.Check out the WITH REPLACE arguement of the RESTORE command.

or if you have a mdf and a ldf look at sp_attach_db.

No comments:

Post a Comment