Pass parameter to DTS ActiveX script

  • I have a requirement to copy a backup file from one drive to another after a asuccessful back up and then delete the previous x days backups from the target drive.

    I have an activex dts package to do this, but would like to make it parameter driven so that for different databases, which get backed up and copied to different volumes and at different times, I can pass in source directory, target directory and number of days into the DTS package. 

    Is there anyway to achieve this

    Cheers

     

     

     

  • You don't need to use DTS.

    Using xp_cmdshell, execute  ROBOCOPY (from the Windows Resource Kit) to copy the files. You could use standard Copy or XCopy, but ROBOCOPY is a lot more reliable. Again using xp_cmdshell you can run a DIR command to list the files and then choose which ones to delete.

    This makes it a simple stored procedure which you can run at the end of the backup process.

     

    --------------------
    Colt 45 - the original point and click interface

  • Phil,

    How does one access cursor of output that is returned to be able to interrogate the results

  • Sorry Phil

     

    This should have said

     

    How does one access cursor of output that is returned to be able to interrogate the results of xp_cmdshell 'dir'

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply