Solved

Oracle Management server 9i

Posted on 2003-10-30
22
2,697 Views
Last Modified: 2013-12-03
Hi
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?

Thanks

0
Comment
Question by:StephenCairns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 7
  • 2
  • +2
22 Comments
 
LVL 2

Expert Comment

by:Kong
ID: 9655386
Stephen,

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!

K
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9655440
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?

Cheers
0
 
LVL 2

Expert Comment

by:Kong
ID: 9655644
Stephen,

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!

K
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 10

Author Comment

by:StephenCairns
ID: 9655714
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?
Cheers
Steve
0
 
LVL 8

Expert Comment

by:Danielzt
ID: 9657868

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.

 dbms_job.remove(job_id);

0
 
LVL 23

Expert Comment

by:seazodiac
ID: 9658880
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
0
 
LVL 2

Expert Comment

by:Kong
ID: 9661111
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
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9674702
Hi
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>

NOTE:
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>');

NOTE:
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 sun123.oracle.com:
execute smp_delete_operations_on_node('sun123.oracle.com');

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.


EXPLANATION:
===========
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?

Cheers


0
 
LVL 2

Expert Comment

by:Kong
ID: 9675359
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?
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9675636
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 ???
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9675658
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.
0
 
LVL 2

Expert Comment

by:Kong
ID: 9675753
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))"

0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9675799
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?
0
 
LVL 23

Expert Comment

by:seazodiac
ID: 9675862
Stephen:

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

PROCEDURE DELETEJOBSAGAINSTTARGETS
 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
 TARGETCOUNT                    SMP_VD_INTEGERARRAY     IN
 NOPERMISSIONSARRAY             SMP_VD_INTEGERARRAY     OUT
 ACTIVEFIXITJOBSARRAY           SMP_VD_INTEGERARRAY     OUT
 INVALIDJOBIDSARRAY             SMP_VD_INTEGERARRAY     OUT


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.
0
 
LVL 2

Expert Comment

by:Kong
ID: 9675878
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).
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9691684
Kong
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.

seazodiac
Is there any documentation available for this function?

Cheers
0
 
LVL 2

Expert Comment

by:Kong
ID: 9691707
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 =)
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9737119
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.

regards
Steve
0
 

Accepted Solution

by:
SpazMODic earned 0 total points
ID: 9755363
PAQed, with points refunded (250)

SpazMODic
EE Moderator
0
 
LVL 10

Author Comment

by:StephenCairns
ID: 9768181
Thanks everyone for your help.
Cheers
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question