dbTalk Databases Forums  

are the ALL_* views usually viewable by all users?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss are the ALL_* views usually viewable by all users? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mh@pixar.com
 
Posts: n/a

Default are the ALL_* views usually viewable by all users? - 06-02-2008 , 12:41 PM






I'm currently querying the USER_* views to do introspection
on a user's schema. But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute DBMS_UTILITY.NAME_RESOLVE or
access the ALL_* views?

If so, what's the role they should have to access these?
Will that be a common case?

Many TIA,
Mark


--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #2  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-02-2008 , 01:53 PM






Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE
I haven't found any, so no.

Quote:
or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

Quote:
If so, what's the role they should have to access these?
Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:


SQL> create user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
2 sch varchar2(40);
3 p1 varchar2(40);
4 p2 varchar2(40);
5 dblink varchar2(40);
6 p1t number;
7 objnum number;
8 begin
9 dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
10 dbms_output.put_line(sch||' '||p1||' '||p2||' '||
dblink||' '||p1t||' '||objnum);
11 end;
12 /
BING TEST 2 68806

PL/SQL procedure successfully completed.

SQL>

Quote:
Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Quote:
Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell


Reply With Quote
  #3  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-02-2008 , 01:53 PM



Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE
I haven't found any, so no.

Quote:
or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

Quote:
If so, what's the role they should have to access these?
Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:


SQL> create user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
2 sch varchar2(40);
3 p1 varchar2(40);
4 p2 varchar2(40);
5 dblink varchar2(40);
6 p1t number;
7 objnum number;
8 begin
9 dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
10 dbms_output.put_line(sch||' '||p1||' '||p2||' '||
dblink||' '||p1t||' '||objnum);
11 end;
12 /
BING TEST 2 68806

PL/SQL procedure successfully completed.

SQL>

Quote:
Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Quote:
Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell


Reply With Quote
  #4  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-02-2008 , 01:53 PM



Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE
I haven't found any, so no.

Quote:
or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

Quote:
If so, what's the role they should have to access these?
Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:


SQL> create user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
2 sch varchar2(40);
3 p1 varchar2(40);
4 p2 varchar2(40);
5 dblink varchar2(40);
6 p1t number;
7 objnum number;
8 begin
9 dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
10 dbms_output.put_line(sch||' '||p1||' '||p2||' '||
dblink||' '||p1t||' '||objnum);
11 end;
12 /
BING TEST 2 68806

PL/SQL procedure successfully completed.

SQL>

Quote:
Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Quote:
Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell


Reply With Quote
  #5  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-02-2008 , 01:53 PM



Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE
I haven't found any, so no.

Quote:
or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

Quote:
If so, what's the role they should have to access these?
Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:


SQL> create user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
2 sch varchar2(40);
3 p1 varchar2(40);
4 p2 varchar2(40);
5 dblink varchar2(40);
6 p1t number;
7 objnum number;
8 begin
9 dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
10 dbms_output.put_line(sch||' '||p1||' '||p2||' '||
dblink||' '||p1t||' '||objnum);
11 end;
12 /
BING TEST 2 68806

PL/SQL procedure successfully completed.

SQL>

Quote:
Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Quote:
Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell


Reply With Quote
  #6  
Old   
Mark D Powell
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-03-2008 , 11:59 AM



On Jun 2, 2:53*pm, "fitzjarr... (AT) cox (DOT) net" <orat... (AT) msn (DOT) com> wrote:
Quote:
Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:

I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE

I haven't found any, so no.

*or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

If so, what's the role they should have to access these?

Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:

SQL> create *user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
* 2 * * *sch * *varchar2(40);
* 3 * * *p1 * * varchar2(40);
* 4 * * *p2 * * varchar2(40);
* 5 * * *dblink varchar2(40);
* 6 * * *p1t number;
* 7 * * *objnum number;
* 8 *begin
* 9 * * dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
*10 * * * * *dbms_output.put_line(sch||' * '||p1||' '||p2||''||
dblink||' '||p1t||' '||objnum);
*11 *end;
*12 */
BING * TEST * 2 68806

PL/SQL procedure successfully completed.

SQL

Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell
I will just add to David's response that by default Oracle grants
execute on dbms_utility to public via catproc. If you site has
removed some of the public grants you may need to restore the
privilege or provide the privilege via a role.

Also as mentioned the ALL_ views are sensitive to the querying user's
privilege set. If you are going to code any of the queries into
stored code you could be changing the result set unless you use
current user authorization.

HTH -- Mark D Powell --




Reply With Quote
  #7  
Old   
Mark D Powell
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-03-2008 , 11:59 AM



On Jun 2, 2:53*pm, "fitzjarr... (AT) cox (DOT) net" <orat... (AT) msn (DOT) com> wrote:
Quote:
Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:

I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE

I haven't found any, so no.

*or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

