Setting Up the Database for Remote Jobs -- 设置非本地的JOB(需要REMOTE端安装AGENT)
To set up a database to create and run remote jobs:
1. Ensure that shared server is enabled.
2. Using SQL*Plus, connect to the database as the SYS user.
3. 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.
4. Enable HTTP connections to the database as follows:
a. Determine whether the Oracle XML DBM HTTP Server is enabled:
Issue the following command:
SQL> SELECT DBMS_XDB.GETHTTPPORT() FROM DUAL;
If this statement returns 0, Oracle XML DBM HTTP Server is disabled.
b. Enable Oracle XML DB HTTP Server on a nonzero port by logging in as SYS
and issuing the following commands:
SQL> EXEC DBMS_XDB.SETHTTPPORT (port);
SQL> COMMIT;
where 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.
5. Run the script prvtrsch.plb with following command:
SQL> @?/rdbms/admin/prvtrsch.plb
6. Set a registration password for the Scheduler agents using the SET_AGENT_
REGISTRATION_PASS procedure.
The following example sets the agent registration password to mypassword.
BEGIN
DBMS_SCHEDULER.SET_AGENT_REGISTRATION_PASS('mypassword');
END;
/