oracle 删除跟踪文件的影响?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13559270/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 01:17:00  来源:igfitidea点击:

Effect Of deleting trace files?

databaseoracledatabase-administration

提问by Nitesh Kumar

I have an oracle 11G instance. Its trace file are increasing day by day and causing a disk space issue. I have to delete it manually on every disk space alert. I use the command:

我有一个 oracle 11G 实例。它的跟踪文件每天都在增加并导致磁盘空间问题。我必须在每个磁盘空间警报上手动删除它。我使用命令:

**find \`pwd\` \( -name \*.trc -o -name \*.trm \) -mtime +2 -exec rm -rf {} \;**

I can schedule this also in cronjob, but I want to know what it will effect in deleting these files and why these files are increasing so much in size. How can I reduce these file by increasing and what will this effect in our database?

我也可以在 cronjob 中安排这个,但我想知道删除这些文件会产生什么影响,以及为什么这些文件的大小增加了这么多。如何通过增加来减少这些文件,这会对我们的数据库产生什么影响?

回答by Justin Cave

Why is the database generating a bunch of trace files? A trace file would either indicate an error, in which case you would generally need to examine the trace file to determine what the error is and how to correct it, or it would indicate that someone enabled tracing for a session in order to debug an issue, in which case you would want to retain the trace file so that you can do that debugging. Deleting trace files without looking at them means that you are almost certainly ignoring a symptom of a problem that has the potential to get worse over time. If this is a real production database rather than a toy database on your local machine, I would strongly suggest determining why the trace files are getting created in the first place and addressing whatever issue(s) are causing the trace files to be created.

为什么数据库会生成一堆跟踪文件?跟踪文件要么指示错误,在这种情况下您通常需要检查跟踪文件以确定错误是什么以及如何纠正它,或者它会指示某人启用了会话跟踪以调试问题,在这种情况下,您可能希望保留跟踪文件,以便进行调试。删除跟踪文件而不查看它们意味着您几乎可以肯定忽略了随着时间的推移可能会变得更糟的问题的症状。如果这是一个真正的生产数据库而不是本地机器上的玩具数据库,我强烈建议首先确定为什么要创建跟踪文件并解决导致创建跟踪文件的任何问题。