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
 SQL Server Administration (2005)
 How to know the status of XCOPY in SQL Server

Author  Topic 

venkath
Posting Yak Master

202 Posts

Posted - 2010-03-15 : 06:01:02
Hi All

I have initiated a 5GB file copy from one server to another server using xp_cmdshell 'XCOPY sourcefile destfile'

I would like to know is there a way or a DMV that we can use to know the status of XCOPY? like how much % is copied and how much is left to copy..etc.

Help on this is greatly appreciated.

Thanks in advance.

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-03-15 : 07:50:13
I don't think this is possible. The only way I can imagine to get this kind of information is to trigger another process that that gets the pid of the running windows process, connects to it somehow and reads the output of the window. But I'd consider this to be quite a hack...

...unless you can get the xcopy to write it's status to a separate logfile...? I know robocopy does this (which imho is a far better choice).

- Lumbago
If the facts don't fit the theory, change the facts. Albert Einstein
Go to Top of Page
   

- Advertisement -