Hidden parameter _TRACE_FILES_PUBLIC in Oracle

July 24, 2010 | By

Trace files are generated due to some errors in Oracle. We can generate it forcefully after enabling SQL_TRACE=TRUE

parameter. SQL_TRACE parameter can be modified in session level and system level.All trace files are logging in USER_DUMP_DEST parameter or BACKGROUND_DUMP_DEST parameter.

Generally all trace files have read and write permission for Oracle software owner and group of Oracle installation has permission of read only. Other users don’t have privilege of read.

$cd /opt/oracle/ora11g/admin/orcl/udump
$ls -l
total 23
-rw-r—– 1 oracle oinstall 2048 Jul 23 20:43 orcl1_ora_3423.trc
-rw-r—– 1 oracle oinstall 1024 Jul 24 03:40 orcl1_ora_3517.trc
-rw-r—– 1 oracle oinstall  965 Jul 24 04:06 orcl1_ora_3518.trc

Because trace files may have some important information about database security or may have some sensitive details of data. Due to this reasons Oracle’s default setting forced to non-readable to other users in USER_DUMP_DEST directory.

Oracle applies this permission using hidden parameter called _TRACE_FILES_PUBLIC. Default value of _TRACE_FILES_PUBLIC is FALSE. Due to this parameter trace files don’t have read permission to other users or public. It is not recommended to change value of this parameter because it is security risk. But in some scenario it has needed to change permission to make it readable trace files to other users or PUBLIC.

We can change this parameter using parameter file or spfile and make it TRUE.

SELECT x.ksppinm name, y.ksppstvl value
FROM x$ksppi x, x$ksppcv y
WHERE x.inst_id = userenv(‘Instance’)
AND y.inst_id = userenv(‘Instance’)
AND x.indx = y.indx

——————————— ————————————
_trace_files_public FALSE

For modifing this parameter login as SYSDBA and execute ALTER SYSTEM command as follows.

SQL> ALTER SYSTEM SET “_trace_files_public” = TRUE SCOPE=SPFILE;

After changing _TRACE_FILES_PUBLIC parameter to TRUE. Newly generated trace has readable permission to other users and public too.

$cd /opt/oracle/ora11g/admin/orcl/udump
$ls -l
-rw-r–r– 1 oracle oinstall 1433 Jul 24 17:32 orcl1_ora_3577.trc

All the best,

Thanks and regards,

Dbametrix Solutions

Be Sociable, Share!

Tags: , , , ,

Category: blog, blogging, oracle 11g dba, oracle internals

Comments are closed.