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 database link with 'view only' privilages

Re: create database link with 'view only' privilages

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 10 Sep 2001 08:43:59 -0700
Message-ID: <9nin3v02qdl@drn.newsguy.com>


In article <3b9cd281.422526450_at_news.globix.com>, andreyNSPAM_at_bookexchange.net says...
>
>is there are a way to do this?
>
>I need to create a 'staging' database which would point to a central
>reg database, but I'd like to make sure that staging database makes no
>changes to the central database.
>
>Thanx.
>.......
>We use Oracle 8.1.6-8.1.7 on Solaris 2.6, 2.7 boxes
>Andrey Dmitriev eFax: (978) 383-5892 Daytime: (917) 750-3630
>AOL: NetComrade ICQ: 11340726 remove NSPAM to email

create a user on the central_database, say "public_read/password".

grant that user SELECT on the required tables. Create private synonyms in that schema (for ease, not really needed)

On the staging database, create the database link with:

create public database link central_database connect to public_read
identified by password
using '.....';

Now, when someone uses that db link, they'll only have the privs associated with 'public_read'. Nothing more, nothing less.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Mon Sep 10 2001 - 10:43:59 CDT

Original text of this message

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