Hello,
Is it possible to 'hide' a column in an Oracle 10g database, or prevent data from being inserted altogether? We'd prefer to have existing INSERT statements still function, but have the information NOT insert for a particular column. Also, column masking or any type of encryption is not preferred.
Not sure if it's possible, but thanks in advance.
-
With Oracle feature virtual private database (VPD) you can define which users can change and which users can select a column. Virtual private database is also called fine-grained access control (FGAC).
-
If all you need to do is stop data from being inserted, you could create a BEFORE INSERT FOR EACH ROW trigger that wipes out any value inserted into the column before the row is saved.
There are various other things you can do with security (also views) to prevent inserts/selects from particular users in particular circumstances, but these will probably not let existing inserts continue to work.
: This is most likely the route we would like to take... Do you know if the original INSERT event would be logged, or just the trigger event? Thanks!Eric Rosenberger : Depends what you mean by "logged"... As far as the transaction log goes, it should only be a single INSERT with the values as modified by the trigger (i.e., there wouldn't be two entries), but I suppose a lower-level audit log or something might record the original version somewhere... -
Rename original table, create view with original table name but only selecting the columns you want to show.
Recompile code referring to existing table.
-
what about just setting your grants to each item you allow to update or insert
grant select on emp to scott;
grant update (column1, column2), insert (column1) on emp to scott
0 comments:
Post a Comment