Link to home
Start Free TrialLog in
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?
Avatar of David Favor
David Favor
Flag of United States of America image

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
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PDIS
PDIS

ASKER

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
User generated image
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial