Oracle Management server 9i

I have submitted some jobs to the management server, however these are remaining as submitted and not proceeding to scheduled. According to the help this is because either the intelligent agent is down (its not as far as I can see) or the node was defined manually (without the intelligent agent) It suggests that I need to deregister the jobs remove the node from the console navigator and then rediscover the node while running the intelligent agent.

Despite deleting the jobs (status set to deleting) when I attempt to remove the node it tells me there are jobs still registered.

How do I deregister jobs and events?


LVL 10
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KongAWS Certified Solutions Architect - ProfessionalCommented:

You'll need to discover the nodes automatically, you'll also need to setup the management server (OMS). Assuming you've set up the OMS already:

- Log into OMS as superuser (eg sysman)
- Drop all manually added nodes
- Make sure agent is running on all nodes (including OMS machine) use agentctl start if not started
- In OEM console, right-click on nodes -> discover nodes
- Enter names of nodes (machines) or IP address
- Only after 'automatically' discovering nodes can you submit & run jobs...

Good luck!

StephenCairnsAuthor Commented:
Hi Kong
I cant get that far.

I've logged into OMS as sysman
attemped to delete the node ( I only have one)
I then get an error saying the  'the following jobs are still registered against ...' and listing databases and the jobs.
The status of all the jobs is 'Deleting'
I am assuming that deleting and deregistering is not the same thing.
So how do I 'deregister' a job?

KongAWS Certified Solutions Architect - ProfessionalCommented:

Yep, that's fine, when you try to delete the node, it'll remove all jobs & events for that node. What'll happen is you get that warning message & when you answer in the affirmative the OEM console will appear to "hang". This is because it's trying to communicate with the agent on that node to make sure things are in sync. Just leave it and after a little while (maybe more than a little while) another message will come up warning you that things will be out of sync because the agent was uncontactable etc... That's ok, answer in the affirmative and your node will be deleted!

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

StephenCairnsAuthor Commented:
Hi Kong
I get the warning message but there is nothing to answer in the affirmative just 'Errors were encountered in attempting to remove the target. Review and remove all the problems before attempting to remove the target again' with a list of the errors  and a cancel button.
Could there be a difference in the version  you are using to the one I am? I'm using 9i
any ideas?

check what's jobs in your queue?

select * from dba_jobs;

find out the job id.

then usee dbms_job.remove to remove the job. but you must log in as the owner of the job. then you can delete the job.


In the OMS JOB window, you should ABORT the job first, and then DELETE the job.
then delete the nodes.

you can also do this brute force. Log in as SYSDBA, issue "delete from dba_jobs"
Danielzt's solution also works
KongAWS Certified Solutions Architect - ProfessionalCommented:
There shouldn't be anything in the dba_jobs table because no jobs were successfully submitted...

Have you got a firewall setup?

Are you able to log into the OMS? Have you configured the agents to connect to the correct OMS using oemctl utility?

- Check that there are no jobs in the job history pane (unlikely), if so delete them.
- Stop agent on node to be deleted
- Expand Nodes folder
- Select target node, right-click -> remove/delete
- several boxes will pop up, answer yes/ok to all
- after a little while because we're forcing a node deletion and communication with the agent needs to timeout and the repository's referential integrity is cleaned up
StephenCairnsAuthor Commented:
Sorry I got desperate and rebuilt the repository, as nothing above seemed to help. However what I did find was this...

To remove "stale" job and events from the Oracle Enterprise Manager Repository:

1.Shutdown the Management Server.
$ oemctrl stop oms <username>/<password>

2.Logon into the OEM Repository database using SQL*Plus. Logon as the OEM Repository owner.
$ sqlplus <user_name>/<user_pwd>@<repository_database>

To verify the OEM Repository owner account, run the Oracle Configuration Assistant (OCA)
and click on Edit to view the username.

3.Execute the following SQL statement:
execute smp_maintenance.delete_operations_on_node('<target nodename>');

The target nodename is the hostname of the server where the "Pending Deletion" status
exists. The name must be entered identical to how it appears in the OEM Console Navigator.

For example, to delete a node called
execute smp_delete_operations_on_node('');

4. Restart the Oracle Management Server.
$ oemctrl start oms

This will remove all currently active jobs/events against the specified node. No historical data will be affected. The node itself will not be deleted.
To remove the node, log on to the Management Server through the Console and remove the
node from the Navigator.

When the OEM Console Administrator needs to remove a job or event that is scheduled
against a server, the OEM Console sends the request to the OMS. The OMS contacts the
Agent on the server and tells it to remove the job from its work queues. While the OMS is
attempting to contact the Agent, it sets the job or event to a status of "Pending Deletion".
When the Agent is contacted, this status and the object is
However, if the Intelligent Agent goes down or cannot be contacted by the OMS, the Pending
Deletion status remains in the OEM Repository. Manually removing the data for that agent is
the only work around in OEM 2.0.4.
The only problem is this was designed for Oracle 8 not 9.2 so the functions mentioned in this do not exist.
So can anyone tell me the equivalent function ( smp_maintenance.delete_operations_on_node)  for 9i?


KongAWS Certified Solutions Architect - ProfessionalCommented:
Errrm, never did it that way...

My understanding is that OEM 9.2 is a different kettle of fish to the OEM 8 days...

What I did in my instructions worked for me - I was able to connect to the OMS repository correctly (after configuring the agent via agentctl utility).

So what's status quo? Are you able to submit jobs?
StephenCairnsAuthor Commented:
Hi  Kong
Well the status is that I can now submit Jobs.
As I could not find anyway to remove the jobs I had submitted, possibly removing it from DBA_JOBS might have worked  but as there was no indication of where the dba_jobs table is, (in the repository I have now found) I gave up on that avenue.  I think I did try it but could not locate it.
As I said I ended up dropping the repository and building a new one, (bit of a sledge hammer for a nut I know), but it worked.

I would still like to know if there is an equivalent to smp_maintenance.delete_operations_on_node in Oracle 9i ???
StephenCairnsAuthor Commented:
I have just run a little test to see if jobs that have been created and deleted while the agent is of appear in the dba_jobs view of the repository. They dont.
So it looks like that would not have helped anyway.

Those points are still going.
KongAWS Certified Solutions Architect - ProfessionalCommented:
The jobs won't appear in the dba_jobs view of the OMS repository...

Is your OEM client connecting to the OMS or standalone?

Are your agents configured to connect to the OMS repository ie have you run emca on each machine?

Are you able to discover nodes automatically? What's the error message?

Do you have a firewall setup, or ports blocked? ie try the following from both OMS machine & node you want to "discover":

tnsping "(address=(protocol=tcp)(host=<hostnameofagentmachine>)(port=1748))"
tnsping "(address=(protocol=tcp)(host=<hostnameofagentmachine>)(port=1754))"
tnsping "(address=(protocol=tcp)(host=<ipaddressofagentmachine>)(port=1748))"
tnsping "(address=(protocol=tcp)(host=<ipaddressofagentmachine>)(port=1754))"

StephenCairnsAuthor Commented:
I run the OEM either standalone or connected to the OMS depending on what I am attempting to do.
The databases, repositories , management servers all run on the same server
there is no firewall.

run these from a dos prompt?

I think I found what you have been lookin' for.

In oracle9i, the equivalent to SMP_MAINTENANCE.delete_operations_on_node for oRacle8i has been moved to
another package, which makes this all confusing.

the new package is called SMP_VDJ

 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 USERNAME                       VARCHAR2                IN
 ISSUPERUSER                    NUMBER(38)              IN
 JOBIDS                         SMP_VD_INTEGERARRAY     IN
 TIMESTAMPVAL                   NUMBER(38)              IN
 TIMESTAMPVALASDATE             DATE                    IN
 TIMEZONEVAL                    NUMBER(38)              IN
 DOMAINVAL                      VARCHAR2                IN
 TARGETNAMES                    SMP_VD_STRINGARRAY      IN
 ALLTARGETS                     VARCHAR2                IN

And the corresponding SMP_maintenance package is trimmed off down to a single procedure left "RESET_SYSMAN".

As for the usage of that procedure, you have to fill in all the necessary parameters.

good luck.
KongAWS Certified Solutions Architect - ProfessionalCommented:
Yes you can run tnsping on a DOS prompt.

Do you get an error message (eg Agent out of sync) when you try to refresh or discover the node? Make sure you're logging in as sysman (or super user).
StephenCairnsAuthor Commented:
the tns pings worked fine , no errors. As I say I have now resolved the problem, just interested in a better slution than droping and building a new repository.

Is there any documentation available for this function?

KongAWS Certified Solutions Architect - ProfessionalCommented:
Glad to hear you resolved your problem.

I agree, dropping repositories isn't really a clean solution. Like I said, the steps
I recommended worked for me.

Just a hint for the future, if you have multiple oracle homes, make sure the right agent is started otherwise you'll get "agent out of sync" issues. What I do, on unix, is link the agent directory to one location.

Happy OEM'ing =)
StephenCairnsAuthor Commented:
I have not actually requested this to be deleted.
My query to community_support was how to grade the question as I am not in a position to verify the answer (thanks seazodiac)
I accept I should however of reposted this question as a new question rather than continue and I do apologise for that.

PAQed, with points refunded (250)

EE Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StephenCairnsAuthor Commented:
Thanks everyone for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.