-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathDIS Workbook Export Script.sql
More file actions
65 lines (60 loc) · 5 KB
/
DIS Workbook Export Script.sql
File metadata and controls
65 lines (60 loc) · 5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*************************************************************************/
/* */
/* (c) 2010-2024 Enginatics GmbH */
/* www.enginatics.com */
/* */
/*************************************************************************/
-- Report Name: DIS Workbook Export Script
-- Description: <a href="https://youtu.be/17_Au_11IBE" rel="nofollow" target="_blank">https://youtu.be/17_Au_11IBE</a>
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;
-- Excel Examle Output: https://www.enginatics.com/example/dis-workbook-export-script/
-- Library Link: https://www.enginatics.com/reports/dis-workbook-export-script/
-- Run Report: https://demo.enginatics.com/
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