问题:查询select * from v$database
提示:ORA-00942: 表或视图不存在
登录DBA用户授权视图给该用户
grant select on v$instance to user_name;
grant select on v$databaseto user_name;
出现错误提示:
ORA-02030: 只能从固定的表/视图查询
–解决方法:
SQL> select * from dba_synonyms t where t.synonym_name = upper(‘v$database’);
OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK
PUBLIC V$DATABASE SYS V_$DATABASE
SQL> grant select on V_$DATABASE to user01;
Grant succeeded