Stored Procedure and Batch File Problem

  • May sound silly but does the input exactly match the filenames including zero and oh, five and s etc

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Yes, the filenames match exactly.

  • Can you try to change the default folder to the file folder before call xcopy?

    I.e.:

    cd /d c:\Inetpub\ftproot\adam\MisBack\Bais\

    xcopy /Q "%1.AIS" "c:\Inetpub\ftproot\adam\Mission"

    cd /d c:\Inetpub\ftproot\adam\MisBack\Bcps\

    xcopy /Q "%1.CPS" "c:\Inetpub\ftproot\adam\Mission"

     

  • After changing to the code above, the resulting log file entry was:

    You entered mission ID BKSF05-252. If you see any errors below, please check

    the existence of the files manually or check the mission name.

    Access is denied.

    Access is denied.

    Access is denied.

    Access is denied.

    Access is denied.

    Access is denied.

    Access is denied.

    Finished

  • It's security issue.

    What login are you using to run the SP? Is it a member of sysadmin?

    If it is, under what account that SQL server service is running? Does that account has permission to access the files?

    If it is not, check your proxy account. Go to management-->sql server agent-->Properties in EM, go to "Job System" tab. Uncheck the check box "

    Only users with SysAdmin privileges can execute CmdExec and ActiveScripting job steps

    "  and define a proxy account that can access the files.

     

Viewing 5 posts - 16 through 19 (of 19 total)

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