Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Ora-1031 (Insufficient Privileges) Inserting BLOB Data With Perl

Re: Ora-1031 (Insufficient Privileges) Inserting BLOB Data With Perl

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Tue, 20 Nov 2001 07:00:44 -0800
Message-ID: <F001.003C9546.20011120063017@fatcity.com>

Do 'other users' have any quota on 'BABAR_PAPERS_DATA' tablespace (where LOB is stored)?

Igor Neyman, OCP DBA
ineyman_at_perceptron.com

> One of our developers has written a program to upload files into the
database via perl. The actual file contents are stored in a blob.
>
> The table was created with the following script
>
> CREATE TABLE BP_FILES
> (FILE_ID NUMBER(7,0) NOT NULL
> ,FILE_TYPE VARCHAR2(1) NOT NULL
> ,FILE_FORMAT VARCHAR2(1) NOT NULL
> ,FILE_NAME VARCHAR2(80) NOT NULL
> ,FILE_PRIVATE VARCHAR2(1) NOT NULL
> ,COMMENTS VARCHAR2(240)
> ,DATE_CREATED DATE NOT NULL
> ,CREATED_BY VARCHAR2(30) NOT NULL
> ,DATE_UPDATED DATE
> ,UPDATED_BY VARCHAR2(30)
> ,CONTENT_TYPE VARCHAR2(240)
> ,CONTENT_DISPOSITION VARCHAR2(240)
> ,FILE_DATA BLOB
> Lob(FILE_DATA) STORE AS babar_papers_lob
> (TABLESPACE BABAR_PAPERS_DATA
> PCTVERSION 5
> ENABLE STORAGE IN ROW
> CHUNK 8192
> NOCACHE LOGGING)
> /
> --------------------------------------------------------------------------



> The owner of the table can perform inserts including BLOB data without
problems. Other users can insert rows which do not contain BLOB data without problems, but when they try to insert a row which contains BLOB data the following error is issued ...
>
> ORA-01031: insufficient privileges (DBD ERROR: OCILobTrim/OCILobWrite/LOB
refetch)
>
>
> The statement involved is
>
> insert into <owner>.BP_FILES ( file_id, file_type, file_format, file_name,
file_private, comments, file_data, date_created, created_by, date_updated, updated_by, content_type, content_disposition ) VALUES ( ?, ?, ?, ?, ?, ?, ?, SYSDATE, ?, SYSDATE, ?, ?, ? )
>
> The question marks are place-holders for bind variables in Perl.
>
>
> Ian MacGregor
>
>
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: MacGregor, Ian A.
> INET: ian_at_SLAC.Stanford.EDU
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Igor Neyman
  INET: ineyman_at_perceptron.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Nov 20 2001 - 09:00:44 CST

Original text of this message

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