Siebel - eScript Memory Leak Analyzer


This tool was created to analyze Siebel eScript code searching for Memory Leak candidates, where variables may not be properly destroyed or the destruction order is not correct.

It will parse eScript code in the repository searching for variables not destroyed and Business Objects and Business Components that were not destroyed in the correct order (BC then BO).

Variable types evaluated:

This page is currently in Beta and in constant update. Feedbacks are highly appreciated, in case you find any bug, please feel free to reach out to me on Twitter at @jpmmota.


Instructions

1. Export eScripts from your Siebel Repository by running below SQL depending on your current version:

BEFORE IP17

select 'APPLET', applet.name, script.created, script.created_by, script.last_upd, script.last_upd_by, script.name, script.script from SIEBEL.S_APPL_WEBSCRPT script, SIEBEL.S_APPLET applet where applet.row_id = SCRIPT.APPLET_ID and SCRIPT.REPOSITORY_ID = (select ROW_ID from siebel.s_repository where name = 'Siebel Repository') and applet.inactive_flg = 'N' and script.inactive_flg = 'N' UNION ALL
select 'APPLICATION', application.NAME, script.created, script.created_by, script.last_upd, script.last_upd_by, script.name, script.script from SIEBEL.S_APPL_SCRIPT script, SIEBEL.S_APPLICATION application where script.REPOSITORY_ID = (select ROW_ID from siebel.s_repository where name = 'Siebel Repository') and script.application_id = application.row_id and application.inactive_flg = 'N' and script.inactive_flg = 'N' UNION ALL
select 'BUSINESS COMPONENT', BC.NAME, script.created, script.created_by, script.last_upd, script.last_upd_by, script.name, script.script from SIEBEL.S_BUSCOMP_SCRIPT script, SIEBEL.S_BUSCOMP BC where script.REPOSITORY_ID = (select ROW_ID from siebel.s_repository where name = 'Siebel Repository') and bc.row_id = SCRIPT.BUSCOMP_ID and BC.inactive_flg = 'N' and script.inactive_flg = 'N' UNION ALL
select 'BUSINESS SERVICE', BS.NAME, script.created, script.created_by, script.last_upd, script.last_upd_by, script.name, script.script from SIEBEL.S_SERVICE_SCRPT script, SIEBEL.S_SERVICE BS where script.REPOSITORY_ID = (select ROW_ID from siebel.s_repository where name = 'Siebel Repository') and bs.row_id = SCRIPT.SERVICE_ID and BS.inactive_flg = 'N' and script.inactive_flg = 'N'

AFTER IP17

select 'APPLET', applet.name, script.created, script.created_by, script.last_upd, script.last_upd_by, script.name, script.script FROM (SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_APPLET WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_APPLET WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') applet,(SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_APPL_WEBSCRPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_APPL_WEBSCRPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') SCRIPT WHERE SCRIPT.APPLET_ID = applet.WS_SRC_ID UNION ALL select 'APPLICATION', application.NAME, script.created, script.created_by, script.last_upd, script.last_upd_by, script.name, script.script FROM (SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_APPLICATION WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_APPLICATION WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') application,(SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_APPL_SCRIPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_APPL_SCRIPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') SCRIPT WHERE SCRIPT.application_id = application.WS_SRC_ID UNION ALL select 'BUSINESS COMPONENT', BC.NAME, script.created, script.created_by, script.last_upd, script.last_upd_by, script.name, script.script FROM (SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_BUSCOMP WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_BUSCOMP WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') BC,(SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_BUSCOMP_SCRIPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_BUSCOMP_SCRIPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') SCRIPT WHERE SCRIPT.BUSCOMP_ID = BC.WS_SRC_ID UNION ALL SELECT 'BUSINESS SERVICE', BS.NAME, SCRIPT.created, SCRIPT.created_by, SCRIPT.last_upd, SCRIPT.last_upd_by, SCRIPT.name, SCRIPT.script FROM (SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_SERVICE WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_SERVICE WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') BS,(SELECT TBL1.* FROM (SELECT * FROM SIEBEL.S_SERVICE_SCRPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL1 LEFT OUTER JOIN (SELECT * FROM SIEBEL.S_SERVICE_SCRPT WHERE ((WS_ID = (select row_id from siebel.s_workspace where name = 'MAIN')))) TBL2 ON (TBL1.WS_SRC_ID = TBL2.WS_SRC_ID AND TBL1.WS_OBJ_VER < TBL2.WS_OBJ_VER) WHERE TBL2.WS_SRC_ID IS NULL AND TBL1.WS_DELETE_FLG = 'N') SCRIPT WHERE SCRIPT.SERVICE_ID = BS.WS_SRC_ID ;

2. Export the result as a CSV file using UTF-8 as encoding.

3. Upload the CSV file to run the analysis:

Please wait while the file is being processed...

Analysis has finished, click here to download the result file.

An error has occurred. If the input file seems ok, please reach out to me on Twitter at @jpmmota.