Re: How can users be arranged into a group?

From: <mlanda_at_vnet.ibm.com>
Date: 1995/11/28
Message-ID: <49fbgb$mck_at_watnews1.watson.ibm.com>#1/1


In <49enme$cav_at_mrnews.mro.dec.com>, ronald_at_mix004.nwg.dec.com (Ronald van der Burg) writes:
>Hi,
>
>Thanks for reading. I created a number of user accounts on an Oracle db, each
>with default tablespace 'USERS'. If one user creates a table, how can it be
>made visible to other users?
>
>Unix makes it possible to arrange users into a group. All users belonging to a
>group can share files easely. Can this be done in a similar way with Oracle?
>If so, how?
>
>Thanks in advance!
>
>Ronald van der Burg

  1. Create a role (connect as dba)

   example:

   create role Dept_users;

2) Grant that role's privliges to your indvidual users.

   Example:

   Grant Dept_users to Diane;
   Grant dept_users to fred;
   Grant dept_users to George;


3) If user diane creates a table she will grant the required priviliges

   to role Dept_users which will grant that privilige to all users assigned    role Dept_users.

   Example:

   Grant select on diane.Product_table to Dept_users;

   In this example users fred and george will be able to select data    from diane's table "Product_table".

Note: This is a very simple example but it should get you going in the right direction.

Now, your previous append concerning tables created in the system tablespace.

I am assuming you created some tables in the system tablespace using the system account and you now want to move these tables to tablespace Users while changing the table's owner.

Let's assume you want to move table "price_table" from the system tablespace to tablespace Users and assign ownership to user diane (who has default tablespace of Users assigned).

  1. connect as system.
  2. Grant select on price_table to diane;
  3. Connect as diane.
  4. Create table price_table as select * from system.price_table;
  5. Recreate any indexes you may have on this table.
  6. Grant any required permissions.
  7. Connect as system and drop the price table.

That's about it.

M.Landa Received on Tue Nov 28 1995 - 00:00:00 CET

Original text of this message