what is oradiag_<user> folder?

51,973

Solution 1

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.

Solution 2

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.

Solution 3

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).

Share:
51,973
Admin
Author by

Admin

Updated on December 20, 2020

Comments

  • Admin
    Admin over 3 years

    I see these in the my Linux folder hierarchy after installing the Zend Framework.

    /oradiag_root/
    /user/myuser/oradiag_myuser/
    /user/myuser/oradiag_root/
    

    This name reminds me of Oracle. But I did not find any official documentation about this.

    I didn't install any Oracle server. What's going on here?

  • Daff
    Daff over 13 years
    Yes it does, but I really wonder how to change the folder or get rid of it.
  • iconoclast
    iconoclast over 11 years
    777 permissions are (almost?) never necessary, and generally (or always?) a terrible idea. Are you sure you can't get by with less than that? Shouldn't you be able to just give access to the user or group that is being used to run the Zend Server? In my case the user is zend and the group is zend. Why not just give either of them ownership of the directories? Is it really necessary to make those directories world-writable?
  • Michael Moussa
    Michael Moussa over 11 years
    The directory you need to create is a directory that otherwise wouldn't exist, has no contents, and serves no purpose other than to prevent another directory from being created in your /home that you didn't want anyway. I think there's no harm in using 777 here, HOWEVER, I don't remember testing with anything more restrictive (and I don't have an Ubuntu machine to test on now). If you can verify alternate permissions or grouping works, then feel free to edit my answer accordingly.
  • weierophinney
    weierophinney over 11 years
    Zend Framework does not create these. Most likely, it is something to do with Zend Server and having oracle support enabled by default. Unpacking ZF by itself will not give you those directories (check the source tarballs if you don't believe me).
  • Andrew Kravchuk
    Andrew Kravchuk over 3 years
    After adding those options in my config file, the oradiag_andrew folder is not created anymore, but there is an empty directory opt/oracle/product/11.2.0.3/client_1/lib/log/diag/clients created in my home directory now. Any idea how to fix that?