Results 1 to 3 of 3

Thread: xp_cmdshell

  1. #1
    Join Date
    Jul 2003
    Posts
    45

    Unanswered: xp_cmdshell

    To anyone that can help...

    We have a problem when trying to execute an .exe file using xp_cmdshell:

    exec master.. xp_cmdshell 'c:\pcplus\refiner.exe'

    Query analyzer seems to run the query with no problems, returning a value NULL but nothing else. It doesnt seem to run the file but doesnt return any errors either..any ideas as to why?????

    Thanks
    If riding in a plane is flying, then riding in a boat must be swimming. To experience the element, get out of the vehicle. Skydive!

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    xp_cmdshell is asynchronous command. The return value only specify that the xp_cmdshell started the process, but nothing else. Try a xp_cmdshell "dir" to test

  3. #3
    Join Date
    Jul 2003
    Posts
    45
    We have tried it with a number of applications, all of which are on the c: of the server, i.e. notepad, calculator etc...

    but it's as if SQL server doesnt know when the application has finished its process...theres no indication from sql server that the program has been been either executed or terminated......

    are there any oyher ways of running an ext. app?
    If riding in a plane is flying, then riding in a boat must be swimming. To experience the element, get out of the vehicle. Skydive!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •