Kbase 18629: How To Avoid Embedding Oracle Sequence Owner Information within Rcode
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
GOAL:
How to avoid embedding Oracle Sequence Owner Information within rcode?
FACT(s) (Environment):
Oracle DataServer
FIX:
This solution applies when running rcode against identical schemas under different Oracle owners. Schema has SEQUENCES defined within the Oracle tables.
The owner information for SEQUENCES is embedded within rcode. Therefore, user must make sure that the ORACLE Owner name has not been embedded in the rcode otherwise the rcode will not run in this situation.
For example, there are two ORACLE owners; TEST and PRODUCTION, and the same rcode is being run against either schema. The following steps need to be done in order to make sure that neither TEST nor PRODUCTION is embedded in the rcode.
Follow the steps below to avoid embedding the ORACLE sequence owner.
1) Connect to the schema holder and ORACLE db.
2) Run the following code against your schema to change the sequence owner to unknown:
FOR EACH _sequence:
ASSIGN _seq-misc[2] = ?. /* set owner to unknown */
END.
3) Compile the 4gl with the SAVE option
4) Now the rcode will run against identical schemas no matter who the owner is because the schema owner is no longer embedded in the rcode.