FR [2783860] - DBA_Cleanup should clean all temporary tables
* Audit tables better configured used housekeeping (it allows previous backup) - AD_PInstance AD_ChangeLog AD_Session AD_Note * AD_Find AD_Error not used in adempiere https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2783860&group_id=176962
This commit is contained in:
parent
bbbe569b61
commit
7bff24602a
|
@ -45,40 +45,43 @@ BEGIN
|
|||
END IF;
|
||||
END LOOP;
|
||||
|
||||
-- Search Info
|
||||
/** Search Info -- AD_Find not used in adempiere
|
||||
DELETE FROM AD_Find WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' AD_Find=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
*/
|
||||
|
||||
-- Processes older than a week
|
||||
/** Processes older than a week -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_PInstance WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_PInstance=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
|
||||
/** Old Session (1 Week)
|
||||
-- Change Log -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_ChangeLog WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_ChangeLock=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
-- Old Session (1 Week) -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_Session WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_Session=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
/** */
|
||||
*/
|
||||
|
||||
-- Errors older than 1 week
|
||||
/** Errors older than 1 week -- AD_Error not used in Adempiere
|
||||
DELETE FROM AD_Error WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_Error=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
*/
|
||||
|
||||
-- Acknowledged Notes older than one week
|
||||
/** Acknowledged Notes older than one week -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_Note WHERE Processed='Y' AND Updated < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Processed AD_Note=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
*/
|
||||
|
||||
--
|
||||
COMMIT;
|
||||
|
|
|
@ -45,40 +45,43 @@ BEGIN
|
|||
END IF;
|
||||
END LOOP;
|
||||
|
||||
-- Search Info
|
||||
/** Search Info -- AD_Find not used in adempiere
|
||||
DELETE FROM AD_Find WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' AD_Find=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
*/
|
||||
|
||||
-- Processes older than a week
|
||||
/** Processes older than a week -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_PInstance WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_PInstance=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
|
||||
/** Old Session (1 Week)
|
||||
-- Change Log -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_ChangeLog WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_ChangeLock=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
-- Old Session (1 Week) -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_Session WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_Session=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
/** */
|
||||
*/
|
||||
|
||||
-- Errors older than 1 week
|
||||
/** Errors older than 1 week -- AD_Error not used in Adempiere
|
||||
DELETE FROM AD_Error WHERE Created < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Old AD_Error=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
*/
|
||||
|
||||
-- Acknowledged Notes older than one week
|
||||
/** Acknowledged Notes older than one week -- audit data better configured using HouseKeeping
|
||||
DELETE FROM AD_Note WHERE Processed='Y' AND Updated < SysDate-7;
|
||||
IF (SQL%ROWCOUNT <> 0) THEN
|
||||
DBMS_OUTPUT.PUT_LINE(' Processed AD_Note=' || SQL%ROWCOUNT);
|
||||
END IF;
|
||||
*/
|
||||
|
||||
--
|
||||
COMMIT;
|
||||
|
|
Loading…
Reference in New Issue