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 -> Multiple databases in one instance

Multiple databases in one instance

From: Tim Shute <tshute_at_nisoft.com>
Date: Thu, 3 Jan 2002 14:46:28 +0000 (UTC)
Message-ID: <8147635c4574edd1281a61cb934d7043.46509@mygate.mailgate.org>


Hi all

We need to put multiple, separate 'sets' of data into one instance, each set of data owned by a different schema. This is to run on a centralised database server on a central server to clients around the globe.

I intend to allow different users access to only one of the sets of data by granting them rights individually (each user works at a different client site).

For example, SCHEMA1 has a table BANANAS and SCHEMA2 also has a table BANANAS. USER1 should only have access to SCHEMA1's objects and USER2 should only have access to SCHEMA2's objects. So, I created 2 roles ROLE1 and ROLE2 and granted rights to those roles: -
> CONNECT SCHEMA1/PASSWORD_at_BIGDATABASE

Connected
> GRANT ALL ON BANANAS TO ROLE1;

Grant succeeded
> GRANT ROLE1 TO USER1;

Grant succeeded

> CONNECT SCHEMA2/PASSWORD_at_BIGDATABASE

Connected
> GRANT ALL ON BANANAS TO ROLE2;

Grant succeeded
> GRANT ROLE2 TO USER2;

Grant succeeded

I then log on as each user and create a private synonym: -

> CONNECT USER1/PASSWORD_at_BIGDATABASE

Connected
> CREATE SYNONYM BANANAS FOR SCHEMA1.BANANAS;
Synonym created

> CONNECT USER2/PASSWORD_at_BIGDATABASE

Connected
> CREATE SYNONYM BANANAS FOR SCHEMA2.BANANAS;
Synonym created

This means that, in our application a user logs on and runs the SQL statement "SELECT * FROM BANANAS" and the data that is returned depends on who the user is.

Is this best practice? Is there a reasonable limit to how many set of data can be handled this way? Is there a better way of doing it?????

Thanks in advance for your answers.

Tim.
==

-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Thu Jan 03 2002 - 08:46:28 CST

Original text of this message

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