-
How create a virtual private database on user?
Hi,
I've table TEST with these col:
NAME................VARCHAR2(50)
ADDRESS1............VARCHAR2(50)
STATE_ID............VARCHAR2(32)
CITY_ID.............VARCHAR2(48)
COUNTY_ID...........VARCHAR2(16)
CONNECT TOM/TOM@SERVICE
select count(*)
from test;
COUNT(*)
----------
2534
I'd like create a "virtual private database" to add a predicate to SELECT statement to user TOM
SELECT *
FROM TEST
WHERE NAME='JOHN';
select count(*)
from test
WHERE NAME='JOHN';
COUNT(*)
----------
2
When TOM connect to Oracle He must see just 2 records on table TEST
I know I must work following these steps:
1) connect sys/change_on_install@service as sysdba
grant create any context to TOM;
grant drop any context to TOM;
create context context_test using set_my_context;
2)connect TOM/TOM@SERVICE
create or replace package set_my_context as
procedure MY_TEST;
end;
create or replace package body set_my_context is
procedure MY_TEST is
WHAT I MUST WRITE HERE????
3)connect sys/change_on_install@service as sysdba
execute dbms_rls.add_policy ('object_schema','object_name',.........);
4)connect TOM/TOM@SERVICE
execute set_my_context.object_name;
create or replace trigger on_logon
after logon
on tom.schema
begin
set_my_context.object_name;
end;
How can I write my procedures to add security at my database????
Thanks
Raf
-
i have never heard about the concept of virtual private database.
can anybody tell me what is this conecpt.is it available on oracle
n santoh
-
Originally posted by santimn_sai
i have never heard about the concept of virtual private database.
can anybody tell me what is this conecpt.is it available on oracle
That is the reason Oracle creates lots of documentation.
http://download-west.oracle.com/docs...ro.htm#1011779
All the best...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|