DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: user security

  1. #1
    Join Date
    Mar 2001
    Posts
    38
    if there is two user A & B have all grant on table
    emp.is there any way,so that user A can't select & update any data in emp insert by user B
    el472@hotmail.com

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Store the USERID (B) in one column. And then use this column for the update statement whenever USER A updates the table.

  3. #3
    Join Date
    Mar 2001
    Posts
    38
    i didn't get it.can u explain...
    el472@hotmail.com

  4. #4
    Join Date
    Jul 2000
    Posts
    296
    Add a new column in which you store the user who inserted the column, A or B. Create a view dependent on the user column and grant select on the view to A and B.

    something like:

    CREATE TABLE scott.emp
    ( empno number
    , ename varchar2(30)
    , username varchar2(30)
    );

    CREATE VIEW scott.emp_view
    AS
    SELECT empno, ename
    FROM scott.emp
    WHERE username = USER;

    CREATE PUBLIC SYNONYM emp FOR scott.emp_view;

    GRANT SELECT ON emp_view to A,B;



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width