Summary: This section describes how to prepare and deliver the source code of your SQL database.
Preparation - Source code discovery
Discovery is a process that is actioned during the packaging process whereby CAST will attempt to automatically identify projects within your application using a set of predefined rules. Discoverers are currently embedded in CAST AIP:
You should read the relevant documentation for each discoverer (provided in the link above) to understand how the source code will be handled.
Using CAST AIP Console
See Application onboarding for more information.
AIP Console expects either a ZIP/archive file or source code located in a folder configured in AIP Console. You should include in the ZIP/source code folder all the output from the CAST Database Extractor, i.e:
.castextraction | AIP Console supports this file type as follows:
When a .castextraction file is delivered to AIP Console, it will be transformed automatically into the required .uaxDirectory/.uax./src files during the source code delivery process. Technically the following occurs:
With regard to T-SQL .castextraction files:
|
---|---|
| Supported for both PL/SQL (Oracle Server) schemas and T-SQL (Microsoft SQL Server/Sybase ASE/Azure SQL) databases. |
CAST highly recommends placing the files in a folder dedicated to your extraction. If you are using a ZIP/archive file, zip the folders in the "temp" folder - but do not zip the "temp" folder itself, nor create any intermediary folders:
D:\temp |-----LegacySQLExtaction |-----OtherTechno1 |-----OtherTechno2
Using legacy CAST Delivery Manager Tool
How do I add a source code package to my delivery
See How do I add a source code package to my delivery.
What you should package?
When creating packages to discover and extract your SQL application you should create them as listed below:
In order to analyze SQL databases/schemas (Microsoft, Oracle and Sybase) that are part of an Application, the analyzer embedded in CAST AIP requires that the databases/schemas are delivered for analysis in "offline" file format. In other words, CAST AIP does not connect to the database/schema during the analysis and instead the "offline" files are analyzed. This delivery/analysis method provides a distinct performance boost and allows the delivery to be performed by a dedicated DBA.
Although the CAST Delivery Manager Tool already includes a specific "extractor" to support the extraction of SQL databases/schemas, in practice the use of the CAST Delivery Manager Tool in certain environments may not be possible due to security constraints or other obstacles. As a direct response to this, CAST provides a standalone Database Extractor that has been decoupled from the CAST Delivery Manager Tool. This extractor is identical to the extractor provided in the CAST Delivery Manager Tool, but it can be run without the need to download and install the CAST Delivery Manager Tool.
Therefore, either:
- the target schemas/databases are extracted and packaged by the CAST Delivery Manager Tool (via a JDBC connection) into files that can be analyzed by the SQL Analyzer embedded in CAST AIP.
- the target schemas/databases are extracted and packaged by the standalone CAST Database Extractor into files that are then fed into the CAST Delivery Manager Tool and can be subsequently analyzed by the SQL Analyzer embedded in CAST AIP.
If you want to use the CAST Delivery Manager Tool to extract your live databases/schemas
Package | Mandatory? | Wizard | Extraction | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Use the Oracle Server / MS SQL Server / Sybase options in the CAST Delivery Manager Tool: Click to enlarge Then choose to use the database extractor embedded in CAST AIP: | Fill in the connection details for your database:
Then, choose the schema(s) you want to include in the package. There are two methods of doing this:
Note that if you intend to extract and analyze multiple schemas and you expect to be able to view inter schema links after the analysis, please ensure that all schema/databases from the same instance are included in the same CAST Delivery Manager package. |
If you have already used the standalone CAST Database extractor
Package | Mandatory? | Wizard | Extraction | ||||
---|---|---|---|---|---|---|---|
1 | Use the Oracle Server / MS SQL Server / Sybase options in the CAST Delivery Manager Tool: Click to enlarge Then choose the reuse existing output options so that you can feed in the results of the CAST Database Extractor. Note that there is an additional option Reuse existing extractor output, however, this should only be used when you have used the "Extract" only option in the CAST Database Extractor. | Fill in the details of your standalone CAST Database Extractor output:
|
How do I package the Version?
See How do I package the Version for more information.
2018-01-08 13:37:33.467 - Some objects from 'Schema A' have been compiled during the extraction: initial 'Last Compilation Date' is '2018-01-08 13:36:57.0', new 'Last Compilation Date' is '2018-01-08 13:37:13.0'
2018-01-08 13:37:33.470 - Disconnected!
Execution succeeded!
If an object is modified during the Package action, then an error is raised in the log and the extraction will fail with the message Execution failed (this means that the .castextraction file will be generated but must not be used: a modification will change the object scripts and the schema will therefore be inconsistent and the Package action must be re-run). Example from the log:
2018-01-08 13:39:27.742 - Invariance error #-10: 'Schema A' has been modified during the extraction: initial 'Last Modification Date' is '2017-07-17:11:22:08', new 'Last Modification Date' is '2018-01-08:13:39:09'
2018-01-08 13:39:27.743 - Some objects from 'Schema A' have been compiled during the extraction: initial 'Last Compilation Date' is '2018-01-08 13:37:13.0', new 'Last Compilation Date' is '2018-01-08 13:39:09.0'
2018-01-08 13:39:27.760 - Disconnected!
Error executing: Extraction -driver oracle.jdbc.OracleDriver -url jdbc:oracle:thin:@server:1521:TEST -user A -password **** -parameters schema=A;minimal_access_mode=all -target C:\TEST\exportResults => -1
Execution failed!
How do I fine-tune my Version ?
See How do I fine-tune my Version for more information.
How do I deliver the Version for analysis?
See How do I deliver the Version for analysis for more information.
Delivery acceptance
See Validate and Accept the Delivery for more information.