Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Synonym for Table in different schema

102024Mar 3 2008 — edited Mar 3 2008
I am looking for a solution if possible where I can execute the follow line from within a package on a table in another schema, for which a synonym has been created.

EXECUTE IMMEDIATE 'alter table tablename disable constraint constraint_name;

The issue is this; I have to specify the schema name by prefix to execute this line of code thus;

EXECUTE IMMEDIATE 'alter table schema.tablename disable constraint constraint_name;

But, as in most organisations code is migrated from dev, to test, to qa, the code needs to be altered for different schema names across the different environments.

(we are using 10g)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2008
Added on Mar 3 2008
7 comments
491 views