Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Posts
    2

    Unanswered: shell scripts to execute stored procedures

    Hi all

    could someone plss suggest the differant ways in which, scheduling of Shell Scripts which execute database(oracle8.1.7) stored procedures, is possible in a sun solaris server or unix.
    The shell scripts and the stored procedures should be triggered at specified intervals of time.
    Plss elaborate as to how this can be done using cron jobs and Control-M in particular

  2. #2
    Join Date
    Feb 2003
    Posts
    45

    Thumbs up Example

    use a cronjob to execute a script like the one below :-

    ==%<=====================================
    #!/usr/bin/sh
    ### Analyze the FRED schema
    ###

    ORACLE_HOME=/oracle8i/app/oracle/product/817
    PATH=/oracle8i/app/oracle/product/817/bin:$PATH
    ORACLE_SID=FREDDB
    export ORACLE_HOME PATH ORACLE_SID
    $ORACLE_HOME/bin/sqlplus '/ as sysdba' << EOF
    execute dbms_stats.gather_schema_stats ownname=>'FRED',cascade=>TRUE);
    EOF
    ==%<=====================================

    Ensure that you set ORACLE_HOME,PATH & ORACLE_SID as running from a CRON does not provide you with these by default !!!

    Gud Luk

  3. #3
    Join Date
    Mar 2003
    Posts
    3

    Re: shell scripts to execute stored procedures

    Do you have any idea as to how i would do a multiline replacement in sed

  4. #4
    Join Date
    Feb 2003
    Posts
    45

    multiline replace in Sed

    Yes thanks I do.

    But why ask this within an ORACLE forumn ?????


    sed 's/<search>/<replace>/g'

    NB: g means global - default is for the current line ....

    If you need UNIX scripting help then try a UNIX site.

  5. #5
    Join Date
    Mar 2003
    Posts
    3

    Post Re: multiline replace in Sed

    Sorry bout that

    But just one last question plz.

    I need to replace
    CALL "ABC"
    with

    CALL "OBE"
    DISPLAY "hello"

    without overwriting and i cant seem to get it done.
    plz

Posting Permissions

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