DIS Workbook Export Script

Description
Categories: Enginatics
Repository: Github
https://youtu.be/17_Au_11IBE ...  https://youtu.be/17_Au_11IBE
Use this report to migrate Discoverer workbooks to Blitz Report through the following steps:

1. Run this report 'DIS Workbook Export Script' to generate a list of commands to export xmls for all recently used Discoverer workbooks.
2. Create a new folder on a windows machine having the Discoverer Admin executable dis51adm.exe installed (contact Enginatics, if you need help with the Discoverer Administrator installation).
3. Open a Command Prompt window, cd to the new folder, and execute (copy and paste) the commands generated in step 1. This will start individual processes to export the workbooks as .eex files. Depending on your client capacity, you can run between 100 and 200 export processes at the same time. In case of errors, delete all zero size .eex files and rerun the script.
4. Zip together all generated (non-zero size) workbook_*.eex files. Do not include the generated *.log files. Note that the .zip needs to be created with older Windows10 compression methods, as the latest Windows11 method cannot be processed by the Oracle 19c database yet.
5. If you have more than one EUL, set the profile option 'Blitz Report Discoverer Default EUL' to the end user layer for which you run the migration
6. Navigate to Setup>Tools>Import>XML Upload and upload the .zip file generated in step 4. You will see a message with the count of uploaded xml files.
7. Run concurrent program 'Blitz Report Discoverer Import' from the System Administrator responsibility, and specify a report name prefix to easily distinguish the migrated reports.
8. Verify the migration result by running reports:
'Blitz Report Parameter Uniqueness Validation' and correct the nonunique parameter names.
'Blitz Report LOV SQL Validation' and correct errors plus change slow 'distinct' style ones to fast SQLs
'Blitz Report SQL Validation' and correct problems
'Blitz Report Parameter Bind Variable Validation'
'DIS Migration identify missing EulConditions'
'Blitz Report Parameter Table Alias Validation'
'Blitz Reports' for Discoverer check for column 'required_parameters'
'Blitz Report Parameter Default Values' for discoverer check for default value having partition
'Blitz Report Templates' and search for Subtotals: Y in the description and train the users to switch compact pivot to tabular format


In case you need to completely re-run the Discoverer import, for example with a different cut-off date parameter, you can use the following script to purge the previously imported data:

declare
l_eul varchar2(30):='eul_us';
begin
--Delete staging tables
delete xxen_discoverer_workbook_xmls xdwx where xdwx.eul=l_eul;
delete from xxen_discoverer_fnd_user xdfu where xdfu.eul=l_eul;
delete from xxen_discoverer_pivot_fields xdpf where xdpf.eul=l_eul;
delete from xxen_discoverer_sheets xds where xds.eul=l_eul;
delete from xxen_discoverer_workbooks xdw where xdw.eul=l_eul;
--Delete all reports from category 'Discoverer' and their related LOVs
for c in (select xrca.report_id from xxen_report_categories_v xrcv, xxen_report_category_assigns xrca where xrcv.category='Discoverer' and xrcv.category_id=xrca.category_id) loop
xxen_api.delete_report(c.report_id,'Y');
end loop;
for c in (select xrplv.lov_id from xxen_report_parameter_lovs_v xrplv where xrplv.description=upper(xrplv.description) and xrplv.lov_id not in (select xrp.lov_id from xxen_report_parameters xrp where xrp.parameter_type='LOV' and xrp.lov_id is not null)) loop
xxen_api.delete_lov(c.lov_id);
end loop;
commit;
end;
   more
select
'if not exist workbook_'||ed.doc_id||'.eex (start '||:executable_path||' /connect '||:eul||'/'||:eul_password||'@'||:db_service_name||' /export "workbook_'||ed.doc_id||'.eex" /workbook "'||xxen_util.dis_user_name(xxen_util.dis_user(ed.doc_eu_id,:eul),'N')||'.'||ed.doc_name||'" /xmlworkbook'||chr(38)||' ping /n '||:delay_seconds||' localhost >NUL) else (echo workbook_'||ed.doc_id||'.eex exists)' text,
ed.doc_name workbook,
xxen_util.dis_user_name(ed.doc_eu_id,:eul) owner,
'workbook_'||ed.doc_id||'.eex' file_name
from
&eul.eul5_documents ed
where
1=1 and
(ed.doc_name, xxen_util.dis_user_name(ed.doc_eu_id,:eul,'N')) in (select eqs.qs_doc_name, upper(eqs.qs_doc_owner) qs_doc_owner from &eul.eul5_qpp_stats eqs where 2=2 &or_owner_restriction)
order by
ed.doc_id
Parameter NameSQL textValidation
Accessed After
eqs.qs_created_date>=:date_from
Date
Workbook Owner
 or upper(eqs.qs_doc_owner)=:doc_owner
LOV
Workbook
eqs.qs_doc_name=:workbook
LOV
End User Layer
<parameter_value>
LOV
End User Layer Password
 
Char
Executable Path
 
Char
DB Service Name
 
Char
Not yet imported only
ed.doc_id not in (select xdwx.doc_id from xxen_discoverer_workbook_xmls xdwx where xdwx.eul=:eul)
LOV