how to copy a database using microsoft sql express 2005

Hi Experts,

Thanks in advance for your help. :)

1.  using xp pro
2. using microsoft sql server express 2005  (not the standard one)
3. everything is run fine
4. want to create a copy of an existing database so we can run some test.
5.  I created a new one and tried to restore from the existing one, but it failed:  msg: the backup set holds a backup of a database other than the existing 'RPDATA2' database.  (microsoft.sqlserver.express.smo)

using microsoft sql server management studio express.

Thanks for your help
goodfinderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RayData AnalystCommented:
restore the backup to a NEW (not yet created database)...Where you previously set the database to "restore to" there should be an option to create a new one (you may have to type in a new name before it prompts about creating a new one).  You'll need to check the overwrite data box.  <-- That may've been the issue with your first try.
0
goodfinderAuthor Commented:
will try to turn on the overwrite data box.  thanks Ray.
0
HuaMin ChenProblem resolverCommented:
Can you try to instead copy mdf and ldf files for copying the database schemas?
1
RayData AnalystCommented:
When you copy MDF and LDF, you get data too.  Also, attaching them is tricky (but can be done).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.