If so, what's the role they should have to access these?

Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:

SQL> create *user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
* 2 * * *sch * *varchar2(40);
* 3 * * *p1 * * varchar2(40);
* 4 * * *p2 * * varchar2(40);
* 5 * * *dblink varchar2(40);
* 6 * * *p1t number;
* 7 * * *objnum number;
* 8 *begin
* 9 * * dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
*10 * * * * *dbms_output.put_line(sch||' * '||p1||' '||p2||''||
dblink||' '||p1t||' '||objnum);
*11 *end;
*12 */
BING * TEST * 2 68806

PL/SQL procedure successfully completed.

SQL

Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell
I will just add to David's response that by default Oracle grants
execute on dbms_utility to public via catproc. If you site has
removed some of the public grants you may need to restore the
privilege or provide the privilege via a role.

Also as mentioned the ALL_ views are sensitive to the querying user's
privilege set. If you are going to code any of the queries into
stored code you could be changing the result set unless you use
current user authorization.

HTH -- Mark D Powell --




Reply With Quote
  #8  
Old   
Mark D Powell
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-03-2008 , 11:59 AM



On Jun 2, 2:53*pm, "fitzjarr... (AT) cox (DOT) net" <orat... (AT) msn (DOT) com> wrote:
Quote:
Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:

I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE

I haven't found any, so no.

*or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

If so, what's the role they should have to access these?

Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:

SQL> create *user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
* 2 * * *sch * *varchar2(40);
* 3 * * *p1 * * varchar2(40);
* 4 * * *p2 * * varchar2(40);
* 5 * * *dblink varchar2(40);
* 6 * * *p1t number;
* 7 * * *objnum number;
* 8 *begin
* 9 * * dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
*10 * * * * *dbms_output.put_line(sch||' * '||p1||' '||p2||''||
dblink||' '||p1t||' '||objnum);
*11 *end;
*12 */
BING * TEST * 2 68806

PL/SQL procedure successfully completed.

SQL

Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell
I will just add to David's response that by default Oracle grants
execute on dbms_utility to public via catproc. If you site has
removed some of the public grants you may need to restore the
privilege or provide the privilege via a role.

Also as mentioned the ALL_ views are sensitive to the querying user's
privilege set. If you are going to code any of the queries into
stored code you could be changing the result set unless you use
current user authorization.

HTH -- Mark D Powell --




Reply With Quote
  #9  
Old   
Mark D Powell
 
Posts: n/a

Default Re: are the ALL_* views usually viewable by all users? - 06-03-2008 , 11:59 AM



On Jun 2, 2:53*pm, "fitzjarr... (AT) cox (DOT) net" <orat... (AT) msn (DOT) com> wrote:
Quote:
Comments embedded.
On Jun 2, 12:41*pm, m... (AT) pixar (DOT) com wrote:

I'm currently querying the USER_* views to do introspection
on a user's schema. *But, in order to handle aliases, I need
to use DBMS_UTILITY.NAME_RESOLVE and the ALL_* views.

Will I enounter any unexpected issues where a random user
won't be able to execute *DBMS_UTILITY.NAME_RESOLVE

I haven't found any, so no.

*or
access the ALL_* views?

No, as the ALL_* views report all of the oibjects the currently
connected user can access.

If so, what's the role they should have to access these?

Even a freshly created user with only CREATE SESSION privilege can
execute DBMS_UTILITY.NAME_RESOLVE so no special privileges need be
granted:

SQL> create *user blerp identified by blorp;

User created.

SQL> grant create session to blerp;

Grant succeeded.

SQL> grant select on test to blerp;

Grant succeeded.

SQL> connect blerp/blorp@###########
Connected.
SQL> declare
* 2 * * *sch * *varchar2(40);
* 3 * * *p1 * * varchar2(40);
* 4 * * *p2 * * varchar2(40);
* 5 * * *dblink varchar2(40);
* 6 * * *p1t number;
* 7 * * *objnum number;
* 8 *begin
* 9 * * dbms_utility.name_resolve('BING.TEST',2,sch, p1,p2, dblink,
p1t, objnum);
*10 * * * * *dbms_output.put_line(sch||' * '||p1||' '||p2||''||
dblink||' '||p1t||' '||objnum);
*11 *end;
*12 */
BING * TEST * 2 68806

PL/SQL procedure successfully completed.

SQL

Will that be a common case?

It should be common that you shouldn't have issues, in my opinion.

Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios

David Fitzjarrell
I will just add to David's response that by default Oracle grants
execute on dbms_utility to public via catproc. If you site has
removed some of the public grants you may need to restore the
privilege or provide the privilege via a role.

Also as mentioned the ALL_ views are sensitive to the querying user's
privilege set. If you are going to code any of the queries into
stored code you could be changing the result set unless you use
current user authorization.

HTH -- Mark D Powell --




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.