Results 1 to 3 of 3

Thread: batch file

  1. #1
    Join Date
    Jan 2004

    Unanswered: batch file


    I want to excute one batch file from oracle stored procedure.
    I have oracle 9i on windows platform. Can anyone give code for it.

    (No need to search web before posting new question)

  2. #2
    Join Date
    Sep 2003
    Virginia, USA

    Re: batch file

    You cannot do this without also using an application. First, you should understand that PL/SQL cannot use the HOST command to issue operating system commands. Second, PL/SQL has packaged utilities like UTL_FILE that can write commands to files on the operating system (it can create files in the directory you specify in init.ora parameter utl_file_dir), however, it only writes your commands to a file and cannot "issue" those commands. Even if the file you are writing to is a .bat file, that .bat file cannot run all by itself. On Windows, for example, you would need to also setup a job in Windows Task Scheduler to look for and run your .bat file every x minutes. Similarly on Solaris you can setup a crontab entry in combination with a c/korn shell script.
    Author, Oracle Database 10g: From Nuts to Soup

  3. #3
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    It can be done via either EXTERNAL PROCEDURES or Java.
    However neither is trivial, but both are documented if you are
    willing to do the necessary research such as from
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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