Change log:
Date: | Author: | Version: | Changes: | Completed | Ext. | Int. | Is in Core |
---|---|---|---|---|---|---|---|
24 April 2013 | DBA | 1.0 | Note on CORE_SYS Update | Yes | X |
|
|
CORE_SYS
In consequence of conflicts occurring in Oracle name spaces, the SYS package has been replaced by the CORE_SYS package.
The CORE_SYS package includes functionality found in the existing versions of the SYS package. Internal database references to the former SYS package (in triggers and PL/SQL procedures and packages) will exist for while yet, but will be cleaned out in time, and a wrapper has been developed to handle such references in a transition period so as not to invalidate Java code.
Building the Wrapper
The wrapper is a collection of functions and synonyms located in the SYS schema, where the function name starts with "RATOR_" making it easy to identify. The function in the SYS schema calls the relevant function in the CORE_SYS package, and the synonym ensures that the name resolution works.
For example, the wrapper for the NEXTOID function in the CORE_SYS package in the RATOR schema (RATOR.CORE_SYS.NEXTOID) will work as follows:
- The function SYS.NEXTOID is called and using the synonym translated to SYS.RATOR_NEXTOID.
- The function SYS.RATOR_NEXTOID will call the function RATOR.CORE_SYS.NEXTOID
- The function RATOR.CORE_SYS.NEXTOID will do its work and will return the result to the caller through the wrapper SYS.RATOR_NEXTOID.
The SQL code required to rebuild the wrapper is distributed to the customers as the source code for security against the loss of the code during an Oracle update, as Oracle reserves the right to delete all objects in the SYS and SYSTEM schemas during an update, i.e. the wrapper will be lost.
Installing CORE_SYS Package
Required files
Installing the CORE_SYS package requires the following files:
| Installation script for the core_sys package |
| Package specification |
| Package body |
| Installation script for core_sys_wrapper functions and associated context code |
| The real wrapper code including calls to the context tracker |
| Script for creating the context area |
| Package specification for access to the context area |
| Package body for access to the context area |
Installation
The only tool to be used is SqlPlus run from the database server.
At the start of the installation scripts there are defines
for the RATOR and RATOR_CDR users. These can be changed, if the customer's setup differs from the standard (e.g. EASY).
- Connect to the database server using RDP or ssh, and copy the installation files to a directory on the database server.
- Ensure that the ORACLE_SID environment variable has been set.
- Define a folder in the DB server where alle the files are located.
- Change to that folder from the command line.
Connect to the database as SYS user with:
CMD> sqlplus / as sysdba
Installing the core_sys Software
You are connected to the database as the user SYS.
Execute the core_sys_install script with:
SQL>
@core_sys_install
- Check the terminal output carefully for any errors, fix and rerun as required.
Installing the core_sys_wrapper Software
You are connected to the database as the user SYS.
Execute the core_sys_wrapper_install script with:
SQL>
@core_sys_wrapper_install
- Check the terminal output carefully for any errors, fix and rerun as required.
Removing old SYS
- Connect to the database as RATOR_CDR.
Remove the SYS synonym with:
SQL> drop synonym sys;
Check for any code (trigger, function, procedure or package) that has become invalid because the reference to RATOR.SYS has been hardcoded.
- Fix those errors by changing the hardcoded reference RATOR.SYS to CORE_SYS.
- Connect to the database as RATOR
Remove the SYS package with:
SQL> drop
package
sys;
Remove the SYS synonym with:
SQL> drop synonym sys;
Check for any code (trigger, function, procedure or package) that has become invalid because the reference to RATOR.SYS has been hardcoded.
- Fix those errors by changing the hardcoded reference RATOR.SYS to CORE_SYS.
Final step (verification) after the CORE_SYS package is installed
If you are facing the issue regarding the function sys.WAIT_MAX(1) on the RATOR.AGGREGATION and RATOR.POST_DEPLOYMENT_VERIFICATION packages, you must follow the instruction below:
1. Aggregation package: The solution is to get rid of the function “NEXTOID” from the Aggregation package, these are the steps:
- Delete the function “NEXTOID” from the declaration itself and the following function in the body of the package:
FUNCTION NEXTOID |
---|
- In the body everywhere there is aggregation.nextoid change to core_sys.nextoid;
2. POST_DEPLOYMENT_VERIFICATION PACKAGE:
change the “sys.WAIT_MAX(2)” to “dbms_lock.sleep(2)”
This solution applies to all the similar setback you might find.