Home » RDBMS Server » Server Administration » Trace Files purging through ADRCI ("Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.9.0.0.0")
Trace Files purging through ADRCI [message #686339] Wed, 03 August 2022 03:01 Go to next message
saipradyumn
Messages: 419
Registered: October 2011
Location: Hyderabad
Senior Member
Hi All,


As of now we are deleting the .trc , trm manually when diskspace was occupied 95%. We want to make it as generic process with the help of this
ADRCI utility .

By Using this utility I had configured the SHORTP_POLICY , LONG_POLICY as one hour , PURGE_THRESHOLD as 80 for testing purpose in development environment .

There is no issue at all while executing those configuration scripts , but it's not purging the trace files also. There is no difference of diskspace utilization.

Its updated the LAST_AUTOPRG_TIME in the control also for the very first time. It seems to be as only one hour files are deleted that's why its not impacted the diskspace. But after the second hour time also not updated and file are not deleted.
Is there any other way to check that purging activity completed successfully apart from the diskspace files.


After one hour :


adrci> show control

ADR Home = /home/****/e01/diag/rdbms/real/real:
*************************************************************************
ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME                              SIZEP_POLICY         PURGE_PERIOD         FLAGS                PURGE_THRESHOLD
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ---------------------------------------- -------------------- -------------------- -------------------- --------------------
1830302228           1                    1                    2022-08-03 01:24:22.885720 -04:00        2022-08-03 02:28:54.618007 -04:00        2022-08-02 13:56:55.251031 -04:00        1                    2                    110                  1                    2013-10-10 05:43:08.019690 -04:00        18446744073709551615 0                    0                    80
1 row fetched

adrci> select SHORTP_POLICY,LONGP_POLICY from ADR_CONTROL;

ADR Home = /home/ppoker/e01/diag/rdbms/real/real:
*************************************************************************
SHORTP_POLICY        LONGP_POLICY
-------------------- --------------------
1                    1
1 row fetched

Second hour :


adrci> show control

ADR Home = /home/*****/e01/diag/rdbms/real/real:
*************************************************************************
ADRID                SHORTP_POLICY        LONGP_POLICY         LAST_MOD_TIME                            LAST_AUTOPRG_TIME                        LAST_MANUPRG_TIME                        ADRDIR_VERSION       ADRSCHM_VERSION      ADRSCHMV_SUMMARY     ADRALERT_VERSION     CREATE_TIME                              SIZEP_POLICY         PURGE_PERIOD         FLAGS                PURGE_THRESHOLD
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ---------------------------------------- -------------------- -------------------- -------------------- --------------------
1830302228           1                    1                    2022-08-03 01:24:22.885720 -04:00        2022-08-03 02:28:54.618007 -04:00        2022-08-02 13:56:55.251031 -04:00        1                    2                    110                  1                    2013-10-10 05:43:08.019690 -04:00        18446744073709551615 0                    0                    80
1 row fetched

adrci> exit
$
 =>date
Wed Aug  3 03:58:44 EDT 2022

Please help me to understand this
Re: Trace Files purging through ADRCI [message #686340 is a reply to message #686339] Wed, 03 August 2022 03:28 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
I'm not familiar with the technique you are using. But in case it will help, this is a script I run trough cron that works for me to remove everything over two months old:
export ADR_BASE=$ORACLE_BASE
for f in $( adrci exec="show homes" | grep -v "ADR Homes:" );
do
echo "purge ${f}:";
adrci exec="set home $f; purge -age 87840" ;
done
Re: Trace Files purging through ADRCI [message #686341 is a reply to message #686340] Wed, 03 August 2022 05:06 Go to previous messageGo to next message
saipradyumn
Messages: 419
Registered: October 2011
Location: Hyderabad
Senior Member

Thanks for your response. I will try and update the status .
Re: Trace Files purging through ADRCI [message #686347 is a reply to message #686341] Wed, 10 August 2022 00:32 Go to previous message
saipradyumn
Messages: 419
Registered: October 2011
Location: Hyderabad
Senior Member
Hi John Watson,

Thanks for your help once again. What evet you suggested went fine in one environment. Even the first approach which I had implemented also working as expected. Short term policy and long term policies configuration was in DAYS.
I though it should be in hours and expected to delete after each and every hour. But as I kept the value as 1 ,its performing this activity on daily basis and deleting the old trace files as per the configuration.

Apologies for misunderstanding.

Thanks
SaiPradyumn


Previous Topic: SYS_NC columns
Next Topic: Keyword for searching oracle software in MOS.
Goto Forum:
  


Current Time: Sat Dec 21 19:41:00 CST 2024