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 -> Implementing row-level security.

Implementing row-level security.

From: Suwat Kan. <swkanj_at_asiaaccess.net.th>
Date: 14 Jun 1998 12:45:27 GMT
Message-ID: <01bd9792$85af00a0$d40e91cb@computer>


Dear Sir,

        I have a problem about implementing the row-level security. My situation is as follow :

I have a table :	EMP_SALARY
		(EMP_CODE  	VARCHAR2 (5),
		 DEPT_CODE	VARCHAR2 (10),
		 SALARY		NUMBER (8));

	data :	00001, ACCOUNT, 15000
		00002, FINANCE, 12000
		00003, FINANCE, 20000
		00004, ACCOUNT, 18000

I have 3 users :	admin	can select all data and own the table EMP_SALARY and
			grant the select privilege on table EMP_SALARY to user1 and user2
		user1	can select only data with dept_code = 'ACCOUNT' and
			own the synonym EMP_SALARY reference to ADMIN.EMP_SALARY
		user2	can select only data with dept_code = 'FINANCE' and
			own the synonym EMP_SALARY reference to ADMIN.EMP_SALARY

The condition that I need is :
	If I login as user1, using the select statement :	select * from
emp_salary;
		    the displayed data should be :	00001, ACCOUNT, 15000
						00004, ACCOUNT, 18000

	And if I login as user2, using the select statement :  select * from
emp_salary;
		    the displayed data should be :	00002, FINANCE, 12000
						00003, FINANCE, 20000

In the situation above, if I don't want to create view to filter the row for user1 and user2, is there any
other options to achieve this task. If you have any suggestions, please mail to me,
my e-mail address is : swkanj_at_asiaaccess.net.th
						Thank you very much for your help,
						         Suwat  Kanjanavathang

Received on Sun Jun 14 1998 - 07:45:27 CDT

Original text of this message

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