英文:
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
- "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;
- 跟踪文件
获取跟踪文件路径的另一种方法是通过查询v$process或v$diag_trace_file。
FYI:v$diag_trace_file_contents可获取跟踪文件的内容。
英文:
-
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;
- 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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论