I'm trying to copy a database. When going through the Copy Database Wizard, I'm getting a Execute SQL Server Agent Job error. The error states
The job failed. Check the event log on the destination server for details
Performing operation
Add log for package (Success)
Add task for transferring database objects (Success)
Create package (Success)
Start SQL Server Agent Job (Success)
Execute SQL Server Agent Job (Error)
Error:
The job failed. Check the event log on the destination server for details. (Copy Database Wizard)
I can't seem to find what causing this problem. Am I using the correct approach? I just need to copy this database. Thanks in advance.
On either the source or destination SQL Server instance, launch the Copy Database Wizard in SQL Server Management Studio from Object Explorer and expand Databases. Then right-click a database, point to Tasks, and then select Copy Database.
The Copy Database wizard does not delete a source database if you select the Copy option. You cannot copy a database from the source SQL Server instance to the target if the exact same database is hosted on the target SQL Server instance. In this case, you must select the Override option.
if you are trying to Clone your database on the same server try this:
Databases
and select Restore Database
From Database
drop-down list in the Source for restore
sectionTo database
field in the Destination for Restore
section - this cannot be the name of an existing database.Check the Windows Event Log.
Here is an example.
Here are some of the errors and resolutions we encountered.
Unable to determine if the owner (...) of job ... has server access (reason: Could not obtain information about Windows NT group/user '...', error code 0x54b. [SQLSTATE 42000] (Error 15404)).
We needed to make sure that during the Copy Database Wizard, the account with which we signed in to the destination server had the appropriate privileges and that those privilege were obtainable (we eventually used the sa
account.) That resolved the above warning.
Access is denied
We needed to make sure that the local SQL Server Agent has appropriate privileges on the local server. So, we made the SQL Server Agent logon as Local System. That worked because Local System is a sysadmin in our SQL Server instance.
Could not read metadata, possibly due to insufficient access rights.
We needed to give the Local System account further privileges.
xp_regread() returned error 5, 'Access is denied.'
This stymied us and we asked another question: xp_regread() returned error 5, 'Access is denied.'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With