Duplicating a SQL Server database from .Net

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
 
S

Shawn

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
 
K

Ken Tucker [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top