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?
EXPERT CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.