Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Slightly OT: Java in the DB

RE: Slightly OT: Java in the DB

From: John Flack <JohnF_at_smdi.com>
Date: Tue, 24 Feb 2004 08:59:15 -0500
Message-ID: <91AFBA9B76078B4E8340A383EADEF1DB7EE541@syn2kex1.smdi.com>


You say that you have an administrative database with DB Links to the other databases? I've done something like what you want to do.

What I did was to create a password change function in a COMMON schema in each database, AUTHID CURRENT_USER, with execute granted to public, returning TRUE if the password change succeeds. The administrative database has public DB links to the other databases WITHOUT ids and passwords so that it uses the current username and password. Then in the master password change procedure (also AUTHID CURRENT_USER and granted to public), before changing the master password, it loops through the DBA_DB_LINKS view and runs the password change function in each database with EXECUTE IMMEDIATE. It logs and reports failed password changes. The master password procedure finishes by calling the same password change function locally. We had a little trouble getting the passwords syncronized before the first run, but it worked well after that.

We don't use this anymore, because we now authenticate for SSO with LDAP - you might want to consider this option.

-----Original Message-----

From: Vergara, Michael (TEM) [mailto:mvergara_at_guidant.com] Sent: Sunday, February 22, 2004 4:13 PM
To: Oracle-L (E-mail)
Subject: Slightly OT: Java in the DB

Hi All...sorry for the semi-OT post, but I'm trying to do a DBA function using Java and have run into another problem.

I'm trying to reset user's passwords. That's the whole goal. I have a 'administrative' database that has connections (TNS,=20 some DB links, etc) to other databases. I want to use the OCINewPassword function call in a stored Java procedure to execute the password changes on remote databases. I have=20 this neat code that I cobbled together from hints on MetalLink and other places, and it works...but.

The Java source compiles.
It Loads into the DB with loadjava.
I build a PL/SQL function wrapper.
It executes. It changes the password and exits the remote DB

Great. This is good.

But...when I enter 'exit' at the SQL prompt, the process hangs, spins up to taking 100% of the CPU, and throws various errors in the trace file. I have to kill the client process with a 'kill -9' command to get the process back. There is one error I cannot=20 figure out. It's an ORA-21607 error. It says "Initialize the=20 memory service handle". Huh? What in the blinking blue blazes=20 does that mean?

Any suggestions? I'm gonna post a similar message on the Java list, but I thought that they'd not know about an ORA-21607.

Help!

Thanks,
Mike



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html

-----------------------------------------------------------------
Received on Tue Feb 24 2004 - 07:58:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US