0

Hello

How can I clone a database in MS SQL 2005 Express? I have the original database and I want to create a new database that has to be the same as the original one.

regards,
Vedro

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by susyed
0

Here is the SQL Statements for backing up and restoring with TSQL. You should also be able to use the Microsoft SQL Management Studio if that option was selected when you installed MSDE.

--First create a backup
BACKUP DATABASE [Leather] TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL\BackUpManual\Leather.bak' WITH  INIT ,  NOUNLOAD ,  NAME = N'Leather backup',  NOSKIP ,  STATS = 10,  NOFORMAT 
--Next restore it to another database
RESTORE DATABASE [Leather2] FROM  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL\BackUpManual\Leather.bak' WITH  FILE = 1,  MOVE N'Leather_Data' TO N'D:\Microsoft SQL Server\Data\Leather2.MDF',  MOVE N'Leather_Log' TO N'D:\Microsoft SQL Server\Data\Leather2.LDF',  NOUNLOAD,  REPLACE,  STATS = 10
0

Hello

Thanks allot. This is what needed. It works perfectly.

This forum is great!

Regards,
vedro

0

Great, I was looking for something like this for last two days. Worked like a charm.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.