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: Create User

Re: Create User

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 17 Jun 2002 16:08:35 GMT
Message-ID: <3D0E0975.5C012562@exesolutions.com>


Thedevastator wrote:

> Can anyone help me creating a user from the SQLPLUS console ?
>
> create user user1 idientified by user1
>
> i know very little about oracle command line paremeters to create a
> user.. with only readonly access..
>
> ive read something about roles .. could someone give me a command line
> example so the new user has only Read/only access to all my tables ??
>
> any help appriciated
>
> thanks
>
> --
> Posted via dBforums
> http://dbforums.com

Well you have received some answers that send shivers up my spine.

The first grants permissions irrelevant to the requirement. The second doesn't even allow the user to connect to the database.

To create a user with read-only access:

CREATE USER <user_name>
IDENTIFIED BY <password>
TEMPORARY TABLESPACE <temp_tablespace_name>;

To allow that user to connect to the database DO NOT grant them the CONNECT role which has nothing to do with connecting to the database ... rather:

GRANT CREATE SESSION TO <user_name>;

And if you want that user to be able to create synonyms to make it easier to access objects:

GRANT CREATE SYNONYM TO <user_name>;

though this is entirely optional.

Finally, log on as any schema owner with objects for the new schema to query and:

GRANT SELECT ON <object_name> TO <the_new_schema_name>;

and repeat once for each object they need to access.

Daniel Morgan Received on Mon Jun 17 2002 - 11:08:35 CDT

Original text of this message

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