oracle 我看不到表 dba_object
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19617157/
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
I can not see the table dba_object
提问by Ramón Devesa
I am trying to perform this query and did not return anything, tells me that the table does not exist
我正在尝试执行此查询但没有返回任何内容,告诉我该表不存在
SELECT * FROM dba_object WHERE object_name LIKE 'v$*'
回答by Mureinik
The table is named DBA_OBJECTS
, in plural:
http://docs.oracle.com/cd/B12037_01/server.101/b10755/statviews_2243.htm
该表以DBA_OBJECTS
复数形式命名:http:
//docs.oracle.com/cd/B12037_01/server.101/b10755/statviews_2243.htm
And the *
sign should be replaced by %
:
并且该*
标志应替换为%
:
SELECT * FROM dba_objects WHERE object_name LIKE 'V$%'
回答by Shaun Peterson
Both answers above are correct, however there is also a possibility that this could be a permissions issue. If you are logged in as a user who doesn't have permission to this table it will give a table does not exist error.
上面的两个答案都是正确的,但是也有可能是权限问题。如果您以无权访问此表的用户身份登录,则会出现表不存在错误。
you can check if your current user has access with the below (replacing username with the appropriate logged in user)...
您可以检查您当前的用户是否具有以下访问权限(用适当的登录用户替换用户名)...
SELECT * FROM USER_TAB_PRIVS where table_name = 'DBA_OBJECTS' and GRANTEE = 'username';
If you do not have permissions you will need to log in as SYS and grant permissions to this table or talk to your DBA to get this done.
如果您没有权限,您将需要以 SYS 身份登录并授予此表的权限或与您的 DBA 交谈以完成此操作。
回答by Marco Baldelli
Oracle is case sensitive. You should probably use an uppercase V
in your LIKE
clause and change *
to %
:
Oracle 区分大小写。您可能应该V
在您的LIKE
子句中使用大写并更改*
为%
:
SELECT * FROM dba_objects WHERE object_name LIKE 'V$%'
Also the correct catalog view name is dba_objects
.
正确的目录视图名称也是dba_objects
.