xp_cmdshell intermittent

  • Hi All,

    I have a strange scenario. I am running SQL-S 2005, Windows 2003 and SFU 3.5. We are using xp_cmdshell to initiate background tasks on the server. I have configured to allow users to run xp_cmdshell - proxy account and in Surface Area. Sometimes these calls work perfectly, sometimes they do not. They just do not do anything. Then later you run exactly the same thing again and it works perfectly. Something as simple as:

    exec

    xp_cmdshell ' ksh -c "/dev/fs/D/Work/ksh/test_02.ksh 60 > /tmp/test_02.log.J" '

    where the test_02.ksh script just sleeps and logs to an output file.

    What am I missing?? Is there a limit to the number of concurrent calls to xp_cmdshell, or some other configuration?

    Any thoughts appreciated,

    Dale.

     

  • Did you check the event logs like Application Log? it may have records that your log file could not be opened because it is used by another process. While I don't believe that there is a limitation on concurrent executions of xp_cmdshell, I do know that if a log file is open then the second process should not be able to access it (most probably)

    Regards,Yelena Varsha

Viewing 2 posts - 1 through 2 (of 2 total)

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