Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Copy Database task fails

Author  Topic 

ibigfoot
Starting Member

3 Posts

Posted - 2008-08-05 : 02:54:48
Hi All,

New to this forum (new to the whole SQL Server admin thing!) so please don't flame too hard if question is in wrong spot etc etc..

I log into an instance (using the management studio) and right click on a database -> Tasks -> Copy Database.
Step through the process, specifying source and destination (with instances). Select my database to copy.

It fails on step 5 of the copy process, i have inserted the log here as it is small enough to fit.

#Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
OnPreValidate,AUSSYDSQLV01,NT AUTHORITY\SYSTEM,CDW_AUSSYDSQLD01_PRD_AUSSYDSQLV01_PRD_2,{54F88CA4-76BB-4BD6-94EA-BC1D78BBE7F5},{D9E5439B-0C33-4127-BB71-74BC74093FD0},5/08/2008 4:40:13 PM,5/08/2008 4:40:13 PM,0,0x,(null)
OnPreValidate,AUSSYDSQLV01,NT AUTHORITY\SYSTEM,AUSSYDSQLD01_PRD_AUSSYDSQLV01_PRD_Transfer Objects Task,{A0EEB792-87C1-4679-81BC-F59661E6051B},{D9E5439B-0C33-4127-BB71-74BC74093FD0},5/08/2008 4:40:13 PM,5/08/2008 4:40:13 PM,0,0x,(null)
OnError,AUSSYDSQLV01,NT AUTHORITY\SYSTEM,AUSSYDSQLD01_PRD_AUSSYDSQLV01_PRD_Transfer Objects Task,{A0EEB792-87C1-4679-81BC-F59661E6051B},{D9E5439B-0C33-4127-BB71-74BC74093FD0},5/08/2008 4:40:13 PM,5/08/2008 4:40:13 PM,0,0x,Source SQL Server instance was not specified.
OnError,AUSSYDSQLV01,NT AUTHORITY\SYSTEM,AUSSYDSQLD01_PRD_AUSSYDSQLV01_PRD_Transfer Objects Task,{A0EEB792-87C1-4679-81BC-F59661E6051B},{D9E5439B-0C33-4127-BB71-74BC74093FD0},5/08/2008 4:40:13 PM,5/08/2008 4:40:13 PM,-1073594105,0x,There were errors during task validation.

OnPostValidate,AUSSYDSQLV01,NT AUTHORITY\SYSTEM,AUSSYDSQLD01_PRD_AUSSYDSQLV01_PRD_Transfer Objects Task,{A0EEB792-87C1-4679-81BC-F59661E6051B},{D9E5439B-0C33-4127-BB71-74BC74093FD0},5/08/2008 4:40:13 PM,5/08/2008 4:40:13 PM,0,0x,(null)
OnPostValidate,AUSSYDSQLV01,NT AUTHORITY\SYSTEM,CDW_AUSSYDSQLD01_PRD_AUSSYDSQLV01_PRD_2,{54F88CA4-76BB-4BD6-94EA-BC1D78BBE7F5},{D9E5439B-0C33-4127-BB71-74BC74093FD0},5/08/2008 4:40:13 PM,5/08/2008 4:40:13 PM,0,0x,(null)

I read previously that this error was caused because the target dbase host server was not patched to SP2, so I patched to SP2 and attempted to do this again. The result of my second try is seen above.

Can anyone offer some advice on how to
1 - Fix this?
2 - Debug the problem?
3 - Suggest a new career?

Cheers..
Troy

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-05 : 12:27:52
Don't use the copy database wizard. Just use backup/restore.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ibigfoot
Starting Member

3 Posts

Posted - 2008-08-05 : 23:57:15

Hi Tara,

To restore I need to create the database manually, the logins manually, then use the restore task?

Is there a means of simply importing the database and login details automatically?

Cheers,
Troy
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-06 : 00:03:13
Here's what I use to transfer logins between instances (from my blog):
http://weblogs.sqlteam.com/tarad/archive/2008/06/24/How-to-transfer-SQL-logins-between-SQL-Server-2005-instances.aspx

In the blog, there are other solutions that you can try out too.

I don't use a restore task, just RESTORE DATABASE. And BACKUP DATABASE on the source.

And no you don't need to create the database first. The restore takes care of that.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ibigfoot
Starting Member

3 Posts

Posted - 2008-08-06 : 02:17:39

Hi Tara,

Well, I have managed to get this working using the Copy Database wizard, however I am not entirely sure why it works like this.

The problem it seems was that the machine I was running the Copy Database task from was neither the Source or the Destination machine, but rather a machine that only had MS SQL Server 2005 Manager installed on it.

When I went to the Source database host and opened the Management Studio on it, it firstly "configured" itself (this could be the difference? not sure what it installed during this phase) and then I used this Studio to perform my database copy. The cool thing about the database copy is that it copied across all my Users as well, although I am yet to test if my applications can still use them, it did set them as not enabled..

Thanks for your input, nice blog btw, handy resource..

Cheers,
Troy
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-06 : 11:46:19
BACKUP/RESTORE copies users too.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

saimike
Starting Member

1 Post

Posted - 2010-12-27 : 21:56:37
I'm having the same issue with this database copy failing, but there is no discernable error logging or diagnostics in the error: See below.

I'm trying to get the "copy" to work because I want to be able to schedule a job to run on sundays...can that be done with BACKUP/RESTORE.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-27 : 22:57:55
Yes that can be done with BACKUP/RESTORE. See the link I posted for how to automate it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -