RE: Changing object schema prefix references in plsql code

From: Powell, Mark <>
Date: Thu, 9 Jun 2011 18:34:08 +0000
Message-ID: <>

Extract the source into files and run the files through sed then reapply the updated source to database.

Editing a few scripts is neighter that hard nor time consuming when there are only a dozen. When it gets to be a hundred then code generation is my choice. You could extract the code from dba_source and use a carefully written replace to substitute the new owner as one option to consider.

From: [] On Behalf Of Patrice sur GMail Sent: Thursday, June 09, 2011 2:23 PM
Subject: Changing object schema prefix references in plsql code

I did it manually, but am wondering what larger sites do in this situation.

I imported some schemas from a very old db (8i) into a newer (11gR2) one but had to change the name of one schema.

The objects ended up in the new schema name all right, but plsql code in other schemas still included the old schema name as prefix for some objects.

If we could edit source$ it would be a cinch to change all references from the old schema name to the new one.

If I could have connected from 11gR2 to 8i using imp, I could have remapped objects though am not sure whether remap actually does change schema name references.

What do larger sites do when they have to change schema names in plsql? Do they edit each reference manually?

Is there an undocumented switch that would let one edit source$...

Maybe I overlooked a better, obvious way to do this. If yes, don't hesitate to let me know.



  • Patrice

My profiles: [] <!/profile.php?id=100000206805521> [] <> [] <> <>
Signature powered by WiseStamp<>

Received on Thu Jun 09 2011 - 13:34:08 CDT

Original text of this message