0

Question

What is the function of the folders rdbms and tnslsnr on Oracle database ( Windows ) ?

The issue with the folders rdbms and tnslsnr is that they are getting larger and larger 40gb+, and therefore exhausting the drive space completely,

Question in more detail

The folders rdbms and tnslsnr are getting large 40gb+, and for me to assess what can be deleted without affecting the DB operation I do require to understand what these two folders do. I.e. their function within the Oracle architecture for Windows.

Further details

OracleDB\diag\rdbms

For this path, the bulk of the data is stored between:

  • alert = 34.1 gb.
  • trace = 9.43 gb.

Are the files stored on the path OracleDB\diag\rdbms\cl3v1db\cl3v1\alert critical for the DB restore or recovery?

Or are those files unimportant logs? below is a snippet from the mentioned files:

<msg time='2023-07-12T10:55:48.147+02:00' org_id='oracle' comp_id='rdbms'
 type='UNKNOWN' level='16' host_id='HOSTNAME'
 host_addr='hex value' pid='5708'>
 <txt>Number of processor sockets in the system is 1
 </txt>
</msg>

OracleDB\diag\tnslsnr

For the above path the bulk of the data is stored between:

  • alert = 25.4 gb.

  • trace = 13.0 gb.

Are the files stored on the path OracleDB\diag\tnslsnr\hostname\listener\alert critical for the DB recovery or restore?

Or are those files unimportant logs? below is a snippet from the mentioned files:

<msg time='2023-12-21T07:21:03.082+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='hostname'
 host_addr='hex value' pid='5264'>
 <txt>21-DEC-2023 07:21:03 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=CL3v1DB)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=50137)) * establish * CL3v1DB * 0
 </txt>
</msg>

1 Answer 1

4

None of those files are essential for restore and recovery.

rdbms - logs and traces for the databases

tnslsnr - logs and traces for the listeners

To clean them up manually with adrci:

$ adrci

ADRCI: Release 19.0.0.0.0 - Production on Tue Aug 6 12:25:01 2024

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/u01/app/oracle"

adrci> show homes
ADR Homes:
...

Select home from above as:

adrci> set home diag/rdbms/cl3v1db/cl3v1/alert

Delete files older than for example 1 week (=10080 minutes):

adrci> purge -age 10080

Example for viewing and modifying automatic deletion policy for database home, example:

adrci> set home diag\rdbms\cl3v1db\cl3v1\alert
adrci> show control
...
adrci> set control (SHORTP_POLICY = 1440)
adrci> set control (LONGP_POLICY = 10080)

Database alert log (diag\rdbms\cl3v1db\cl3v1\trace\alert_cl3v1.log) is not rotated, it just keeps growing over time, you need to take care of that manually if it grew too large.

Listener logs (.log under diag\tnslsnr\hostname\listener_name\trace) are rotated starting with 19c. If you are on an older version, you need to take care of that manually if it grew too large.

1
  • Good afternoon @Balazs, does there exist a built-in tool or command syntax within Oracle to admin the clean-up of those logs, or on the contrary, should I have to handle it for instance with a Python or Powershell script? Thanks in advance for the help! Commented Aug 6 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.