DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How can I invoke OS statements from a stored procedure?

  1. #1
    Join Date
    Sep 2003
    Location
    Madrid, Spain
    Posts
    8

    How can I invoke OS statements from a stored procedure?

    Hello,

    our system has to import CSV data once a night automatically using SQL*Loader. Afterwards these date has to be analyzed.

    The first I though to have 2 daemons, a first one running on the DB host who starts SQL*Loader, and a second one running in a different application host who starts the analyzer application. But in this way I can't synchronize both daemons to start the 2nd when the 1st finishes.

    Indeed I wish the analizer daemon self started SQL*Loader, thus having only one daemon on the application host, which calls a Stored Procedure who starts SQL*Loader. But I don't know how to.

    How can I invoke OS statements from a stored procedure?

    Many thanks in advance
    MetomEnTodo
    -----------
    Computing is not an accurate science

  2. #2
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    Hi.

    This might help:

    http://www.oracle-base.com/Articles/...sFromPLSQL.asp

    Cheers

    Tim...
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  3. #3
    Join Date
    Sep 2003
    Location
    Madrid, Spain
    Posts
    8
    Hi Tim,

    many thanks for your help.

    At last we decide to start the process from a main shell script, which is also the most reasonable, who gets the CSV files via FTP, then runs SQL*Loader, and at last runs the PHP-aplication to analiuze the imported data.

    We can't use External Tables since we still use Oracle 8.1.7, but that's good to know. I work with 9i in other projects.

    The matter came out because we develop on MySQL 4.x, then we'll migrate the DB to Oracle 8.1.7 . MySQL accepts statements similar to the content of a SQL*Loader control file, as if they were SQL statements, being sent from a PHP-application. This does not work with Oracle.
    MetomEnTodo
    -----------
    Computing is not an accurate science

Posting Permissions

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


Click Here to Expand Forum to Full Width