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)
 Copying Databases

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-01-23 : 08:01:18
James writes "I saw you answer to someone on creating a database and how the database created is based off of the model database. Is it possible to create a new database and base it off of a database other than model, for instance one that i create during program install?

also, if there are 'default' values that i want in the database, would putting these in the model database cause the data to be present in new databases i make. If not is there a way to do this.

Basically, I want to be able to make an exact copy of a database through my program, call it a test database, so when it is first created, it is exactly the same as the database that is actual used during live run.

-James"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-23 : 08:23:46
Use Restore method. Look for RESTORE DATABASE in BOL, SQL Server help file

Also refer these
http://support.microsoft.com/default.aspx?scid=kb;EN-US;314546
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071&Product=sql2k

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -