oracle 什么是 oradiag_<user> 文件夹?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3520054/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
what is oradiag_<user> folder?
提问by dot
I see these in the my Linux folder hierarchy after installing the Zend Framework.
安装 Zend Framework 后,我在 Linux 文件夹层次结构中看到了这些。
/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.
这个名字让我想起了 Oracle。但是我没有找到任何关于此的官方文档。
I didn't install any Oracle server. What's going on here?
我没有安装任何 Oracle 服务器。这里发生了什么?
回答by Michael Moussa
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.
我从未在我的系统上安装 Oracle 并且不知道为什么这些目录不断被创建,但我终于设法阻止它们再次出现。这是它的完成方式。
First, head over to:
首先,前往:
cd ~/oradiag_<username>/diag/clients/user_<username>/host_*/trace/
cd ~/oradiag_<username>/diag/clients/user_<username>/host_*/trace/
and then
进而
head sqlnet.log
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.
您应该会看到一条错误消息,抱怨一个目录不存在于 r/w。对我来说,它是/usr/lib/log
。我创建了它抱怨的oradiag_<username>
目录并删除了该目录,但后来又重新出现;然而,sqlnet.log 文件现在抱怨不同的目录。
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.
clients
显然,只有目录需要是 777。
Now just wipe out the oradiag_<username>
directories wherever they currently appear. They shouldn't pop up for you again.
现在只需清除oradiag_<username>
当前出现的目录即可。他们不应该再次出现在你面前。
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.
杰出的。
回答by broeni
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).
如果 sqlnet.ora 不可用或未定义参数 ADR_BASE,则这些文件夹由 Oracle 11 SQL*Net 创建(请参阅http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/sqlnet .htm#BIIDEAFI)。
回答by Dee Newcum
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:
在 Oracle 11gR1 及更高版本中,您必须先将其添加到 sqlnet.ora 文件中:
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.
创建的日志用于 Oracle客户端。当任何程序尝试访问 Oracle 数据库时,日志可能会显示。
回答by user432349
If you've installed the Zend Framework, it appears to create these directories.
如果您安装了 Zend Framework,它似乎会创建这些目录。