Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Copy .ldf, .mdf file to another database Location

Author  Topic 

baburk
Posting Yak Master

108 Posts

Posted - 2008-11-04 : 07:49:03
Hi,

I wants to copy .mdf, .ldf files from location

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf'
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.ldf'

of database Test to anther database RestoreTest of location

d:\Data\RestoreTest.mdf
d:\Data\RestoreTest.ldf

by renaming the original (SOURCE) file name (Test)


Thanks in advance.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-11-04 : 08:49:58
backup the Test database and use Restore with move option to rename the mdf and log files.

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page
   

- Advertisement -