EIS Import Validation

Description
Categories: EIS
One row per EIS eXpress report with the Blitz Report the EIS import created from it, to check the import.

A Blitz Report belongs to an EIS report when its description carries the line EIS Report ID: , which the import writes. Of several such Blitz Reports, a copy for example, the one named like the EIS report is shown, else the oldest.

Status Imported with Issues: the Blit ... 
One row per EIS eXpress report with the Blitz Report the EIS import created from it, to check the import.

A Blitz Report belongs to an EIS report when its description carries the line EIS Report ID: , which the import writes. Of several such Blitz Reports, a copy for example, the one named like the EIS report is shown, else the oldest.

Status Imported with Issues: the Blitz SQL does not parse, or the import recorded migration tier XXEIS Code (the SQL still calls XXEIS objects) or Trigger (the report runs EIS trigger code in its DB package). Imported Tier is the tier the import wrote into the Blitz Report description, Migration Tier the tier of a generation from the current EIS definition.

Parse SQL adds Parse Status, Parse Error and SQL Columns and counts a parse error as an issue. Hard parsing takes up to half a minute per report, so restrict the selection, or check the SQL with Blitz Report SQL Validation instead.

EIS Columns counts the enabled and displayed columns, Blitz Columns the columns the global default template shows. EIS Parameters counts the enabled parameters, hidden ones included, Blitz Parameters those on the run screen; the import hides the hidden EIS parameters and leaves out those used nowhere. EIS Grants counts active grants with report sets expanded, Blitz Assignments the active include assignments.

Runs, Users and Last Run count eXpress and XL Connect executions that started within Executed within Days.
   more
