Error creating Database Control

For our production environments we use Oracle Enterprise Manager and Grid Control to monitor our databases and applications. Not all of our dev/test environments are hooked into this for various reasons.. There is one 10g feature i'd like to try out in a sandbox but instead of hooking the environment into Grid Control I thought I would just use Database Control.

Note:278100.1, How To Drop, Create And Recreate DB Control In A 10g Database, describes the process which seems pretty straight forward. However, while running the command to drop or recreate the repository the following error graced my screen:

oravis@myserver=> ./emca -deconfig dbcontrol db

STARTED EMCA at Jan 14, 2008 11:07:40 AM
EM Configuration Assistant, Version Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:
Database SID: MYSID

Do you wish to continue? [yes(Y)/no(N)]: Y
UnsatisfiedLinkError exception loading native library: njni10
Exception in thread "main" java.lang.UnsatisfiedLinkError: get
at Method)

I have never encountered this error before so the first step was a quick search of metalink, which didn't turn up any useful notes or discussions. A couple seemed to be related but the solutions didn't resolve my issue.

So the next step was to do some more investigation. The njni10 libraries existed under the $ORACLE_HOME/lib and $ORACLE_HOME/lib32 directories, so that wasn't the issue. Next I used the unix command ldd which lists the dependencies for executables or shared objects.

oravis@myserver=> ldd lib32/
warning: ldd: lib32/ is not executable => (file not found) => /mnt/app/visdb/1020_64bit/lib32/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/ => /usr/lib/

Can you see the problem? The problem is that library doesn't exist for some reason. Since this is a cloned EBS environment I checked the source system and indeed the file is there. To make sure it wasn't a problem specific to this environment I checked some other cloned instances and most of those didn't have the file either.

This library can be recreated by running the following commands:

oravis@myserver=> cd $ORACLE_HOME/rdbms/lib
oravis@myserver=> make -f client_sharedlib
/mnt/app/visdb/1020_64bit/bin/genagtsh /mnt/app/visdb/1020_64bit/lib/ 1.0

If you run ldd against the library again you will see that the dependency issue has been resolved and I could proceed with the directions in the note above to create database control.

oravis@myserver=> ldd lib32/
warning: ldd: lib32/ is not executable => /mnt/app/visdb/1020_64bit/lib32/

Another quick comment. When you run the command to create the database control repository, don't cut and paste your password. It doesn't like it and causes emca to fail. As to why I cut and paste the password? Our passwords are in an encrypted file and it was quicker to cut and paste it than type it in.

The next step is to verify if this is a cloning issue and if so, how to resolve it. So the next time I have to clone an environment i'll be keeping a watchful eye.


Fuad Aslanov said...

I'm having problem in one of the clone databases (virtual machine).
OS - Win2003R2
DB version: 10gR2

if i do
emca -config dbcontrol db -repos create

it hangs saying Creating EM repository (this may take a while).
I left it for a night but process didn't finish.
I then just close console and open it again. Drop semi-created repository using emca -repos drop and repeat process again. But still the same.

I don't know what could be a reason.

Dave said...

Hey, you can try preceeding your emca command with strace and seeing if there are any messages there that will lead to the cause.

As well, take a look at notes:

How To Drop, Create And Recreate DB Control In A 10g Database
Doc ID: 278100.1


Quick Guide to Avoid Issues in Creating DB Control Using EMCA
Doc ID: 750768.1

Because this is a cloned environment, it may be due to some objects from the source system causing problems. Try following the first note which describes how to drop DB Control objects. You may have to do it manually.

Sridevi Koduru said...

Sridevi Koduru (Senior Oracle Apps Trainer
LinkedIn profile -
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, Oracle Manufacturing, OAF, ADF, SQL, PL/SQL, D2K at | +91 - 9581017828.

Jennifer N said...

Thanks and Regards. Oracle Apps R12 Training Videos at affordable cost. please check