To modify an instance name of a PL/SQL extraction, you must use the Database Renaming tool as described in the documentation : DMT - Oracle > Dealing with Oracle Schemas that move from one Server to another or from one Instance to another
If you have modified the instance name manually, run the analysis and faced issues related to the instance name in the dashboard, modules or Enlighten, you have to follow the steps described in this pages.
Release | Yes/No |
---|---|
8.2.x | |
8.1.x | |
8.0.x | |
7.3.x |
RDBMS | Yes/No |
---|---|
Oracle Server | |
Microsoft SQL Server | |
CSS2 |
Below is the step-by-step scenario leading to the problem:
- Deliver code.
- Change the database Instance.
- Perform and analysis and snapshot.
- Snapshot fails at the Generate Module step with error or Enlighten does not show the instance.
- The problem is due to an issue with using another database instance to extract files and the new extraction files were partially modified to remedy the situation and avoid added/deleted objects.
To fix the problem, proceed as follows:Verify that all extracted files have the proper instance name in the deployment directory which is defined in CAST-MS.
Especially verify that these are the same values.File DatabaseExtraction.uaxdirectory : line: <UAXFile path="p_Instance.1.uax" name="<instance name>" type="CAST_Oracle_Instance"> File ce.1.uax : line: <CAST_Resolution_Identification resolutionName="<instance name>"/> File p_Schema.1.uax : line: <CAST_Linker_ExportedSymbol isPublic="1" exportCollation="2" exportedCategory="138013" exportedPath="<instance name>" exportName="<export name>" exportExtension=""/>
- Remove the references to the incorrect project from the database.
First, determine the associated projects in the KB:
select * from <local database>.keys where objtyp = 138000;
which gives results like (normally the lower project number is the one to keep)
Query result example1301003;'DB_Oracle_20100';'';'XXXXXX';-1;36010;0;138000;'???';'1970-01-01 00:00:00';'';0;''
1373451;'DB_Oracle_24976';'';'XXXXXX';-1;36010;0;138000;'???';'1970-01-01 00:00:00';'';0;''
Then get the container id from this query:
select ccre.Container_Id, * from CMS_ORA_Analysis coa left join CMS_Oracle_Project cop on cop.Object_Id = coa.Project_Id left join CMS_Code_Repo_OracleExtract ccre on ccre.Object_Id = coa.Resource_Id left join CMS_Code_Cont_DBExtract cccd on cccd.Object_Id = ccre.Container_Id
which gives results like (35015 is the container_id in the first column in this case):
Query result example35015;19140;'2016-10-24 11:46:41';'<extraction name>';13539;19106;'dmtid:91436491-8bf2-4cc7-b21e-776c19501bdd:<extraction name>';'<extraction name>_435cba19';'';1;35016;'';;;;'ExecutionSuccessStatus';'2016-10-24 10:43:05';'246d3ff5d1d87748026c1d163a2bdd37';'0';'dmtid:7e6444e5-f21a-4185-b505-4c81c5ddc623';'<Log directory>\DB_Oracle_24976-20161024103938.castlog';'';'';35016;'2016-10-19 13:59:22';'<extraction name>';'<extraction name>';19106;0;0;0;19106;'2016-10-19 13:59:22';'DB_Oracle';13390;35015;'<deployment folder>';1;0;35015;'2016-10-19 13:59:22';'DB_Oracle';'<deployment folder>\DatabaseExtraction.uaxdirectory'
Now having that information, you can clean up the KB by first deleting the project that should not have been added:
set search_path=<local database>; select project_delete(1373451);
Then update the KB with the proper links (using the container ID and the project name)
set search_path=<local database>; update keys set keynam = 'DB_Oracle_35015' where idkey = 1301003; update objects set idnam = 'DB_Oracle_35015' where idkey = 1301003; update objects set idshortnam = 'DB_Oracle_35015' where idkey = 1301003;
- Finally re-launch the snapshot without skipping the analysis.
Ticket # 6950