Oracle 8i | Oracle 9i | Oracle 10g | Oracle 11g | Oracle 12c | Miscellaneous | PL/SQL | SQL | Oracle RAC | Oracle Apps | Linux

Remote Scheduler Agent Installation for Oracle 11g Release 2

The remote scheduler agent was introduced in Oracle 11g Release 1 to allow remote external jobs. In Oracle 11g Release 2 it has been extended to include remote database jobs also. This article is an update of the installation described here.

Related articles.

Database Configuration

Before we can install the agent we need to do some configuration on the database server that will be initiating all the scheduled jobs. Remember, this is a one-time configuration of the controlling server.

Enable shared server by setting the SHARED_SERVERS initialisation parameter to a none-zero value.

SQL> CONN / AS SYSDBA
Connected.
SQL> ALTER SYSTEM SET SHARED_SERVERS=1;

System altered.

SQL>

Make sure the scheduler's default timezone is set correctly.

BEGIN
  DBMS_SCHEDULER.set_scheduler_attribute(
    attribute => 'default_timezone',
    value     => 'Europe/London');
END;
/

Check XML DB is installed and has the HTTP port set. If the following command returns an "object does not exist" error, XML DB is not installed on the database and must be installed before you proceed.

SQL> CONN / AS SYSDBA
Connected.
SQL> DESC RESOURCE_VIEW

If XML DB is already installed, check the HTTP port has been set using the GETHTTPPORT function in the DBMS_XDB package.

CONN / AS SYSDBA
SELECT DBMS_XDB.gethttpport FROM dual;

GETHTTPPORT
-----------
       8080

1 row selected.

SQL>

If it is not set, set it using the SETHTTPPORT procedure.

CONN / AS SYSDBA
EXEC DBMS_XDB.sethttpport(8080);

Run the "prvtrsch.plb" script, located in the "$ORACLE_HOME/rdbms/admin" directory.

CONN / AS SYSDBA
@?/rdbms/admin/prvtrsch.plb

Finally, set a password for the scheduler agent registration using the DBMS_SCHEDULER package.

EXEC DBMS_SCHEDULER.set_agent_registration_pass('agent_passwd');

Oracle Scheduler Agent Installation

Once the server configuration is complete, we need to install the Oracle Scheduler Agent on the machine we wish to run remote jobs against. In 11g Release 1 the agent software was on the Transparent Gateways disk, but in Release2 it is now on the Database Client disk, available from Oracle Technology Network. Start the installer using the following command, then proceed with the installation.

$ ./runInstaller

Select the "Custom" option and click the "Next" button.

Select Installation Type

Select the languages you require and click the "Next" button.

Select Product Languages

Enter the appropriate ORACLE_BASE and ORACLE_HOME, then click the "Next" button.

Specify Intallation Location

Select the "Oracle Scheduler Agent", then click the "Next" button.

Available Product Components

Enter the name of the server you are installing the agent on and the port you would like the agent to listen on, then click the "Next" button.

Oracle Database Scheduler Agent

Wait while the prerequisite checks take place. Correct any errors or check the "Ignore All" checkbox, then click the "Next" button.

Perform Prerequisite Checks

If you are happy with the summary information click the "Finish" button.

Summary

Wait while the installation takes place. When prompted, run the configuration script as the root user, then click the "OK" button.

Execute Configuration Scripts

Click the "Close" button to exit the installer.

Finish

Once the agent installation is complete, register it against any databases wishing to run external jobs on this machine using the schagent utility, passing in the hostname of the database and the HTTP port of XML DB. The schagent utility is present in the "$ORACLE_HOME/bin" directory of the agent installation.

$ cd /u01/app/oracle/product/11.2.0/tg_1/bin

$ ./schagent -registerdatabase oel5-11gr2.localdomain 8080
Agent Registration Password ? *************
*

Oracle Scheduler Agent Registration for 11.2 Agent
Agent Registration Successful!
$>

The schagent utility is also used to stop and start the agent on UNIX style platforms.

$ ./schagent -stop
$ ./schagent -start

On Windows platforms, simply stop and start the <home-name>_OracleSchedulerExecutionAgent service.

The agent configuration information is stored in the "$ORACLE_HOME/schagent.conf" file.

The agent is now ready for use with remote external or database jobs.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.