v$session is synonyms of v_$session .
SQL> col OWNER format a15
SQL> col OBJECT_NAME like OWNER
SQL> col OBJECT_TYPE like OWNER
SQL> r
1* select OWNER,OBJECT_NAME,OBJECT_TYPE from dba_objects where OBJECT_NAME='V$SESSION'
OWNER OBJECT_NAME OBJECT_TYPE
--------------- --------------- ---------------
PUBLIC V$SESSION SYNONYM
SQL> grant select on v$session to prod1;
grant select on v$session to cccprod1
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
you can't give grant to synonyms
SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE from dba_objects where OBJECT_NAME='V_$SESSION';
OWNER OBJECT_NAME OBJECT_TYPE
--------------- --------------- ---------------
SYS V_$SESSION VIEW
SQL> grant select on v_$session to prod1;
Grant succeeded.
Search This Blog
Total Pageviews
Wednesday, 18 August 2010
Oracle ORA_ROWSCN Pseudocolumn and AS OF Flashback Query
SQL> CREATE TABLE anuj (c1 NUMBER, c2 VARCHAR2(16), c3 DATE) ;
SQL> INSERT INTO anuj VALUES (1,'A',SYSDATE);
1 row created.
SQL> INSERT INTO anuj VALUES (1,'B',SYSDATE);
1 row created.
SQL> commit;
Commit complete.
SQL> SELECT ORA_ROWSCN, a.* FROM anuj a;
ORA_ROWSCN C1 C2
---------- ---------- ------------------------------------------------
C3
---------------
45111390 1 A
18-AUG-10
45111390 1 B
18-AUG-10
SQL> INSERT INTO anuj VALUES (1,'A',SYSDATE);
1 row created.
SQL> INSERT INTO anuj VALUES (1,'B',SYSDATE);
1 row created.
SQL> commit;
Commit complete.
SQL> SELECT ORA_ROWSCN, a.* FROM anuj a;
ORA_ROWSCN C1 C2
---------- ---------- ------------------------------------------------
C3
---------------
45111390 1 A
18-AUG-10
45111390 1 B
18-AUG-10
Subscribe to:
Posts (Atom)
Oracle DBA
anuj blog Archive
- ► 2011 (362)