我们如何找到跟踪文件的路径

huangapple go评论47阅读模式
英文:

How can we find the path of trace files

问题

我在Oracle开发者工具中编写了这段代码,但出现了错误。

我遇到了以下错误:

ORA-00942: 表或视图不存在
00942. 00000 - "表或视图不存在"
*原因:
*操作:
错误发生在第7行第17列。

如何修复这个错误?

英文:

I write this code in oracle developer but I get error

SELECT   VALUE FROM    v$parameter       WHERE NAME = 'BACKGROUND_DUMP_DEST';

I get this error :

ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
*Cause:    
*Action:
Error at Line: 7 Column: 17

how can fix this error ?

答案1

得分: 1

尝试从v$diag_info中选择,它包含您可能需要的所有信息。
至于错误,可能是因为您登录的用户没有查询v$parameter的权限,您需要检查参数名称,它应该是小写。

英文:

Try selecting from v$diag_info, it has all the information you may need.
As for the error, it is probably because the user you're logged in does not have the privileges to query v$parameter, and you need to check the parameter name, it should be lower case.

答案2

得分: 0

  1. "table or view does not exist"错误并不总是表示在数据库中没有对象存在。它也可能表示您没有访问权限。要检查对象是否存在于数据库中,您需要查询以下内容:
select * from dba_objects where object_name = 'OBJECT_NAME_BIG_LETTERS';

如果对象存在,只是您没有访问权限。

在您的情况下,用户无法访问V$PARAMETER,您需要授予权限:

grant select on v$parameter to USER;
  1. 跟踪文件

获取跟踪文件路径的另一种方法是通过查询v$process或v$diag_trace_file。

FYI:v$diag_trace_file_contents可获取跟踪文件的内容。

英文:
  1. The error "table or view does not exist" doesn't always mean obbject does not exost in the DB. It also might say that you have no access. To check whether the object exists in the DB you need to query the following

    select * from dba_objects where object_name = 'OBJECT_NAME_BIG_LETTERS';
    

If object is there, you just have no righs to access it

In your case the user just can't reach the V$PARAMETER and you need to GRANT it:

grant select on v$parameter to USER;
  1. Trace files

Another way to get path to traces is either by querying v$process or v$diag_trace_file

FYI: The v$diag_trace_file_contents gets you the contents of trace files

huangapple
  • 本文由 发表于 2023年4月19日 15:24:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76051760.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定