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
 General SQL Server Forums
 New to SQL Server Programming
 How to copy & use the Database in Different Name?

Author  Topic 

paramu
Posting Yak Master

151 Posts

Posted - 2011-01-01 : 04:58:43
Hi,

Iam using Sql Server 2008. I would like to copy the database called 'My_Account_Database' to 'My_Account_Databse_2010'

Is there any easy way?

Thanks For The Ideas...

Thanks By
PARAMU

Paramu @ PARANTHAMAN

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-01-01 : 10:10:40
Backup and restore.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-01-01 : 23:53:21
quote:
Originally posted by nigelrivett

Backup and restore.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.



+1

To expand on Nigel's post, you'll need to use the WITH MOVE option in your restore command to rename (or relocate) the target files.

See here for full syntax.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2011-01-02 : 04:46:53
+1

explanation of the Restore Syntax here: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54300
Go to Top of Page
   

- Advertisement -