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 Development (2000)
 howto: duplicate a database in VB

Author  Topic 

lalbatros
Yak Posting Veteran

69 Posts

Posted - 2008-07-15 : 10:00:32
Hello,

I would like to have a short VB procedure that copies (duplicates) an Sql2005 database on the same server.

Thanks for your help.

mfemenel
Professor Frink

1421 Posts

Posted - 2008-07-15 : 10:07:09
Just curious why does it have to be VB and not SSIS or something that's already built to do this?

Mike
"oh, that monkey is going to pay"
Go to Top of Page

lalbatros
Yak Posting Veteran

69 Posts

Posted - 2008-07-15 : 11:02:06
Because it will be a part of a VB application.
This application is not new, but I had to migrate it to Sql2005.
I take this opportunity to add a few useful features.

The end-user will be allowed to create a temporary clone of the main database, for experimentation with scenarios. There are other ways to do such things, but I cannot invest more than a few hours, just enough to duplicate the database and play with connection strings in the reports.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-15 : 22:35:18
Can you just call backup/restore in VB?
Go to Top of Page
   

- Advertisement -