You are here: Re: Database Cloning « MsSQL Server « IT news, forums, messages
Re: Database Cloning

Posted by Hugo Kornelis on 11/23/06 23:09

On Tue, 21 Nov 2006 10:39:21 -0800, George Shubin wrote:

>Using SQL Server 2005 Express.
>
>I need to periodically duplicate an entire database and rename it. Most
>tables are empty but some are to be prepopulated. I was thinking of having
>a "template" database called perhaps "EmptyDatabase", and then copy that
>into a freshly created database with a new name.
>
>Has anyone coded anything like this?

Hi George,

One thing you can do is add these standard tables to the "model"
database. Each time you create a new database, it is created as a copy
of the "model" database, so each new database will have those tables.

If you don't want these tables in ALL new databases, then I'd create one
database with the required tables and make a full backup. You can then
create copies of that database by using RESTORE DATABASE with the WITH
MOVE option.

--
Hugo Kornelis, SQL Server MVP

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация