0% found this document useful (0 votes)
5 views1 page

SQL Cleanup for Old Session Data

The document contains a series of SQL delete statements aimed at removing records from various tables that are older than 30 days. It includes deletions from session, task, step, and report logs, as well as related session and parameter tables. The final output indicates that zero rows were affected by the deletions.

Uploaded by

anil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

SQL Cleanup for Old Session Data

The document contains a series of SQL delete statements aimed at removing records from various tables that are older than 30 days. It includes deletions from session, task, step, and report logs, as well as related session and parameter tables. The final output indicates that zero rows were affected by the deletions.

Uploaded by

anil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

delete from snp_sess_task where sess_no in (select distinct sess_no from

SNP_SESS_TASK_LOG where task_end < sysdate-30)

delete from SNP_SESS_TASK_LOG where task_end < sysdate-30

delete from SNP_STEP_LOG where step_end < sysdate-30

delete from SNP_SESS_STEP where last_date < sysdate-30

delete from SNP_VAR_SESS where sess_no in (select distinct sess_no from SNP_SESSion
where last_date < sysdate-30)

delete from SNP_SESSion where last_date < sysdate-30

delete from SNP_STEP_REPORT where step_end < sysdate-30

delete from SNP_SCEN_REPORT where sess_end < sysdate-30

zero rows
=========================
delete from SNP_SESS_TXT_LOG

delete from SNP_Task_TXT

delete from SNP_SEQ_SESS;

delete from SNP_PARAM_SESS;

delete from SNP_SESS_STEP_LV;

delete from SNP_EXP_TXT;

You might also like