what is oradiag_<user> folder?

空扰寡人 提交于 2019-12-03 22:18:52

I never installed Oracle on my system and don't know why these directories kept being created, but I finally managed to stop them from reappearing. Here's how it's done.

First, head over to:

cd ~/oradiag_<username>/diag/clients/user_<username>/host_*/trace/

and then

head sqlnet.log

You should see an error message complaining about a directory not existing for r/w. For me, it was /usr/lib/log. I created the directory it was complaining about and deleted the oradiag_<username> directory, only to have it reappear later; however, the sqlnet.log file was now complaining about a different directory.

I repeated this process of creating directories a few times until the directory finally stopped appearing. In your case, the directories may be different, but here's what solved it for me:

sudo mkdir /usr/lib/log/diag/clients
sudo chmod 777 /usr/lib/log/diag/clients

Only the clients directory needs to be 777, apparently.

Now just wipe out the oradiag_<username> directories wherever they currently appear. They shouldn't pop up for you again.

In case you're curious, here's what finally ended up being written to that "missing" directory:

mike@mike-ubuntu:/usr/lib/log/diag/clients$ ll -a
total 8
drwxrwxrwx 2 root root 4096 2011-08-24 10:34 .
drwxr-xr-x 3 root root 4096 2011-08-24 10:34 ..

Brilliant.

These folder are created by the Oracle 11 SQL*Net if sqlnet.ora is not available or does not define the parameter ADR_BASE (see http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/sqlnet.htm#BIIDEAFI).

There are a lot of suggestions out there, but the only one that worked for me was this.

In Oracle 11gR1 and higher, you have to add this to your sqlnet.ora file first:

DIAG_ADR_ENABLED=OFF

After that, then other log-disabling settings should work:

TRACE_LEVEL_CLIENT = OFF
TRACE_DIRECTORY_CLIENT=/dev/null
LOG_DIRECTORY_CLIENT = /dev/null
LOG_FILE_CLIENT = /dev/null
LOG_LEVEL_CLIENT = OFF

The logs that are created are for the Oracle client. The logs may show up when any program tries to access an Oracle database.

If you've installed the Zend Framework, it appears to create these directories.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!