Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie question on user rights

0 views
Skip to first unread message

gpadu99

unread,
Nov 19, 2009, 9:24:41 AM11/19/09
to
A user corresponds to a schema. I am working on a database in which
something strange happens: A user, can select or update records in
another schema. How can I be sure that, no user other than the one
with same name (as the schema name), can sonnect to that schema?

Thanks very much for answering this newbie question..

gazzag

unread,
Nov 19, 2009, 9:30:20 AM11/19/09
to

You will find that the user has been granted SELECT and UPDATE
privileges to objects in the other schema - this is not by default.
You (the DBA) will have to revoke these rights if this is not what you
want.

Look in the Oracle documentation for the GRANT and REVOKE commands.
The data dictionary view DBA_TAB_PRIVS is a view that will provide you
with the relevant information.

HTH

-g

gpadu99

unread,
Nov 19, 2009, 10:35:33 AM11/19/09
to

Thanks for the quick answer. Is it normal that, the user that an
application uses to connect to the database, has the DBA role? (I
think not). Does this explain the fact that this user has access to
another schema?

gazzag

unread,
Nov 19, 2009, 11:12:08 AM11/19/09
to
On 19 Nov, 15:35, gpadu99 <gpad...@gmail.com> wrote:
> Thanks for the quick answer. Is it normal that, the user that an
> application uses to connect to the database, has the DBA role? (I
> think not). Does this explain the fact that this user has access to
> another schema?- Hide quoted text -
>

Normal? Sadly yes, in my experience. Correct? Definitely not;
merely an indication of lazy development.

The DBA role has many privileges associated with it including SELECT
ANY TABLE which, as you correctly surmise, is allowing the user you're
talking about to see (and update, truncate or even drop!) any table
within the database and so is a security risk.

The following query will show you what privileges are given to a
particular user/role:

SELECT PRIVILEGE
FROM dba_sys_privs
WHERE grantee='<user_or_role_name>'
ORDER BY privilege;

HTH

-g


0 new messages