DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Thursday, March 31, 2016

To Grant Read only access on v$ tables to User

SQL*Plus: Release 12.1.0.2.0 Production on Thu Mar 31 02:51:14 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> grant select on v$instance to gnos;
grant select on v$instance to cognos
                *
ERROR at line 1:
ORA-02030: can only select from fixed tables/views


SQL> select owner, object_name from dba_objects where object_name in ('V$INSTANCE','V$DATABASE');

OWNER                 OBJECT_NAME

--------------------------------------------------------------------------------
PUBLIC                  V$DATABASE

PUBLIC                  V$INSTANCE





SQL> SELECT TABLE_OWNER,TABLE_NAME FROM DBA_SYNONYMS  where SYNONYM_NAME in ('V$INSTANCE','V$DATABASE');

TABLE_OWNER                       TABLE_NAME

--------------------------------------------------------------------------------
SYS                              V_$DATABASE

SYS                              V_$INSTANCE


SQL> grant select on V_$DATABASE to gnos;

Grant succeeded.

SQL>  grant select on V_$INSTANCE to gnos;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

1 comment:

Sridevi K said...


Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.