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 2000 Forums
 SQL Server Administration (2000)
 How can I create new copy of an existing database with another name

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-02-23 : 08:19:23
Valsan writes "In my Accounts software(VB/Access) I used FileCopy method to create new copy of an existing Acces file.Now I wish to change the back end to SQL Server.How can i do the same? Is it possible?I wish to do it on runtime through code.
Thank You"

Kristen
Test

22859 Posts

Posted - 2005-02-23 : 09:09:46
BACKUP DatabaseA and RESTORE to DatabaseB.

You could also DETACH and re-ATTACH, but that would mean the database was inaccessible whilst you were doing that, AND you should make a backup before the DETACH in case you are unable to re-ATTACH afterards for any reason. Hence my Plan A !!

kristen
Go to Top of Page
   

- Advertisement -