Duplicating a SQL Server database from .Net

  • Thread starter Thread starter RSH
  • Start date Start date
R

RSH

I have a situation where I have almost 100 databases that when we get a new
client we need to 'copy' the template databases and rename them and I would
like to be able to write a VB .Net application to quickly make copies of the
databases and then transfer the data to the new databases.

I have the data transfer script written, i just need some way of copying the
databases one at a time with all of the table structures and renaming the
database using .Net

How would I go about doing this? Is there a SQL command that would aid in
this? Does anyone have any examples or articles on how to do this?

Thanks!
RSH
 
You should look into using DTS. You can setup the jobs, save them and run
them on a schedule or manually. You could run scripts of the structure of
the databases and then when that is complete, have it do a data copy. You
could even include security accounts if it is going to a different server.

Shawn
 
Hi,

http://www.microsoft.com/downloads/...03-c4ba-4d98-bb0b-2c9d6414071f&DisplayLang=en

Ken
------------------------
I have a situation where I have almost 100 databases that when we get a new
client we need to 'copy' the template databases and rename them and I would
like to be able to write a VB .Net application to quickly make copies of the
databases and then transfer the data to the new databases.

I have the data transfer script written, i just need some way of copying the
databases one at a time with all of the table structures and renaming the
database using .Net

How would I go about doing this? Is there a SQL command that would aid in
this? Does anyone have any examples or articles on how to do this?

Thanks!
RSH
 
Back
Top