7 Replies Latest reply on May 23, 2013 9:43 PM by TrevorWJNorth

    How do you register an agent of on 11.2 DB to run remote jobs on another ?

    TrevorWJNorth
      There are examples available showing how to install a remote agent on a host that doesnt have an Oracle database (using the gateway CD in 11.1 or the Oracle Client in 11.2) and from reading the documentation, it suggests you only need to install the remote agent if there is not an Oracle database on the host. If I have two Oracle databases and want to run remote jobs from DBMS_SCHEDULER on host A against data on host B, how can i register the agent as i cant find any examples that do this.

      With the remote agent installed, there are schagent either in unix or windows but i cant find this in the $ORACLE_HOME/bin of an 11.2 Enterprise install. I've run the prvtrsch.sql script as SYS and it's created the REMOTE_SCHEDULER_AGENT user and objects (which i think might be the equivalent of running schagent on the remote client) but then when i want to register the agent on the calling Oracle database, i dont know what the agent name is to specify in the CREATE_SCHEDULER_DESTINATION call.

      I've added the TNS entries for both directions but just dont have enough information to find the missing bit that lets me connect them.

      Any help appreciated, or just some pointer to know if I am in the right direction would be great

      Thanks
        • 1. Re: How do you register an agent of on 11.2 DB to run remote jobs on another ?
          TrevorWJNorth
          Does no one answering this question mean no one knows the answer ?
          • 2. Re: How do you register an agent of on 11.2 DB to run remote jobs on another ?
            damorgan
            Quite possible. Certainly not something I've yet to do.

            Do you have a support contract? If so ... open an SR.
            • 3. Re: How do you register an agent of on 11.2 DB to run remote jobs on another ?
              Ronald Rood
              Sorry, currently no time but it's explained in detail in the book "Mastering Oracle Scheduler" that I wrote.
              Check it out.

              Ronald http://ronr.blogspot.com
              1 person found this helpful
              • 4. Re: How do you register an agent of on 11.2 DB to run remote jobs on another ?
                TrevorWJNorth
                Hi Ronald

                I have your book which has been very useful in other areas I have been investigating on DBMS_SCHEDULER ( I certainly recommend it to anyone doing any serious work on DBMS_SCHEDULER) but it's not in there either - I've read the chapter ''Getting out of the database' several times and whilst it goes into great detail on how to install the remote agent on a machine without a database, I could only find a brief mention of running an agent in the database starting on page 113 where it talks about 'preparing the database for remote agent usage'.

                I've done these things on the second database but the later part of the chapter is back to running jobs on a machine without Oracle installed and use of schagent which doesn't exist in in the $ORACLE_HOME/bin on a machine that has Oracle installed so I am stuck on how to proceed.

                You also mention the enhancement request so would be interested to know what happened with this ?

                The first thing that comes to my mind when a registration has been done is: "How
                can I check this?" Unfortunately, there appears to be no way to check the status of the
                agent's registration—not even in the database. It would be very convenient to have
                an Oracle view that gives an oversight of which agents are talking with the database.
                I filed an enhancement request (7462577) for this. So with a little luck, we can check
                the status of remote agents in the near future.

                I figure if I have the name of the agent, I can use it in the CREATE_DATABASE_DESTINATION call on my calling database but I cant find the name anywhere. In SQL Developer on the SQL table of create destination, it shows this as being SYS."" and inserts whatever you select from a dropdown list but I don't know how to get any values into the dropdown so possibly the registration wasn't complete but it has created the database objects in the schema and I got no errors when running it.

                Any advise on how to proceed welcome and perhaps it can be added as an addition to the next version of the book.

                Regards
                Trevor
                • 5. Re: How do you register an agent of on 11.2 DB to run remote jobs on another ?
                  Ronald Rood
                  Hi Trevor,

                  why don't you just install a schagent next to the database installation? (in a separate ORACLE_HOME, like when no rdbms installation exists)
                  Doing so makes your remote job a bit less depend on the scheduler database.

                  Enhancement requests do take a little time to fulfill.....

                  Ronald - who likes your compliments.
                  1 person found this helpful
                  • 6. Re: How do you register an agent of on 11.2 DB to run remote jobs on another ?
                    TrevorWJNorth
                    Installing the schagent might be a workaround for running jobs outside the database but what about scheduling a job from Database A to execute remotely inside database B ?

                    There is also a licensing cost issue - you need additional licenses to run the remote agent but according to the documentation you don't need this if you have Oracle installed - just that it doesn't identify how you can determine the agent name for the remote database.

                    I've installed the agent using the rdbms package so it's present in the database and the schema objects exist, there just must be a way to determine what the agent is called ?

                    I appreciate what you say about enhancement requests, after all, your book was published in 2009 so it's only been four years - clearly not enough time yet for Oracle to consider implementing :)
                    • 7. Re: How do you register an agent of on 11.2 DB to run remote jobs on another ?
                      TrevorWJNorth
                      Hi Ronald

                      Having looked further into the "Installing and Configuring the Scheduler Agent on a Remote Host" section of the 11.2 admin guide, i think your answer is correct.

                      It is still necessary to install the remote scheduler agent from the client even if the database is already installed.

                      Then the agent needs to be configured to access the database.

                      It is only that Oracle dont require the end user to have a separate license if they have an Oracle database on that host. From the admin guide,

                      "You must install Scheduler agents on all hosts that remote external jobs will run on. You should install Scheduler agents on all hosts running remote databases that remote database jobs will be run on."

                      I believe i have the information i need to proceed although now getting connection refused when trying to run schagent -regsiterdatabase but thats an issue for another day.

                      Thanks
                      Trevor