select
z.application,
z.category,
z.report_name,
xxen_util.yes(z.seeded_flag) seeded,
xxen_util.yes(z.enable_report) enabled,
z.source_type,
z.runs,
z.users,
xxen_util.client_time(z.last_run) last_run,
z.status,
z.blitz_report,
z.imported_tier,
&migration_columns
&parse_columns
z.eis_columns "EIS Columns",
z.template_columns blitz_columns,
z.eis_parameters "EIS Parameters",
z.blitz_parameters,
z.eis_pivots "EIS Pivots",
z.blitz_templates,
z.eis_grants "EIS Grants",
z.blitz_assignments,
z.db_package "DB Package",
z.db_package_status "DB Package Status",
xxen_util.user_name(z.created_by) created_by,
xxen_util.client_time(z.creation_date) creation_date,
xxen_util.user_name(z.last_updated_by) last_updated_by,
xxen_util.client_time(z.last_update_date) last_update_date,
z.report_id "EIS Report ID",
z.blitz_report_id "Blitz Report ID"
from
(
select
z.*,
case
when z.blitz_report_id is null then 'Not Imported'
when z.parse_error is not null or z.imported_tier in ('XXEIS Code','Trigger') then 'Imported with Issues'
else 'Imported'
end status,
rownum row_num --keeps the import status and migration tier filters on the final rows, as xxen_eis.migration_tier generates the sql of each report it is called for
from
(
select
err.report_id,
era.application_name application,
errc.category_name category,
err.report_name,
err.seeded_flag,
err.enable_report,
y.source_type,
x.runs,
x.users,
x.last_run,
xr.report_name blitz_report,
xr.report_id blitz_report_id,
xr.created_by,
xr.creation_date,
xr.last_updated_by,
xr.last_update_date,
xr.tier imported_tier,
decode(xr.report_id,null,null&parse_error) parse_error,
xr.sql_text,
(select count(*) from xxeis.eis_rs_report_columns errco where err.report_id=errco.report_id and nvl(errco.enabled_flag,'Y')='Y' and errco.display_flag='Y') eis_columns,
xr.template_columns,
(select count(*) from xxeis.eis_rs_report_parameters errp where err.report_id=errp.report_id and errp.enabled_flag='Y') eis_parameters,
xr.parameters blitz_parameters,
(select count(*) from xxeis.eis_rs_report_pivots errpi where err.report_id=errpi.report_id) eis_pivots,
xr.templates blitz_templates,
errs.grants eis_grants,
xr.assignments blitz_assignments,
xr.db_package,
xr.db_package_status
from
xxeis.eis_rs_reports err,
xxeis.eis_rs_applications era,
xxeis.eis_rs_report_categories errc,
(
select
err.report_id,
case
when err.paste_view_sql is not null then 'Paste SQL'
when erv.object_type='SQL' then 'SQL View'
else nvl((select decode(max(ao.object_type) keep (dense_rank first order by decode(ao.owner,erv.view_owner,1,'APPS',2,3)),'VIEW','Database View','SYNONYM','Synonym','TABLE','Table') from all_objects ao where erv.view_name=ao.object_name and ao.owner in ('APPS','XXEIS') and ao.object_type in ('VIEW','SYNONYM','TABLE')),'Missing')
end source_type
from
xxeis.eis_rs_reports err,
xxeis.eis_rs_views erv
where
err.view_id=erv.view_id(+)
) y,
(
select
erp.report_id,
count(*) runs,
count(distinct erp.created_by) users,
max(erp.start_time) last_run
from
xxeis.eis_rs_processes erp
where
2=2 and
erp.submission_source in ('eXpress','XL Connect')
group by
erp.report_id
) x,
(
select
coalesce(errs.report_id,errsu.report_id) report_id,
count(distinct errs.responsibility_id)+count(distinct errs.request_group_id)+count(distinct errs.user_id) grants
from
xxeis.eis_rs_report_security errs,
xxeis.eis_rs_report_set_units errsu
where
errs.report_set_id=errsu.report_set_id(+) and
sysdate between errs.start_date and nvl(errs.end_date,sysdate)
group by
coalesce(errs.report_id,errsu.report_id)
) errs,
(
select
xrt_eis.report_id eis_report_id,
xr.report_id,
xrt.report_name,
regexp_substr(xrt.description,'migration tier ([^.]+)\.',1,1,null,1) tier,
xr.created_by,
xr.creation_date,
xr.last_updated_by,
xr.last_update_date,
xr.sql_text,
(select count(xrtc.display_sequence) from xxen_report_default_templates xrdt, xxen_report_template_columns xrtc where xr.report_id=xrdt.report_id and xrdt.user_id is null and xrdt.template_id=xrtc.template_id group by xrdt.template_id) template_columns,
(select count(*) from xxen_report_parameters xrp where xr.report_id=xrp.report_id and xrp.display_sequence>0) parameters,
(select count(*) from xxen_report_templates xrte where xr.report_id=xrte.report_id) templates,
(select count(*) from xxen_report_assignments xra where xr.report_id=xra.report_id and xra.include_exclude='I' and xra.disabled is null) assignments,
xr.db_package,
(select uo.status from user_objects uo where upper(xr.db_package)=uo.object_name and uo.object_type='PACKAGE BODY') db_package_status
from
(
select
err.report_id,
min(xrt.report_id) keep (dense_rank first order by decode(xrt.report_name,err.report_name,1)) blitz_report_id
from
xxen_reports_tl xrt,
xxeis.eis_rs_reports err
where
xrt.language=xxen_util.base_language and
xrt.description like '%EIS Report ID: %' and
to_number(regexp_substr(xrt.description,'^EIS Report ID: ([0-9]+)',1,1,'m',1))=err.report_id
group by
err.report_id
) xrt_eis,
xxen_reports xr,
xxen_reports_tl xrt
where
xrt_eis.blitz_report_id=xr.report_id and
xr.report_id=xrt.report_id and
xrt.language=xxen_util.base_language
) xr
where
1=1 and
err.application_id=era.application_id(+) and
err.category_id=errc.category_id(+) and
err.report_id=y.report_id and
err.report_id=x.report_id(+) and
err.report_id=errs.report_id(+) and
err.report_id=xr.eis_report_id(+)
) z
) z
where
3=3
order by
z.runs desc nulls last,
z.application,
z.category,
z.report_name
Parameter NameSQL textValidation
Application
era.application_name=:application
LOV
Category
errc.category_name=:category
LOV
Report Name
err.report_name=:report_name
LOV
Seeded
err.seeded_flag='Y'
LOV Oracle
Enabled
err.enable_report=:enabled
LOV Oracle
Source Type
y.source_type=:source_type
LOV
Executed within Days
erp.start_time>=sysdate-:executed_within_days
Number
Executed
x.runs>0
LOV Oracle
Import Status
z.status=:import_status
LOV
Parse SQL
,(select regexp_substr(max(x.data_type),'.+') from table(xxen_util.sql_columns(regexp_replace(xr.sql_text,chr(38)||'\w+'),'Y')) x where x.column_name='---- error ----')
LOV
Show Migration Analysis
xxen_eis.sql_shape(z.report_id) "SQL Shape",
xxen_eis.migration_tier(z.report_id) migration_tier,
xxen_eis.xxeis_objects(z.report_id) "XXEIS Objects",
xxen_eis.migration_notes(z.report_id) migration_notes,
LOV
Migration Tier
xxen_eis.migration_tier(z.report_id)=:migration_tier
LOV