Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create User
Thedevastator <member_at_dbforums.com> 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
Here's a little example for you.
sqlplus system/damnwhatwasmysystemspassword
SQL> create user thedevastator identified by
whateverpasswordheshouldhave;
User created
2. Give User the right to connect to the database
SQL> grant connect to thedevastator;
GRANT succeded
3. Connect as the user who owns the tables, the user thedevastator should
be able to read
SQL> connect readmytables/mypassword
connected
4. Grant select on the tables
SQL> grant select on damntableone to thedevastator;
grant succeded
5. Repeat this for alle the tables the user thedevastator should read
6. connect as user thedevastator
SQL> connect thedevastator/whateverpasswordheshouldhave
connected
7. Now you can select data form the tables of user readmytables SQL> select * from readmytables.damntableone;
8. RTFM, this is a real easy thing described in the manual 9. Netiquette...what is your realname
-- Markus Boehmer mailto:boehmerm_at_gmx.deReceived on Sat Jun 15 2002 - 07:07:55 CDT