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: immutable LOBs

Re: immutable LOBs

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 07 Jan 2005 09:20:22 -0800
Message-ID: <41dec3a7$1_4@127.0.0.1>


Volker Apelt wrote:

> DA Morgan <damorgan_at_x.washington.edu> writes:
>
>

>>Volker Apelt wrote:
>>
>>
>>>Oracle 92i Is there any way to mark LOBs as read-only? How do you
>>>track changes to LOBs and trigger updates of meta data like MD5 sum?
>>>AFAIK, Triggers catch access to rows, but not DBMS_LOB.OPEN
>>>or .WRITE. Thanks,
>>
>>CREATE TABLESPACE ro_data ...
>>
>>CREATE TABLE lobtab (
>>   row data in tbs1, lob data in ro_data
>>
>>ALTER TABLESPACE ro_data READ ONLY;

>
>
> Thanks Daniel,
>
> But, That will work with batch loading the LOBS only.
>
> The intended workflow is:
>
> Create row with empty lob, load one LOB, mark it immutable.
> Create row with empty lob, load one LOB, mark it immutable.
> ..
>
> instead of
>
> Create row with empty lob, load one LOB.
> Create row with empty lob, load one LOB.
> mark all immutable, by setting the LOB tablespace to readonly.
>
> Do you know of some object type that mirrors the DBMS_LOB methods
> but permitts to set a readonly attribute individually for each
> LOB?
>
> Thanks,
>
> Volker

In view of the intended workflow my solution would be to create a view that consists of SELECT * FROM ....

Then write an instead of trigger on the view that allows what you want and blocks what you don't want.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Fri Jan 07 2005 - 11:20:22 CST

Original text of this message

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