Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Content grammar corrected

...

Use JOE to create an SQL*Plus job like this:

  • Open the wizardJOE's Job Wizard
  • Select SOSSQLPlusJob in the list of available jobs and enter a job name
  • Goto "next" to set some the parameters for the database connection etc.
  • Follow the above link See the reference documentation for the SQL*Plus job to get more information about the parameter etcjob parameters.

  • After you have finished the wizard you can insert the SQL*Plus script in the script tab of the job. 

  • Alternatively you can put the SQL*Plus script in an external file and add this filename to the parameter sql_script_file parameter.

Example:

Code Block
languagehtml/xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<job  title="Start SQL*Plus client and execute an SQL*Plus script" order="no">
    <description >
        <include  file="jobs/SOSSQLPlusJob.xml"/>
    </description>

    <params >
        <param  name="db_url" value="test"/>
        <param  name="db_user" value="test"/>
        <param  name="db_password" value="test"/>
    </params>

    <script  language="java" java_class="sos.scheduler.db.SOSSQLPlusJobJSAdapterClass">
        <![CDATA[
WHENEVER SQLERROR EXIT SQL.SQLCODE
WHENEVER OSERROR EXIT FAILURE

prompt Hello World;
/
exit;
        ]]>
    </script>

    <run_time />
</job>