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 2005 Forums
 Express Edition and Compact Edition (2005)
 Copying DB on same server

Author  Topic 

nsheth2001
Starting Member

2 Posts

Posted - 2006-02-16 : 14:28:46
Just installed Sql Server Express, trying to figure out how to copy a database. I'm pretty new to databases in general.

Let's say I've created a new database called test1. Now, I want to create an identical copy (data not important, I just need the table structures, keys, constraints, etc.) called test2. Not sure how I would go about doing that. I see that import/export functionality is disabled in the Express version, if that's what I would have needed. I tried copying the mdf file manually and calling "attach" - that failed. Any suggestions? Thanks!

shallu1_gupta
Constraint Violating Yak Guru

394 Posts

Posted - 2006-02-16 : 22:57:37
Hi,
You can take the Backup of Dtabase Test1 and finally Restore the Test1 backup as Test2
Go to Top of Page

nsheth2001
Starting Member

2 Posts

Posted - 2006-02-17 : 18:21:24
Thanks, that worked perfectly!
Go to Top of Page
   

- Advertisement -