Home » RDBMS Server » Security » schema which only selects tables
schema which only selects tables [message #147277] Thu, 17 November 2005 00:26 Go to next message
gautamvv
Messages: 254
Registered: June 2005
Senior Member
i want to create a schema, which only can select from tables, it cannot create tables, views, procedures etc....

its like, the schema should be read only, it should only

select from tables...
Re: schema which only selects tables [message #147278 is a reply to message #147277] Thu, 17 November 2005 00:32 Go to previous messageGo to next message
gautamvv
Messages: 254
Registered: June 2005
Senior Member
oracle version is 9
Re: schema which only selects tables [message #147280 is a reply to message #147278] Thu, 17 November 2005 00:40 Go to previous message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

I think you can achieve it like this.

-- create a user
-- grant "connect" role to the user
-- grant "select" privilege on selected tables.

SQL> create user newbie identified by newbie
            default tablespace users;
User created.

SQL> grant connect to newbie;
Grant succeeded.

SQL> grant select on answr to newbie;

Grant succeeded.

SQL> show user
USER is "SCOTT"

SQL> conn newbie/newbie
Connected.
SQL> select * from scott.answr;

    ANS_ID ANS                  AC       Q_ID
---------- -------------------- -- ----------
      8806 apple                n        2165
      8807 orange               n        2165

10 rows selected.

SQL> create table abc(n1 number);
create table abc(n1 number)
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'USERS'

[Updated on: Thu, 17 November 2005 00:41]

Report message to a moderator

Previous Topic: how do I set connect / as sysdba?
Next Topic: User Rights
Goto Forum:
  


Current Time: Thu Dec 02 09:17:13 CST 2021