Oracle
CAST extractor for Oracle
Configures a connection to a live Oracle database and will perform an extraction to file using CAST's own SQL extractor.
Note that:
- the database does not need to be online during the analysis process in the CAST Management Studio.
- Note that you do NOT need to install a compatible client connection layer (for the target RDBMS) on the machine on which you are running the CAST Delivery Manager Tool.
Host name | Used to configure the host name of your database server. You can also enter an IP address if required. | |||||||||
Port | Used to configure the port number for accessing your database. This field will only be displayed if you selected Port from the Instance identification option. Default RDBMS port settings are as follows:
| |||||||||
Instance identification | Used to configure the database server access mode type (Service or SID). Select an appropriate access mode for your database. | |||||||||
Service | Used to configure the Service name for accessing your database server. This field will only be displayed if you selected Service from the Instance identification option. Please note that when connecting to a "pluggable database" (for example in Oracle 12c and above) you MUST use this Service option - the SID option will not function. | |||||||||
SID | Used to configure the SID name for accessing your database server. This field will only be displayed if you selected SID from the Instance identification option. | |||||||||
Credentials | Select this option to enable the User/Password fields below. This is required if your target database server requires an authenticated connection. Notes
| |||||||||
User name | Used to configure the user name that has sufficient privileges to access the required schemas on the selected RDBMS for packaging purposes. Schema access rights for extraction action In order to carry out an extraction of the required schemas, the person in charge of the extraction (Delivery Manager or DBA) must use one of the following Oracle users: | |||||||||
Extraction user - CAST highly recommends using a dedicated extraction user with specific privileges in order to access the required data for extraction. When using this dedicated extraction user, CAST will query the DBA_* views to access the required data - these views give access to ALL objects. Please also read the section below entitled "Note about the DBA_ARGUMENTS view and the dedicated extraction user". To create the dedicated extraction user, please run the following script as the SYS user - it will create the dedicated user and then grant the required privileges to the user (where USER_FOR_EXTRACTION is the dedicated extraction user):
| ||||||||||
SYSTEM - When it is not possible to use the dedicated extraction user, CAST recommends using the SYSTEM user instead. CAST will query the DBA_* views to access the required data - these views give access to ALL objects. | ||||||||||
Other Oracle users - When it is not possible to use the the dedicated extraction user or the SYSTEM user as outlined above, it is possible to use any other user (i.e. non-DBA user) to run your extraction - for example: the schema owner user. However, there are several drawbacks to doing this and CAST therefore does not recommend using this type of user:
Note also that in order for the ALL_* views to be queried, the ALL access mode option (see below) must be explicitly selected. By default this option is not selected, which automatically prevents the CAST Delivery Manager Tool from using the ALL_* views to access the required data. If the option is not selected, then the extraction will fail. | ||||||||||
Note about DBA_MVIEW_COMMENTS / ALL_MVIEW_COMMENTS views and Oracle 9.xThe views DBA_MVIEW_COMMENTS / ALL_MVIEW_COMMENTS do not exist on Oracle 9.x, therefore when running an extraction on Oracle 9.x in whatever mode (extraction user/SYSTEM/other Oracle user), the extractor will use DBA_TAB_COMMENTS to extract comments on materialized views instead. Results are not impacted. This will typically be displayed in the log as follows:
Note about the DBA_USERS view and the dedicated extraction userSituation
Action
Impacts
Note about the DBA_ARGUMENTS view and the dedicated extraction userSituation If you are using the dedicated extraction user (as recommended and outlined above) to perform your extraction, a view called DBA_ARGUMENTS is queried to gain access to the data required for extraction. On some Oracle Servers (Oracle 10.2.0.4.0 or any earlier Oracle 10 version and all Oracle 9 versions) this view is not present by default, therefore the following is true: Impacts The extraction will succeed, but:
Note that there is no impact on the source code for unwrapped function/procedures because this code is not generated and is instead extracted as is. Options Two options exist if you find yourself in this situation:
| ||||||||||
Password | Used to configure the password that corresponds to your User name configured above. | |||||||||
Remember password | This option enables you to force the CAST Delivery Manager Tool to save the database access credentials you have entered above. Choosing an option or not has no impact on the extraction (i.e. the CAST Delivery Manager Tool can still access the required resources). However, if you are creating subsequent Versions of the same schemas on the same server, you can choose to store the password in which case you will not need to re-enter it. There are two save options:
| |||||||||
Schemas to extract | This section enables you to limit the packaging to certain schemas on the target RDBMS:
| |||||||||
JVM Memory Size | The CAST extractors are Java based and require the use of the JRE JVM (Java Virtual Machine). This option allows you to configure the Maximum Java Heap Size of your JVM for use during the database/schema browse and extraction processes. By default 1GB of memory is allocated and in most scenarios this value can be left as it is. You may need to change the amount of memory allocated to the JVM if you are getting out of memory exceptions for the Java Heap Space when you either browse to select a database/schema or when you use the Package action to invoke the extraction - this can occur more specifically when attempting to extract a large single database/schema or multiple databases/schemas. Please increase the memory allocation until you no longer receive errors, however, please bear the following in mind:
| |||||||||
Anonymize log file | Use this option to hide sensitive information in the log file. When activated, the log file will contain stars in place of the host name/server name, schema name, username and password (i.e. server connection information):
Note that this option is not activated by default because anonymizing connection information can make it more difficult to troubleshoot errors or issues during the extraction phase. | |||||||||
ALL access mode | This option (when selected) explicitly allows the CAST Delivery Manager Tool to query the ALL_* views to access the required data - these views only give access to objects that the user is entitled to access. This means that CAST cannot guarantee that the extraction will contain all the required data. In addition, performance of the extraction will be reduced. By default this option is not selected, which automatically prevents the CAST Delivery Manager Tool from using the ALL_* views to access the required data. In other words, if the user name that you have entered into the "User Name" field above does not have sufficient rights to query the DBA_* views then the CAST Delivery Manager Tool will attempt to query the ALL_* views - if the ALL access mode option is not selected, then the extraction will fail. |
Dealing with Oracle Schemas that move from one Server to another or from one Instance to another
When a schema is delivered in V1 from Server A / Instance 1 and is then delivered in V2 from Server B / Instance 2 (i.e. in the CAST Delivery Manager Tool the cloned package in V2 has been modified to point to the same identical schema on Server B / Instance 2) the default behavior on re-analysis of the same schema on a different Server or Instance will consider that the schema is in fact two distinct schemas even though they have the same name. This causes "noise" when consulting version comparison data (the schema will appear as deleted / added between V1 and V2 snapshots), in violation monitoring (removed / added) and it invalidates the content of the Action Plan.
If you find yourself in this situation, you can use a tool provided by CAST that will automatically modify the V2 schema extraction data to contain the same Server / Instance name as used in V1. In this way, the schema will not be considered new in snapshot V2. The tool must be run BEFORE you generate the V2 snapshot. You can find out more information about this in the CAST Management Studio help.
Note about moving schemas from on server/instance to another:
If a schema has been moved from one server/instance to another, you should ensure that the original and the new schema are fully identical. Any differences will be picked up by the CAST analyzer. In particular, the Oracle IDs (OIDs) must be maintained: CAST recommends using the impdp parameter transform=OID:y:type to move the schema. This will preserve the original OID values.
Reuse existing CAST extractor/delivery output
If you have output from previous extractions carried out with a standalone CAST SQL Extractor, then you can use these options to package this output for subsequent analysis in the CAST Management Studio.
In the standalone extractors, extraction is a two step process and results in two outputs:
- extraction to file (step 1)
- transformation of these files and delivery (step 2)
The option you choose here in the CAST Delivery Manager Tool depends which output you want to use:
Reuse existing CAST extractor output | Requires a .castextraction file. Corresponds to the output of step 1. | |
Reuse existing CAST delivery output | Requires a .uaxdirectory file. Corresponds to the output of step 2. | Please note that if your existing CAST extractor output is for an entire Oracle instance you must modify the .uaxdirectory file before you can:
Please add the following line to your .uaxdirectory file (you can edit it with a Text editor) within the <UAXFiles> tag: <UAXOption name="schema" value="SCHEMA1,SCHEMA2,SCHEMA3"/> Where SCHEMA1 refers to an Oracle schema you want to package. If you need to package ALL the schemas, you must manually enter them all by name in this line. An extraction of the entire Oracle instance would have been achieved as follows: |
Regardless of the option you choose, the configuration is identical:
Server Version File | Use this option to select either the .castextraction or the .uaxdirectory file. |
Schemas to extract | See identical option above - this option functions in exactly the same way, however, for the Notes: | option, no connection to a server is made. Instead, the contents of the .castextraction or the .uaxdirectory are explored and the schemas that were previously extracted will be offered for selection.
JVM Memory Size | This option is only visible when you have selected the Reuse existing CAST extractor output option. When you have chosen this option you will select a .castextraction file - this file is in a format that requires further processing by CAST using Java based extractors before it can be packaged for delivery. As such, this option allows you to configure the Maximum Java Heap Size of your JVM for use during the database/schema browse and extraction processes. By default 1GB of memory is allocated and in most scenarios this value can be left as it is. You may need to change the amount of memory allocated to the JVM if you are getting out of memory exceptions for the Java Heap Space when you either browse to select a database/schema or when you use the Package action to invoke the extraction - this can occur more specifically when attempting to extract a large single database/schema or multiple databases/schemas. Please increase the memory allocation until you no longer receive errors, however, please bear the following in mind:
|