Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    15

    Red face Unanswered: Kill cmd process started from SQL Server Agent

    Hi!
    I have a small problem , but it's still a problem.
    I have a SQL Server Agent job that runs a .cmd file. This CMD is logged to a textfile.
    This process is locked, waiting for me to type a password, but I have nowhere to type that pass.

    What I want to do is kill the process that i locking the logfile, because since the logfile is locked, the job cannot be started again (and it's a scheduled job).
    The jobs status is 'Not Running'.
    I have solved the problem by making the cmd write to another logfile, so the schedule will work, but the file is still locked, and I don't want to restart the server since it's a productionserver.

    How to I find the process that is initialized from SQL Agent, and kill it?

    Thanks!

    Bix

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Could be you'll have a big problem...

    what does the cmd file execute?

    If it's ANY type of GUI you could hang the box....

    What's in the cmd file?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    15

    No GUI

    Nope, no GUI is executed.
    It's juat a matter of reading textfiles, formatting the data and inserting it into the db.

    The part that hangs is a "Net Use"-command for accessing a networkshare.
    I have added the user and pass so that this does not happen again...
    Last edited by bix; 05-06-04 at 16:27.

  4. #4
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    I'm not sure about this, but I believe you will find cmdexec in your system processes. You can kill the PID and it should take care of you.
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  5. #5
    Join Date
    Sep 2003
    Posts
    522
    killing the parent process without terminating the child may lead to system instability. cmdexec does not take care of anything that had been invoked from it.

Posting Permissions

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