Home » RDBMS Server » Server Administration » Grant SELECT through synonym
Grant SELECT through synonym [message #516583] Tue, 19 July 2011 07:44 Go to next message
ArcR
Messages: 4
Registered: July 2011
Junior Member
Hi Mahesh,

Could you explain why the following is working,

SQL> create table test as select * from employee;

Table created.

SQL> create synonym test_sym for employee;

Synonym created.

SQL> grant select on test_sym to chandhu;

Grant succeeded.

SQL>
Re: difference between V_$ and V$ views [message #516585 is a reply to message #516583] Tue, 19 July 2011 07:49 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why wouldn't it work? Privileges can be granted on tables, (views, materialized views, sequences, procedures, etc. - check the documentation) as well as synonyms for any of the preceding items.
Re: difference between V_$ and V$ views [message #516588 is a reply to message #516583] Tue, 19 July 2011 07:52 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
So NOT hijack other topic with unrelated question, create your own.

Please read OraFAQ Forum Guide.

Regards
Michel
Re: difference between V_$ and V$ views [message #516612 is a reply to message #516588] Tue, 19 July 2011 10:54 Go to previous messageGo to next message
ArcR
Messages: 4
Registered: July 2011
Junior Member
Sorry for replying to that post,

But my question was related to that post,

As mahesh said v$log is a synonym for the view v_$log

My question is why can't we grant select on v$log,

but we can grant select to other synonyms .
Re: difference between V_$ and V$ views [message #516613 is a reply to message #516612] Tue, 19 July 2011 11:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SYS is special, SYS does not act like any other user, whatever you do with SYS will neither validate nor invalidate the same thing with any other user.
It is also true for SYS objects.

Regards
Michel

[Updated on: Tue, 19 July 2011 11:03]

Report message to a moderator

Re: difference between V_$ and V$ views [message #516616 is a reply to message #516612] Tue, 19 July 2011 11:19 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> connect / as sysdba
Connected.
SQL> grant select on v$log to user1;
grant select on v$log to user1
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
Re: difference between V_$ and V$ views [message #516619 is a reply to message #516616] Tue, 19 July 2011 11:39 Go to previous messageGo to next message
ArcR
Messages: 4
Registered: July 2011
Junior Member
Yes BlackSwan, that is what i am asking,

why can't we grant access to v$log like normal synonym, even as sys user.

my question is : Is there any difference between normal synonyms and v$ synonyms?

Michel, i am sorry i didn't get you.
Re: difference between V_$ and V$ views [message #516621 is a reply to message #516619] Tue, 19 July 2011 11:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
What don't you understand in what I posted?
I think it is quite clear.
Whatever applies to SYS or SYS objects does not apply to any other user or user objects and vice versa.
You in any way can compare them.

Regards
Michel
Re: difference between V_$ and V$ views [message #516622 is a reply to message #516619] Tue, 19 July 2011 12:02 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
recursive definition?

SQL> select text from dba_views where view_name = 'V_$LOG';

TEXT
--------------------------------------------------------------------------------
select "GROUP#","THREAD#","SEQUENCE#","BYTES","BLOCKSIZE","MEMBERS","ARCHIVED","
STATUS","FIRST_CHANGE#","FIRST_TIME","NEXT_CHANGE#","NEXT_TIME" from v$log

SQL> show user
USER is "SYS"

so what is "v$log" above?
The "V$" views are not real objects but mapped to memory structures in SGA
Re: difference between V_$ and V$ views [message #516628 is a reply to message #516622] Tue, 19 July 2011 12:38 Go to previous messageGo to next message
ArcR
Messages: 4
Registered: July 2011
Junior Member
Thank you BlackSwan for explaining,

Could you also help me find where the v$ views are mapped in SGA and how to find it
Re: difference between V_$ and V$ views [message #516629 is a reply to message #516628] Tue, 19 July 2011 12:44 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Could you also help me find where the v$ views are mapped in SGA and how to find it
NO
Re: difference between V_$ and V$ views [message #516630 is a reply to message #516628] Tue, 19 July 2011 12:45 Go to previous message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Think that all of them are, you don't need to know more.
By the way, BlackSwan did not explain anything about why you can in one case and not in another one, I wonder what you understood.

Regards
Michel

[Updated on: Tue, 19 July 2011 13:08]

Report message to a moderator

Previous Topic: rare log archiization issue
Next Topic: Oracle Database Server(2 Merged)
Goto Forum:
  


Current Time: Fri Nov 29 06:53:43 CST 2024