Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to setup DBMS_SCHEDULER in Oracle 11g to run a remote database job.

I have a remote Oracle 11g R2 database on unix and a local one on Windows.

I read that you can install the oracle scheduler agent from the 11g client install for machines that don't have Oracle installed but this is not needed for running remote jobs if Oracle is present on both machines. With the remote agent installation, you run schagent and provide parameters to register the agent to the remote machine but I cant find any instructions on the web regarding how to register remote agents when both machines have Oracle installed or what to use as the agent name in this case.

I have added an entry to tnsnames.ora for the remote DB and can tnsping, etc.

If I run the dbms_scheduler.create_database_destination procedure, it requires an agent name but where can I find this for the database or how can I check that it is running on Unix or Windows?

share|improve this question
2  
Is a database link and a local job a better idea, or isn't that an option? –  Phil May 8 '13 at 19:07
    
my understanding of the functionality provided is that you don't need to install remote agents if you have an Oracle database installed - there are plenty of descriptions about how to register a remote agent to the local one so you can call remote external jobs but nothing about how to register the agent on another Oracle database. Didn't really want to use the database link route because there could be many Oracle databases I want to run jobs on from a central one so want to know the correct way to do this. –  Trevor North May 9 '13 at 20:22

1 Answer 1

Scheduler agent is part of database Oracle Home. Anyway must be manually deployed; there is no way to use the database as agent. I think that the documentation is misleading on this case. To help you I will write steps to be performed for agent configuration. I suppose that on the central database you have already enabled HTTP port (etc.). On the remote database (the one where agent have to be configure):

cd $ORACLE_HOME\bin
extjobo -createagentzip execution_agent.zip

Unzip the file into a directory under the $ORACLE_HOME\scheduler.

cd $ORACLE_HOME\scheduler
unzip execution_agent.zip

Modify the file named schagent.conf located in the $ORACLE_HOME\scheduler\execution_agent directory setting the Scheduler Agent port number to listen for connections. (the one you should have already set with dbms_xdb.sethttpport() )

PORT=<schagent_port>

You have to run the root.sh to fix the uid. (You can follow the README file in the execution_agent directory and run the root.sh). NOTE Verify a directory named /wallet exists under /execution_agent/data before running root.sh. If not create them manually and then run root.sh.

Register the database with.

set ORACLE_SID=<your sid>
cd $ORACLE_HOME\scheduler\execution_agent\bin
schagent -registerdatabase <db_host> <db_http_port>

You will be asked to input the registration password. Last start manually the agent:

schagent -start

These steps will install and configure the agent. Now you can create credentials on the central database and create the database destination. Database destination can exists along with a remote agent destination.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.