views:

16

answers:

1

How to create a new database that is the exact copy of an existing one(in sql 2000)?

e.g:Existing database : DB1

I have to create a new database named 'DB2' that is the exact copy of old database 'DB1'.How i can create it in sql 2000?

+1  A: 
  • Backup the database DB1.
  • Create a new database DB2
  • Restore the backup of database DB1 in the new database DB2
Frederik Gheysels
I don't think you need to create a new database, you can just restore the old one as the new one -though you'll want to tweak a few things when you do (true either way).
Murph
no need to create db2 first (unless using sql server 6.5)
gbn
It is indeed not necessary to create the other DB first. However, I tend to always do it like that ... It somehow feels safer to me, but I think it is merely psychological. :)
Frederik Gheysels

related questions