Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: RN on July 11, 2008, 03:11:54 PM
-
Can some help me with the oracle purge scripts for the statservers tables Login,QueueInfo,Voice Extension and status .Iam looking to purge the data which is older than 15days.
tnks....rn
-
Can any please help me out on this ???
cheers...rn
-
Hi,
What version of Oracle database you have?
R.
-
The oracle version is 10G release 2.
thanks,
-
Hi RN,
Here are the SQL scripts for purging StatServer's tables. You can delete records older then specified date using these scripts. Just replace the date '2008-07-01' (July 1st 2008) in the commands below with different date.
Please test these scripts carefully before using them on production system!
R.
--- purge table "LOGIN" by date
DELETE LOGIN
WHERE TIME < ((TO_DATE('2008-07-01','YYYY-MM-DD')-TO_DATE('1970-01-01 00:01:00','YYYY-MM-DD HH24:MI:SS'))*3600*24);
--- purge table "QINFO" by date
DELETE QINFO
WHERE StartTime < ((TO_DATE('2008-07-01','YYYY-MM-DD')-TO_DATE('1970-01-01 00:01:00','YYYY-MM-DD HH24:MI:SS'))*3600*24);
--- purge table "STATUS" by date
DELETE STATUS
WHERE StartTime < ((TO_DATE('2008-07-01','YYYY-MM-DD')-TO_DATE('1970-01-01 00:01:00','YYYY-MM-DD HH24:MI:SS'))*3600*24);
--- purge table "VOICE_REASONS" by date
DELETE VOICE_REASONS
WHERE START_TIME < ((TO_DATE('2008-07-01','YYYY-MM-DD')-TO_DATE('1970-01-01 00:01:00','YYYY-MM-DD HH24:MI:SS'))*3600*24);