all groups > sql server new users > september 2006 >
You're in the

sql server new users

group:

Copy Database


Copy Database Tom Roth
9/21/2006 2:42:02 PM
sql server new users:
Running SQLServer2000 SP3. I have a database (DB1). I need to make a copy
of that database (DB1_Test). The new database (db1_Test) should have all of
the structures, permissions, etc. I don't want any of the data. Can someone
help me?
--
RE: Copy Database Tom Roth
9/21/2006 2:45:02 PM
I would also like to note that both databases are going to be on the same
server.
--
Tom


[quoted text, click to view]
Re: Copy Database Arnie Rowland
9/21/2006 3:05:51 PM
In Enterprise Mangler, on the [Tools] menu, select the Data Transformation
Service Export Wizard.

AS you step through the screens, select your new database name, and later
on, select [Copy Objects and Data]. You will then be given the opportunity
to select objects and you can unselect the data.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


[quoted text, click to view]

Re: Copy Database Hari Prasad
9/22/2006 12:00:00 AM
Hi,

If you need users,permissions and all objects except data then best option
is:-

1. backup the database using DB1 (See Backup Database in books online)
2. Restore the database with name DB1_Test (See Restore Database WITH MOVE
in books online)
3. Write a script to truncate data from all tables in DB1_Test. Ensure that
you need to consider FK relationship.

Thanks
Hari
SQL Server MVP

[quoted text, click to view]

AddThis Social Bookmark Button