Avatar of PDIS
PDIS asked on

Making a test copy of a database on the same SQL server

I need to make a copy of a SQL Database to test with, on the same SQL Server.  I tried using the copy function but it is failing with The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure.  Can you either help me fix this error or tell me another way to clone the data to a different database name?
DatabasesMicrosoft SQL ServerSQL

Avatar of undefined
Last Comment
Pavel Celba

8/22/2022 - Mon
David Favor

Easy way to do this is...

1) Dump the entire database.

2) Create a new/empty "test" database.

3) Load the dump from #1 into the empty database in #2.

Normally the dump/load process will work better for this than other approaches.

Where "better" means many timeout conditions can be avoided.
EXPERT CERTIFIED SOLUTION
Pavel Celba

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
PDIS

I created a full backup with the copy only option.  I then created a blank test database and I chose to restore.  I pointed to the full backup and pointed to my blank database.  On the files tab of the restore I verified that Restore As had the names of the new test database but when I try to restore I get the following error
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck