Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Rights needed to connect oracle7 DB

Re: Rights needed to connect oracle7 DB

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Thu, 27 May 2004 08:43:17 +1000
Message-ID: <40b51d79$0$13784$afc38c87@news.optusnet.com.au>

"Romain A" <romain.anselin_at_REMOVETHISclub-internet.fr> wrote in message news:c92eea$h37$1_at_s1.read.news.oleane.net...
> Hello all,
>
> I'm creating a procedure in order to mount an Oracle 7.3.4 database on
> NT4 in less than 45 minutes with batch scripts (preparing my
examinations).
> I'm a beginner in using Oracle, and I'm discovering the privileges of the
> database.
> The role I created have the right to manipulate the datas (select on all
> tables ; insert, update, delete, select on PHOTO which has to be modified
by
> the user), and I added the right of CREATE SESSION.
> But even through that, when I connect to the database with the user login,
I
> cannot do
> anything (even a select give me the following error).
> The error number is ORA-00942 - Table or view does not exist

Of course. It is not sufficient to grant a role to a user. You have to activate it.

If I summarise your script, it says:

create role X;
create user Y;
grant select on a table to X;
grant role X to user Y;

So, user Y should be able to select from the table? Not unless user Y logs on and then issues the command
SET ROLE X; The alternative is to say:

alter user Y default role all;

(or ...default role X if you want to be very specific).

A default role is one which is switched on merely by virtue of the user logging on to the database, so no explicit 'set role' command is needed to activate it.

If I've misunderstood the problem, my apologies.

Regards
HJR Received on Wed May 26 2004 - 17:43:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US