Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2002
    Posts
    13

    Unanswered: Executing a DOS command from an Oracle Stored Procedure.

    Is this possible ? I know you can use the SQL HOST command online but I am trying to execute a DOS command from a stored procedure.

    Any advice for an oracle rookie ?

    Thanks in advance to all who reply !!!

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Not directly, the HOST command is a sql-plus command and can't be in a sql block. That being said, you might be able to do it by using a pipe to a seperate C procedure. That assumes that the C procedure is running on a windows machine. What are you trying to do?
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Nov 2002
    Posts
    13
    Basically I just want to execute a dos batch file.

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Without some additional programming of an external program, you are out of luck.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Apr 2004
    Posts
    246
    go to asktom.com and search for executing os command via java from a stored procedure
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

  6. #6
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by shoblock
    go to asktom.com and search for executing os command via java from a stored procedure
    Sorry, I forgot about using java 8-), but the database server still has to run windows and the stored procedure will still run on the database server.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  7. #7
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    Read up on EXTPROC. You can use this to call an external .DLL. You would need to write this dll. It would simply call the batch file (or any other specified external app if you wished).

    Hth
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

Posting Permissions

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