Skip Headers
Oracle® Database Administrator's Guide
11g Release 1 (11.1)

Part Number B28310-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

Enabling and Disabling Remote External Jobs

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 is to be permitted to start remote external jobs on the agent's host. An initial setup is also required for each database that is to run remote external jobs. For each database, this setup enables secure communications between the database and remote Scheduler agents.

Enabling remote external jobs includes the following steps:

  1. Setting Up the Database

  2. Installing and Configuring the Scheduler Agent

If at any time you want to disable remote external jobs—that is, remove the capability to start remote external jobs from a particular Oracle database—you can follow the instructions in "Disabling Remote External Jobs".

Setting Up the Database

To set up the database to run remote external jobs:

  1. Ensure that the XML DB option is installed on the database host.

    This option is installed by default. To establish if XML DB is installed, check the RESOURCE_VIEW view using the following command in SQL*Plus:


    If XML DB is not installed, this command returns an "object does not exist" error.


    If XML DB is not installed, you must install it before continuing.
  2. Run the script prvtrsch.plb on the database host using the following steps:

    1. Start SQL*Plus and connect as the SYS user.

    2. Issue the following command:

      SQL> @ORACLE_HOME/rdbms/admin/prvtrsch.plb

    You need to run this script only once on a database host.

  3. Set a registration password for the Scheduler agents using the SET_AGENT_REGISTRATION_PASS procedure.

    Before a database can execute jobs using a remote Scheduler agent, the agent must be registered with the database. To make the registration of remote Scheduler agents secure, an agent registration password must be set on the database. You can choose to only allow a certain number of Scheduler agents to register or to have the password expire after a specified duration.

    The following example sets the agent registration password for a database host to mypassword.



    The MANAGE SCHEDULER privilege is required to set an agent registration password.

Installing and Configuring the Scheduler Agent

Before you can run remote external jobs, you must install and start the Scheduler agent on the remote host. The Scheduler agent is located in the installation media for the Oracle Database Gateway, which is included in the Database CD pack. It is also available online at:

To install and configure the Scheduler agent on a remote host:

  1. Log in to the remote host.

    • For Windows, log in as an administrator.

    • For UNIX and Linux, log in as the user under which you want the Scheduler agent to run. This user requires no special privileges.

  2. Run the Oracle Universal Installer from the installation media for Oracle Database Gateway.

    • For Windows, run setup.exe.

    • For UNIX and Linux, use the following command:


    where directory_path is the path to the Oracle Database Gateway installation media.

  3. On the Products Selection page, select Oracle Scheduler Agent.

  4. On the Oracle Scheduler Agent page, enter the host name of the machine on which the Scheduler agent will run.

    When this page is displayed, the installer uses a default value for the host name. You can also choose to retain the default value.

  5. (UNIX only) The Oracle Universal Installer prompts you to run the script Enter the following command as the root user.


    where script_path is the path where the script is located. The script is located in the directory that you chose for the installation.

  6. On the Summary page, click Finish to complete the agent installation.

  7. Review the agent configuration parameters by using a text editor to view the file schagent.conf, which is located in the Scheduler agent home directory.

    Note the port number, because you will need this information when creating remote external jobs. Change any agent configuration parameters as required.

  8. Register the Scheduler agent with a database that will run remote external jobs on the agent's host. Use the following command:

    schagent -registerdatabase database_host database_xmldb_http_port

    You will be prompted to enter the agent registration password that you previously set on the database in "Setting Up the Database".

    database_xmldb_http_port is the port that the database listens on for HTTP connections. You can determine this port by issuing the following command on the database:



    The schagent executable can be found in the bin subdirectory of the newly created agent directory.
  9. Repeat the previous step for each database that will run remote external jobs on the agent's host.

  10. Start the Scheduler agent.

    • On UNIX or Linux operating systems, use the following command:

      schagent -start
    • On Windows, a service must be installed and started to start the agent:

      schagent -installagentservice

      The name of the service is OracleSchedulerExecutionAgent. Before starting the service, you can use the Services item in the Windows Control Panel to set the user that the service runs as. The Services icon is found under Administrative Tools in the Control Panel.


      Do not confuse this service with the OracleJobScheduler service, which runs on a Windows computer on which an Oracle database is installed, and manages the running of local external jobs on that computer.

Stopping the Scheduler Agent

On UNIX and Linux operating systems, the agent can be stopped with the following command:

schagent -stop

On Windows, the agent can be stopped by stopping the OracleSchedulerExecutionAgent service.

Disabling Remote External Jobs

You can disable the capability of a database to run remote external jobs by dropping the REMOTE_SCHEDULER_AGENT user. Use the following command:


Registration of new scheduler agents and execution of remote external jobs is disabled until you run prvtrsch.plb again.