Oracle Scheduler (the Scheduler) can schedule and run external jobs on a remote host. The remote host does not need an Oracle database installed; however, a Scheduler agent must be installed on the remote host so that the scheduling database can start remote external jobs on that host and receive job output and error information. The agent must register with every database that must start remote external jobs on the agent's host computer. An initial setup is also required for each database that must run remote external jobs. This setup enables secure communications between the database and remote Scheduler agents.
Enabling remote external jobs involves the following steps:
This section also contains the following topics:
See Also:"About Remote External Jobs"
Before a database can run jobs using a remote Scheduler agent, the database must be properly configured, and the agent must be registered with the database. To make the registration of remote Scheduler agents secure, you must set up an agent registration password the database. You can limit the number of Scheduler agents that can register, and you can set the password to expire after a specified duration.
Complete the following steps once for each database that must run remote external jobs.
To set up the database to run remote external jobs:
Using SQL*Plus, connect to the database as the
See "Connecting to the Database with SQL*Plus" for instructions.
Enter the following command to verify that the XML DB option is installed:
SQL> DESC RESOURCE_VIEW
If XML DB is not installed, this command returns an "object does not exist" error.
Note:If XML DB is not installed, you must install it before continuing.
Enable HTTP connections to the database by submitting the following PL/SQL block:
BEGIN DBMS_XDB.SETHTTPPORT(port); END;
port is the TCP port number on which you want the database to listen for HTTP connections.
port must be an integer between 1 and 65536, and for UNIX and Linux must be greater than 1023. Choose a port number that is not already in use.
Run the script
prvtrsch.plb with following command:
Set a registration password for the Scheduler agents using the
The following example sets the agent registration password to
BEGIN DBMS_SCHEDULER.SET_AGENT_REGISTRATION_PASS('mypassword'); END;
MANAGE SCHEDULERprivilege is required to set an agent registration password. See Oracle Database PL/SQL Packages and Types Reference for more information on the
Before you can run remote external jobs on a particular host, you must install, configure, and start the Scheduler agent on that host. The Scheduler agent must be installed in its own Oracle home.
On the Windows, Linux, and UNIX platforms, the Scheduler agent software is available on the Oracle Database Gateways media included in the Database Media Pack, and online at:
The agent software for other platforms, such as IBM z/OS and IBM iSeries OS/400, is available on the Oracle Scheduler Agent media for those platforms. To install the agents on these platforms, consult the platform-specific documentation.
To install, configure, and start the Scheduler agent on a remote Windows, Linux, or UNIX host:
Log in to the remote host.
For Windows, log in as an administrator.
For UNIX and Linux, log in as the user that you want the Scheduler agent to run as. This user requires no special privileges.
Run the Oracle Universal Installer (OUI) from the installation media for Oracle Database Gateway.
For Windows, run
For UNIX and Linux, use the following command:
directory_path is the path to the Oracle Database Gateway installation media.
On the OUI Welcome page, click Next.
On the product selection page, select Oracle Scheduler Agent, and then click Next.
On the Specify Home Details page, enter a name and path for a new Oracle home for the agent, and then click Next.
On the Oracle Scheduler Agent page:
In the Scheduler Agent Host Name field, enter the host name of the computer on which the Scheduler agent is to run, or accept the default host name.
In the Scheduler Agent Port Number field, enter the TCP port number on which the Scheduler agent is to listen for connections, and then click Next.
Choose an integer between 1 and 65535. On UNIX and Linux, the number must be greater than 1023. Ensure that the port number is not already in use.
On the Summary page, click Install.
(UNIX and Linux only) When the Oracle Universal Installer prompts you to run the script
root.sh, enter the following command as the
The script is located in the directory that you chose for agent installation.
Exit OUI when installation is complete.
Use a text editor to review the agent configuration parameter file
schagent.conf, which is located in the Scheduler agent home directory, and verify the port number in the
You will need this port number when creating remote external jobs. Change any other agent configuration parameters as required.
Ensure that any firewall software on the remote host or any other firewall that protects that host has an exception to accommodate the Scheduler agent.
Register the Scheduler agent with a database that is to run remote external jobs on the agent's host computer. Use the following command:
AGENT_HOME/bin/schagent -registerdatabase db_host db_http_port
db_host is the host name or IP address of the host on which the database resides.
db_http_port is the port number that the database listens on for HTTP connections. You set this parameter previously in "Setting Up the Database for Remote External Jobs". You can check the port number by submitting the following SQL statement to the database:
SELECT DBMS_XDB.GETHTTPPORT() FROM DUAL;
A port number of 0 means that HTTP connections are disabled.
The agent prompts you to enter the agent registration password that you set in "Setting Up the Database for Remote External Jobs".
Repeat the previous step for each database that is to run remote external jobs on the agent's host.
(UNIX and Linux only) Start the Scheduler agent with the following command:
Note:On Windows, a Scheduler agent service is automatically created and started during installation. The name of the service ends with
OracleSchedulerExecutionAgent. Do not confuse this service with the
OracleJobSchedulerservice, which runs on a Windows computer on which an Oracle database is installed, and manages the running of local external jobs without credentials.
Stopping the Scheduler agent prevents the host on which it resides from running remote external jobs.
To stop the Scheduler agent:
Do one of the following:
On UNIX and Linux, run the following command:
On Windows, stop the service whose name ends with
You can disable the capability of a database to run remote external jobs by dropping the
To disable remote external jobs:
Submit the following SQL statement:
DROP USER REMOTE_SCHEDULER_AGENT CASCADE;
Registration of new scheduler agents and execution of remote external jobs is disabled until you run