unwanted logs removed
@@ -93,37 +93,6 @@ THEN
END IF;
END IF;
--- ------------------------------------------------------
--- CALCULATING REG_LOG
--- ------------------------------------------------------
-IF (enableLog)
-THEN
- EXECUTE IMMEDIATE 'INSERT INTO LOG_WSO2_REG_LOG_CLEANUP_SP (TIMESTAMP,LOG) VALUES (TO_CHAR( SYSTIMESTAMP, ''DD.MM.YYYY HH24:MI:SS:FF4''),''CALCULATING DELETE ELIGIBLE ON REG_LOG TABLE .... !'')';
-
- IF (enableLog AND logLevel IN ('DEBUG','TRACE'))
- THEN
- SELECT COUNT(1) into rowcount FROM REG_LOG;
- EXECUTE IMMEDIATE 'INSERT INTO LOG_WSO2_REG_LOG_CLEANUP_SP (TIMESTAMP,LOG) VALUES (TO_CHAR( SYSTIMESTAMP, ''DD.MM.YYYY HH24:MI:SS:FF4''),''TOTAL REG_LOG TABLE BEFORE DELETE : '||rowCount||''')';
- END IF;
-
- IF (enableLog AND logLevel IN ('TRACE'))
- THEN
- SELECT COUNT(1) into cleanupCount FROM (
- (SELECT RL.REG_LOG_ID FROM REG_LOG RL LEFT JOIN (
- SELECT MAX(REG_LOG_ID) AS REG_LOG_ID FROM REG_LOG GROUP BY REG_PATH, REG_TENANT_ID) X
- ON RL.REG_LOG_ID = X.REG_LOG_ID
- WHERE X.REG_LOG_ID IS NULL)
- UNION
- (SELECT REG_LOG_ID FROM REG_LOG WHERE REG_ACTION = 7))A;
- EXECUTE IMMEDIATE 'INSERT INTO LOG_WSO2_REG_LOG_CLEANUP_SP (TIMESTAMP,LOG) VALUES (TO_CHAR( SYSTIMESTAMP, ''DD.MM.YYYY HH24:MI:SS:FF4''),''TOTAL REG_LOG SHOULD BE DELETED ON : '||cleanupCount||''')';
- END IF;
-
- IF (enableLog AND logLevel IN ('TRACE'))
- THEN
- rowcount := (rowcount - cleanupCount);
- EXECUTE IMMEDIATE 'INSERT INTO LOG_WSO2_REG_LOG_CLEANUP_SP (TIMESTAMP,LOG) VALUES (TO_CHAR( SYSTIMESTAMP, ''DD.MM.YYYY HH24:MI:SS:FF4''),''TOTAL REG_LOG SHOULD BE RETAIN : '||rowCount||''')';
- END IF;
-END IF;
-- ------------------------------------------
-- PURGE REG_LOG
@@ -195,7 +164,7 @@ COMMIT;
THEN
IF (enableLog AND logLevel IN ('TRACE'))
THEN
- EXECUTE IMMEDIATE 'INSERT INTO LOG_WSO2_REG_LOG_CLEANUP_SP (TIMESTAMP,LOG) VALUES (TO_CHAR( SYSTIMESTAMP, ''DD.MM.YYYY HH24:MI:SS:FF4''),''BACKING UP TABLES REG_LOG_BACKUP'')';
+ EXECUTE IMMEDIATE 'INSERT INTO LOG_WSO2_REG_LOG_CLEANUP_SP (TIMESTAMP,LOG) VALUES (TO_CHAR( SYSTIMESTAMP, ''DD.MM.YYYY HH24:MI:SS:FF4''),''BACKING UP TABLE REG_LOG_BACKUP'')';
END IF;
EXECUTE IMMEDIATE 'INSERT INTO REG_LOG_BACKUP SELECT RL.* FROM REG_LOG RL INNER JOIN REG_LOG_BATCH_TMP RLB ON RL.REG_LOG_ID = RLB.REG_LOG_ID';
COMMIT;
