DBMS_LOB: ORA-22288: LOB operation FILEOPEN or file failed
HelloConsider the following code:
< pre >
DECLARE
lv_src_loc BFILE.
lv_directory VARCHAR2 (100): = "TESTDIR".
lv_filename VARCHAR2 (100): = testfile.log';
BEGIN
lv_src_loc: = BFILENAME (lv_directory, lv_filename);
DBMS_LOB. OPEN (lv_src_loc, DBMS_LOB. LOB_READONLY);
END;
< / pre >
< pre >
When I run the above code, I get the following error:
ORA-22288: file or LOB FILEOPEN operation failed
No such file or directory
ORA-06512: at "SYS." DBMS_LOB", line 828
ORA-06512: at line 15 level
< / pre >
The directory specified by the directory TESTDIR AS db is actually located on a Server Web Unix Boxing.
Now I wonder, is it necessary that the actual filesystem directory pointed to by the database WHAT TESTDIR directory be on the Unix machine on which the database server is running?
If so, then what other options I have to read a file file system that is not on the database Unix machine and throw in a database table?
Grateful for your help!
Thank you.
Sylvie Shearer wrote:
The directory specified by the directory TESTDIR AS db is actually located on a Server Web Unix Boxing.
Now I wonder, is it necessary that the actual filesystem directory pointed to by the database WHAT TESTDIR directory be on the Unix machine on which the database server is running?
Well, think a little more. How do Oracle, running on the database server, suppose to know where is this TESTDIR ? It is on a web server and not another server?
And if she knew that, how are there supposed to carve his way through the network and access of this server files and directories penetrate this server?
If so, then what other options I have to read a file file system that is not on the database Unix machine and throw in a database table?
Depends on the requirements. Why do you need to load the contents of a directory in the database tables?
You can use SQL * Loader, run on the web server and easily download a lot of files in the database. But if these o/s files are updates then the uploads of db are obsolete, and this process must be repeated again and again in order to synchronize the content of the file table of database with the actual files on the web server.
You can use Samba or NFS to share the directory on the web server and mount it locally on the database server. But this increases the number of moving parts and also increases the complexity of security and access control.
You can use the rdist (cable) of Linux/Unix command to create and manage a duplicate directory on the database server - a bit like replication at the file system level.
Or you can enable access to these files via the web server (such as a web service or directly). In this case, the database server need only the URL of the file to access. Instead of storing the actual content of the file in the database, the URL may instead be stored. And when the content is required, PL/SQL code can use UTL_HTTP for example to retrieve the content of the file.
I think that most of the other options will fall into one of these categories. The "best" depends on your needs.
Tags: Database
Similar Questions
-
LOB operation FILEOPEN or file failed
Hi all
I'm trying to load a very large xml file into an oracle database table. Here is the error I get:
SQL * more: Production of release 11.2.0.1.0 Fri Jul 11 11:39:49 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter the user name: conn virtue sysdba
Enter the password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL > create or replace directory MYXML AS ' c: / MYXML';
Created directory.
SQL > allocation the MYXML Scott repertoire.
Grant succeeded.
SQL > conn scott/tiger
Connected.
SQL > INSERT IN THIS_XML (customer, 'Date', SequenceNumber, NbMessages, version, relea
to Agency, area, function, controlNumber, pnrPurgeDate, 'number', companyId, controlN
umber2, date3, time, typeOfPnrElement, agentId, officeId, iataCode, queueingOfficeId, this
tyCode, creationOfficeId, agentSignature, creationDate, creatorIataCode, creationTime
quantity, status, officeId4, agentCode, receiveFrom, originatorId, inHouseIdentificat
ion1, originatorTypeCode, companyId5, locationId, codedCountry, originatorId6, inHouse
Identification17, originatorTypeCode8, companyId9, locationId10, codedCountry11, inHo
useIdentification112, originatorTypeCode13, companyId14, locationId15, codedCountry1
6, qualifier, numero17, segmentName, family name, quantity18, name, origin,.
qualifier19, Nombre20, segmentName21, depDate, depTime, arrDate, arrTime, dayChangeIndi
Cator, cityCode22, cityCode23, identification, identification24, classOfService, detai
l, qualifier25, date26, time27, status28, function29, companyId30, controlNumber31, quan
tity32, status33, equipment, day of the week, arrivalTerminal, departTerminal, 'option', original
atorId34, inHouseIdentification135, originatorTypeCode36, companyId37, locationId38,
codedCountry39, trueLocationId, trueLocationId40, carrierCode, flight, bookingC
Lass, flightIndicator, codeShareAgreement, cabinCode, subclassId, sourceQualifier1, co
untryCode, systemCode, groupingCode, marriageQualifier, tatooNum, marker2, qualifier41
number42, segmentName43, subjectQualifier, longFreetext, indicator, date44, official
ceId45, marker3, actionRequestCode)
with t AS (SELECT xmltype (bfilename('MYXML','sabresample.xml'), nls_charse 2
(t_id ('WE8ISO8859P1')) xmlcol FROM dual)
3. SELECT
4 extractValue (value (x), "/ LINE/Client") client
5, extractValue (value (x), "/ LINE / 'Date'") 'Date '.
6, extractValue (value (x), "/ LINE/SequenceNumber") SequenceNumber
7, extractValue (value (x), "/ ONLINE/NbMessages ') NbMessages
8, version extractValue (value (x), "/ LINE/version ')
9, release of extractValue (value (x), "/ LINE/release")
10, agency extractValue (value (x), "/ LINE/agency ')
11, area of extractValue (value (x), "/ LINE/field")
12, extractValue (value (x), "/ LINE / 'function'") 'function.
13, extractValue (value (x), "/ LINE/controlNumber") controlNumber
14, extractValue (value (x), "/ ONLINE/pnrPurgeDate ') pnrPurgeDate
15, extractValue (value (x), "/ LINE / 'number' ') 'number '.
16, companyId extractValue (value (x), "/ LINE/companyId ')
17, extractValue (value (x), "/ ONLINE/controlNumber2 ') controlNumber2
18, date3 extractValue (value (x), "/ LINE/date3")
19, time of extractValue (value (x), "/ LINE/time")
20, extractValue (value (x), "/ ONLINE/typeOfPnrElement ') typeOfPnrElement
21, agentId extractValue (value (x), "/ LINE/agentId")
22, officeId extractValue (value (x), "/ LINE/officeId")
23, extractValue (value (x), "/ ONLINE/iataCode ') iataCode
24, extractValue (value (x), "/ ONLINE/queueingOfficeId ') queueingOfficeId
25, cityCode extractValue (value (x), "/ LINE/cityCode")
26, extractValue (value (x), "/ ONLINE/creationOfficeId ') creationOfficeId
27, extractValue (value (x), "/ ONLINE/agentSignature ') agentSignature
28, extractValue creationDate (value (x), "/ LINE/creationDate")
29, extractValue (value (x), "/ ONLINE/creatorIataCode ') creatorIataCode
30, creationTime extractValue (value (x), "/ LINE/creationTime")
31, amount of extractValue (value (x), "/ LINE/amount")
32, status extractValue (value (x), "status/LINE / ')
33, extractValue (value (x), "/ ONLINE/officeId4 ') officeId4
34, extractValue (value (x), "/ ONLINE/agentCode ') agentCode
35, receiveFrom extractValue (value (x), "/ LINE/receiveFrom")
36, extractValue (value (x), "/ LINE/originatorId") originatorId
37, extractValue (value (x), "/ ONLINE/inHouseIdentification1 ') inHouseIdentification1
38, extractValue (value (x), "/ ONLINE/originatorTypeCode ') originatorTypeCode
39, extractValue (value (x), "/ ONLINE/companyId5 ') companyId5
40, locationId extractValue (value (x), "/ LINE/locationId")
41, extractValue (value (x), "/ ONLINE/codedCountry ') codedCountry
42, extractValue (value (x), "/ ONLINE/originatorId6 ') originatorId6
43, extractValue (value (x), "/ ONLINE/inHouseIdentification17 ') inHouseIdentification
17
44, extractValue (value (x), "/ ONLINE/originatorTypeCode8 ') originatorTypeCode8
45, extractValue (value (x), "/ ONLINE/companyId9 ') companyId9
46, extractValue (value (x), "/ ONLINE/locationId10 ') locationId10
47, extractValue (value (x), "/ ONLINE/codedCountry11 ') codedCountry11
48, extractValue (value (x), "/ ONLINE/inHouseIdentification112 ') inHouseIdentificatio
N112
49, extractValue (value (x), "/ ONLINE/originatorTypeCode13 ') originatorTypeCode13
50, extractValue (value (x), "/ ONLINE/companyId14 ') companyId14
51, extractValue (value (x), "/ ONLINE/locationId15 ') locationId15
52, extractValue (value (x), "/ ONLINE/codedCountry16 ') codedCountry16
53, qualifier extractValue (value (x), "/ LINE/qualifier")
54, extractValue (value (x), "/ ONLINE/numero17 ') numero17
55, extractValue (value (x), "/ ONLINE/segmentName ') segmentName
56, extractValue (value (x), "/ LINE/name of family ') family name
57, extractValue (value (x), "/ ONLINE/quantity18 ') quantity18
58, firstName extractValue (value (x), "/ LINE/firstName")
59, original extractValue (value (x), "origin/LINE / ')
60, extractValue (value (x), "/ ONLINE/qualifier19 ') qualifier19
61, numero20 extractValue (value (x), "/ ONLINE/numero20")
62, extractValue (value (x), "/ ONLINE/segmentName21 ') segmentName21
63, extractValue (value (x), "/ LINE/depDate") depDate
64, extractValue (value (x), "/ LINE/depTime") depTime
65, extractValue (value (x), "/ ONLINE/arrDate ') arrDate
66, extractValue (value (x), "/ LINE/arrTime") arrTime
67, extractValue (value (x), "/ ONLINE/dayChangeIndicator ') dayChangeIndicator
68, extractValue (value (x), "/ ONLINE/cityCode22 ') cityCode22
69, extractValue (value (x), "/ ONLINE/cityCode23 ') cityCode23
70, identification of extractValue ((x) value, "the identification/LINE / ')
71, extractValue (value (x), "/ ONLINE/identification24 ') identification24
72, extractValue (value (x), "/ LINE/classOfService") classOfService
73, extractValue (value (x), "/ ONLINE/retail") detail
74, extractValue (value (x), "/ ONLINE/qualifier25 ') qualifier25
75, extractValue (value (x), "/ LINE/date26") date26
76, extractValue (value (x), "/ ONLINE/time27 ') time27
77, extractValue (value (x), "/ ONLINE/status28 ') status28
78, extractValue (value (x), "/ ONLINE/function29 ') function29
79, extractValue (value (x), "/ ONLINE/companyId30 ') companyId30
80, extractValue (value (x), "/ ONLINE/controlNumber31 ') controlNumber31
81, extractValue (value (x), "/ ONLINE/quantity32 ') quantity32
82, extractValue (value (x), "/ LINE/status33") status33
83, equipment of extractValue (value (x), "/ LINE/equipment")
84, extractValue (value (x), "/ LINE/week") during the week
85, extractValue (value (x), "/ ONLINE/arrivalTerminal ') arrivalTerminal
86, extractValue (value (x), "/ ONLINE/departTerminal ') departTerminal
87, extractValue (value (x), "/ LINE / 'option'") 'option '.
88, extractValue (value (x), "/ ONLINE/originatorId34 ') originatorId34
89, extractValue (value (x), "/ ONLINE/inHouseIdentification135 ') inHouseIdentificatio
n135
90, extractValue (value (x), "/ ONLINE/originatorTypeCode36 ') originatorTypeCode36
91, extractValue (value (x), "/ ONLINE/companyId37 ') companyId37
92, extractValue (value (x), "/ ONLINE/locationId38 ') locationId38
93, extractValue (value (x), "/ ONLINE/codedCountry39 ') codedCountry39
94, extractValue (value (x), "/ ONLINE/trueLocationId ') trueLocationId
95, extractValue (value (x), "/ ONLINE/trueLocationId40 ') trueLocationId40
96, extractValue (value (x), "/ LINE/carrierCode") carrierCode
97, flight extractValue (value (x), "/ LINE/flight")
98, extractValue (value (x), "/ LINE/bookingClass") bookingClass
99, extractValue (value (x), "/ ONLINE/flightIndicator ') flightIndicator
100, extractValue (value (x), "/ ONLINE/codeShareAgreement ') codeShareAgreement
101, extractValue (value (x), "/ ONLINE/cabinCode ') cabinCode
102, extractValue (value (x), "/ ONLINE/subclassId ') subclassId
103, extractValue (value (x), "/ ONLINE/sourceQualifier1 ') sourceQualifier1
104, countryCode extractValue (value (x), "/ LINE/countryCode")
105, extractValue (value (x), "/ ONLINE/systemCode ') systemCode
106, extractValue (value (x), "/ ONLINE/groupingCode ') groupingCode
107, extractValue (value (x), "/ ONLINE/marriageQualifier ') marriageQualifier
108, extractValue (value (x), "/ ONLINE/tatooNum ') tatooNum
109, extractValue (value (x), "/ LINE/marker2") marker2
110, extractValue (value (x), "/ ONLINE/qualifier41 ') qualifier41
111, extractValue (value (x), "/ ONLINE/number42 ') number42
112, extractValue (value (x), "/ ONLINE/segmentName43 ') segmentName43
113, extractValue (value (x), "/ ONLINE/subjectQualifier ') subjectQualifier
114, type extractValue (value (x), "/ LINE/type")
115, extractValue (value (x), "/ ONLINE/longFreetext ') longFreetext
116, indicator of extractValue ((x) value, "indicator/LINE / ')
117, date44 extractValue (value (x), "/ ONLINE/date44")
118, extractValue (value (x), "/ ONLINE/officeId45 ') officeId45
119, extractValue (value (x), "/ ONLINE/marker3 ') marker3
120, extractValue (value (x), "/ ONLINE/actionRequestCode ') actionRequestCode
T,TABLE(XMLSequence(extract(t.xmlcol,'/ROWSET/ROW 121'))) x;
With t AS (SELECT xmltype (bfilename('MYXML','sabresample.xml'), nls_charset_id)
("WE8ISO8859P1")) xmlcol FROM dual)
*
ERROR on line 2:
ORA-22288: file or LOB FILEOPEN operation failed
The system cannot find the specified file.
ORA-06512: at "SYS." XMLTYPE", line 296
ORA-06512: at line 1
Hello d7...
Yes, in this case what you read is the problem:
ORA-22288: file or LOB FILEOPEN operation failed
The system cannot find the specified file.
ORA-06512: at line 33 level
Maybe your file is not where your points of path of the dictionary or it may be a problem of privilege... But at least you know that is wrong on your query, but your file that cannot be reached.
-
Operation on *.vmdk file failed
I had an operation on file *.vmdk problem failed. I could give up, try again or connect to the client. Connection for the client (W 7 Ultimate) has not helped because the client became unresponsive. I checked the mac with the utilitiy of disk drive, but the drive seems to be OK. Then I turned off the machine. Check the log as an attachment file.
I rebuild the virtual disk but that crashed with the attached report. Fortunately I could launch the client machine. But I wonder what was going on?
Input / output errors are usually a symptom of a failing drive.
Run a utility that can scan the surface of the disc to ensure its consistency, such as DiskWarrior or TechTools utility (which comes with the AppleCare).
Essentially, we ask to read and write to a file, and the OS itself is impossible on the physical plane and the reports with an IO error.
It's maybe just a few sectors are corrupt, and that is where your life of the Virtual Machine, but it can also indicate that your hard drive has failed. It will probably get worse over time, and it is strongly recommended that you get your backup data and review the material.
-
ORA-22288: file or LOB FILEOPEN operation failed
Hello
I am developing a small function to extract a file from the file system and return it as a BLOB. I created and Oracle Directory (CREATE or REPLACE DIRECTORY GRMS_TMP AS ' / tmp';) and gave the public access to this directory.
Below the code and output... am I missing something?
Thank you very much, Pier Paolo.
Function FAOGETFILE (p_FileName Varchar2)
Return of the Blob
v_OutBlob BLOB;
v_FileSrc BFILE.
Begin
v_FileSrc: = BFILENAME ('GRMS_TMP', p_FileName);
-Insert data into the Table
Insert the FAO. FAO_GRMS_WS_BLOB
Values (FAO. FAO_GRMS_WS_BLOB_S.NextVal, p_FileName Empty_Blob(), Sysdate)
Return BLOB_DATA in v_OutBlob;
DBMS_OUTPUT. PUT_LINE('SYS.) DBMS_LOB. FILEEXISTS (v_FileSrc) '. SYS. DBMS_LOB. FILEEXISTS (v_FileSrc));
-Open the file
DBMS_LOB. FileOpen (v_FileSrc, DBMS_LOB. LOB_READONLY);
-File loading
DBMS_LOB. LOADFROMFILE (DEST_LOB = > v_OutBlob,)
SRC_LOB = > v_FileSrc,
AMOUNT = > DBMS_LOB.getLength (v_FileSrc));
-Closing file
DBMS_LOB. Close (v_FileSrc);
Return v_OutBlob;
End FAOGETFILE;
On the file system, I have all rights/privileges to access the file:
File:
drwxrwxrwt 38 root root 270336 16 Feb 10:32 tmp
File:
-rwxrwxrwx 1 Xxxuser 42 16 Feb 10:14 temp.txt dev
When I run the service I get the following:
Error report-
ORA-22288: file or LOB FILEOPEN operation failed
No such file or directory
Output: SYS. DBMS_LOB. FILEEXISTS (v_FileSrc) 0
In addition to the suggestion of Hoek - / tmp is on the server database, no?
-
get ORA-22285: non-existent directory or file for FILEOPEN operation
Hello
I'm trying to insert a .jpg file into a table, and I get the error ora-22285.
The database is 11g and the OS is windows 2008 R2 (64-bit).
Here are the steps that my work.
I edited the ini.ora file and add utl_fil_dir = c:\mun\*
I restarted the DB.
I made edumet.jpg exist in the c:\mun\photos directory.
3.
SQL > create or replace directory images like 'c:\mun\photos\ ';
Created directory.
SQL > grant all the images directory to the public;
Grant succeeded.
SQL > declare
l_blob 2 blob.
3 l_bfile bfile.
4 start
5. insert into images values ('edumet', EMPTY_BLOB())
6 l_blob return images_image;
7 l_bfile: = bfilename ('images', 'edumet.jpg');
8 dbms_lob.fileopen (l_bfile);
9 dbms_lob.loadfromfile (l_blob, l_bfile, dbms_lob.getlength (l_bfile))
;
10 dbms_lob.fileclose (l_bfile);
11 end;
12.
declare
*
ERROR on line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS." DBMS_LOB", line 744
ORA-06512: at line 8 level
What Miss me?
Thank you
LabaThe names of the objects are registered by default "upper case" in the dictionary.
;) -
ORA-22288 using dbms_lob.open
Hello
I try to store files in a table with a column of type BLOB.
I use this procedure:
CREATE OR REPLACE procedure EBISDOKUMENTE.datei_einfuegen (v_directory varchar2, v_quelldatei varchar2) is v_quell_lob bfile := bfilename(v_directory, v_quelldatei); v_ziel_lob blob; v_id number; v_groesse number; begin select seq_dokument.nextval into v_id from dual; select dbms_lob.getlength(v_quell_lob) into v_groesse from dual; insert into dokument (id, inhalt) values (v_id, empty_blob()) returning inhalt into v_ziel_lob; dbms_lob.open(v_quell_lob, dbms_lob.lob_readonly); dbms_lob.loadfromfile(dest_lob => v_ziel_lob, src_lob => v_quell_lob, amount => v_groesse); dbms_lob.close(v_quell_lob); commit; end;
If I run the procedure with
begin datei_einfuegen('EBISDOKUMENTE', '1234.dat'); end;
I got an ORA-22288 the dbms_log.open of the line.
I first thought that there is a problem with the file or directory (authorization and so on), but the statement
select dbms_lob.getlength(v_quell_lob) into v_groesse from dual;
succeeds and returns to the good size of the file. So this should not be a permission problem.
Any ideas, what is the problem?
Kind regards
Mark
http://docs.Oracle.com/CD/E11882_01/Relnotes.112/e23557/TOC.htm#CJAEJECJ
-
ORA-00230: forbidden operation: snapshot controls unavailable file enqueue
Hello
Get this error for a while now.
From control file and SPFILE Autobackup 3 November 2014 06:05:11
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03015: an error has occurred in the script stored std_arch_log_bkup
RMAN-03009: failure of command of file control and SPFILE Autobackup on channel ORA_DISK_1 at 03/11/2014 07:08:13
ORA-00230: forbidden operation: snapshot controls unavailable file enqueue
Complete recovery manager.
------------------------------------------------------------------------------
Recovery Manager: release 11.2.0.3.0 - Production on Mon 3 Nov 07:08:17 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: EMDEV (DBID = 1134683784) connected to the recovery catalog database
RMAN > RMAN > catalog resync;
2 > 2 >
waiting for snapshot control file enqueue waiting snapshot control file enqueue waiting snapshot control file enqueue waiting snapshot control file enqueue waiting snapshot control file enqueue waiting snapshot control file enqueue waiting snapshot control file enqueue waiting for the snapshot control file enqueue waiting snapshot control file enqueue waiting snapshot control file enqueue waiting snapshot control file enqueue waiting for the snapshot control file enqueue can't do a snapshot control file
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03009: failure of command resync to the default channel to 03/11/2014 08:11:19
ORA-00230: forbidden operation: snapshot controls unavailable file enqueue
Tried to watch what may now be the queue:
PROGRAM MODULE ACTION Logon ADDR KADDR TY ID1 ID2 LMODE SID SID ASKS CTIME BLOCK user
141 SYS rman@hq4dr015343 (TNS V1 - V3) rman@hq4dr015343 FINISHED67 (TNS V1 - V3) 0000003 8 October 14 000000015FCD83E0 000000015FCD8438 141 0 2 4 0 2280088 FC 0
but he said it's OVER. Any suggestions?
I have reset:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
TO
CONFIGURE CONTROLFILE AUTOBACKUP
and then once again changed it back to:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
Test ran backups and they ran fine.
-
Setup error when loading Images - ora 22288
Hi all
I got an error during the installation of the APEX as below,
Please help me rectift this...
I use APEX on windows server 2003... and Oracle 10g XE
==========
SQL > @apxldimg E:\From F - official files\Sakthi\Softwares\apex
PL/SQL procedure successfully completed.
old 1: create the directory APEX_IMAGES as '& images/apex/1 '.
new 1: create the directory APEX_IMAGES as 'E:\From/apex/images '.
Created directory.
declare
*
ERROR on line 1:
ORA-22288: file or LOB FILEOPEN operation failed
The system does not have the specified path.
ORA-06512: at "SYS." DBMS_LOB", line 523
ORA-06512: at "SYS." XMLTYPE", line 287
ORA-06512: at line 15 level
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Validation complete.
calendar for: Load Images
Elapsed time: 00:00:00.81
Directory has fallen.
======
Published by: madan on April 5, 2010 13:53Hello
This might help
Re: Upgrade problem Apex 2.1 to 3.2.1 in Oracle Database 10g Express EditionBR, Jari
-
I have tried the code
DECLARE
lv_url VARCHAR2 (1000): = ' http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf';
lc_return BLOB;
lhttp_url httpuritype.
Varriables - declared to have written the LOB to pdf file-
l_file UTL_FILE. TYPE_DE_FICHIER;
l_buffer RAW (32767).
l_amount directory: = 32767;
l_pos INTEGER: = 1;
l_blob BLOB;
l_blob_len INTEGER.
BEGIN
-create URIs
lhttp_url: = httpuritype.createuri (lv_url);
-get the PDF document
lc_return: = lhttp_url.getblob ();
-Open the destination file.
l_file: = UTL_FILE. FOPEN ('MBO_INPUT_DIR', 'MBD.zip', 'wb');
-Get the total length of the BLOB
l_blob_len: = DBMS_LOB.getlength (lc_return);
-Pieces of the BLOB to read and write to the file
-full up.
While l_pos < l_blob_len LOOP
DBMS_LOB. READ (lc_return, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw (l_file, l_buffer, FALSE);
l_pos: = l_pos + l_amount;
END LOOP;
-Closes the file.
UTL_FILE. FCLOSE (l_file);
EXCEPTION
WHILE OTHERS THEN
-Close the file if something goes wrong.
IF UTL_FILE.IS_OPEN (l_file) THEN
UTL_FILE. FCLOSE (l_file);
END IF;
LIFT;
END;
But make a mistake like:
Error report-
ORA-29273: HTTP request failed
ORA-06512: at "SYS." UTL_HTTP", line 1130
ORA-12535: TNS:operation expired
ORA-06512: at line 37 level
29273 00000 - "the HTTP request failed.
* Cause: The UTL_HTTP package cannot run the HTTP request.
* Action: Use get_detailed_sqlerrm to check the detailed error message.
Correct the error and restart the HTTP request.
Please suggest a solution. Is it possible to download a zip file with the same code?
[oracle@localhost ~]$ sqlplus scott/tiger SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 6 13:59:09 2015 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> --My Database version SQL> ---------------------- SQL> SELECT * FROM v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production CORE 11.2.0.1.0 Production TNS for Linux: Version 11.2.0.1.0 - Production NLSRTL Version 11.2.0.1.0 - Production SQL> ed Wrote file afiedt.buf 1 DECLARE 2 lv_url VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf'; 3 lc_return BLOB; 4 lhttp_url httpuritype; 5 ---Varriables declared for writing the LOB to pdf file -- 6 l_file UTL_FILE.FILE_TYPE; 7 l_buffer RAW(32767); 8 l_amount BINARY_INTEGER := 32767; 9 l_pos INTEGER := 1; 10 l_blob BLOB; 11 l_blob_len INTEGER; 12 BEGIN 13 --create uri 14 lhttp_url := httpuritype.createuri(lv_url); 15 --get the PDF document 16 lc_return := lhttp_url.getblob(); 17 -- Open the destination file. 18 l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb'); 19 --Get the total length of the BLOB 20 l_blob_len := DBMS_LOB.getlength(lc_return); 21 -- Read chunks of the BLOB and write them to the file 22 -- until complete. 23 WHILE l_pos < l_blob_len LOOP 24 DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer); 25 UTL_FILE.put_raw(l_file, l_buffer, FALSE); 26 l_pos := l_pos + l_amount; 27 END LOOP; 28 -- Close the file. 29 UTL_FILE.FCLOSE(l_file); 30 EXCEPTION 31 WHEN OTHERS THEN 32 -- Close the file if something goes wrong. 33 IF UTL_FILE.IS_OPEN(l_file) THEN 34 UTL_FILE.FCLOSE(l_file); 35 END IF; 36 RAISE; 37* END; 38 / DECLARE * ERROR at line 1: ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-24247: network access denied by access control list (ACL) ORA-06512: at line 36 SQL> conn sys as sysdba Enter password: Connected. SQL> ed Wrote file afiedt.buf 1 BEGIN 2 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'love.xml', 3 description => 'Love ACL', 4 principal => 'SCOTT', 5 is_grant => true, 6 privilege => 'connect'); 7 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'love.xml', 8 principal => 'SCOTT', 9 is_grant => true, 10 privilege => 'resolve'); 11 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'love.xml', 12 host => 'shenzhoufellowship.org'); 13 commit; 14* END; 15 / PL/SQL procedure successfully completed. SQL> conn scott/tiger Connected. SQL> ed Wrote file afiedt.buf 1 DECLARE 2 lv_url VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf'; 3 lc_return BLOB; 4 lhttp_url httpuritype; 5 ---Varriables declared for writing the LOB to pdf file -- 6 l_file UTL_FILE.FILE_TYPE; 7 l_buffer RAW(32767); 8 l_amount BINARY_INTEGER := 32767; 9 l_pos INTEGER := 1; 10 l_blob BLOB; 11 l_blob_len INTEGER; 12 BEGIN 13 --create uri 14 lhttp_url := httpuritype.createuri(lv_url); 15 --get the PDF document 16 lc_return := lhttp_url.getblob(); 17 -- Open the destination file. 18 l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb'); 19 --Get the total length of the BLOB 20 l_blob_len := DBMS_LOB.getlength(lc_return); 21 -- Read chunks of the BLOB and write them to the file 22 -- until complete. 23 WHILE l_pos < l_blob_len LOOP 24 DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer); 25 UTL_FILE.put_raw(l_file, l_buffer, FALSE); 26 l_pos := l_pos + l_amount; 27 END LOOP; 28 -- Close the file. 29 UTL_FILE.FCLOSE(l_file); 30 EXCEPTION 31 WHEN OTHERS THEN 32 -- Close the file if something goes wrong. 33 IF UTL_FILE.IS_OPEN(l_file) THEN 34 UTL_FILE.FCLOSE(l_file); 35 END IF; 36 RAISE; 37* END; 38 / PL/SQL procedure successfully completed. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@localhost ~]$ cd saubhik/ [oracle@localhost saubhik]$ pwd /home/oracle/saubhik [oracle@localhost saubhik]$ ls -l *.pdf -rw-r--r-- 1 oracle oinstall 60055 Apr 6 14:03 TheLoveDare.pdf [oracle@localhost saubhik]$
I love this pdf file. I would like to read this and mean while if you get an error then please post in its entirety and also think that it is an Oracle error or network.
-
ORA-01157: cannot identify/lock data file error in database pending.
Hello
I have a back-end database and the base ensures (11.2.0.1.0) that runs in ASM with the names of different diskgroup. I applied an incremental backup on a standby database to solve the gap newspaper archive and generated a controlfile to standby in the primary database and restore the standby database controlfile. But when I started the MRP process his starts not and lift error in the alerts log ORA-01157: cannot identify/lock file. When I questioned the standby database file it shows the location on primary data filenames not the database pending.
******************************
PRIMARY DATABASE
*****************************
SQL > select name from v$ datafile;
NAME
--------------------------------------------------------------------------------
+Data/OraDB/datafile/system.256.788911005
+Data/OraDB/datafile/SYSAUX.257.788911005
+Data/OraDB/datafile/undotbs1.258.788911005
+Data/OraDB/datafile/users.259.788911005
****************************************
BACKUP DATABASE
****************************************
SQL > select name from v$ datafile;
NAME
--------------------------------------------------------------------------------
+STDBY/OraDB/datafile/system.256.788911005
+STDBY/OraDB/datafile/SYSAUX.257.788911005
+STDBY/OraDB/datafile/undotbs1.258.788911005
+STDBY/OraDB/datafile/users.259.788911005
The actual physical location of files of database Eve in ASM in the standby server is shown below
ASMCMD > pwd
+ STDBY/11gdb/DATAFILE
ASMCMD >
ASMCMD > ls
SYSAUX.259.805921967
SYSTEM.258.805921881
UNDOTBS1.260.805922023
USERS.261.805922029
ASMCMD >
ASMCMD > pwd
+ STDBY/11gdb/DATAFILE
I even tried to rename the data files in the database backup, but it throws error
ERROR on line 1:
ORA-01511: Error renaming data/log files
ORA-01275: RENAME Operation is not allowed if management undo file is
Automatic.
Kind regards
007
You must specify the complete location
*.db_file_name_convert='+data/OraDB/datafile/,'+STDBY/11gdb/DATAFILE /'
and to rename the data file, your standby_file_management parameter must be set to MANUAL.
-
ORA-39002: invalid operation
I am using expdp, replacing the scripts of the exp.
I get these error lines:
ORA-39002: invalid operation
ORA-39070: unable to open the log file.
ORA-29283: invalid file operation
My expdp order:
Directory of dumpfile = test.dmp for = export_meta content = metadata_only expdp systemYes.CREATE DIRECTORY does not create the directory export_meta to you on disk.
-
Get "ORA-12534: TNS:operation unsupported ' connect as sysdba
Hello
We get "ORA-12534: TNS:operation not supported" error when connecting as sysdba.
Bash-2. $03 sqlplus "virtue sysdba".
SQL * more: Release 10.2.0.4.0 - Production Thu Feb 23 10:16:16 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
ERROR:
ORA-12534: TNS:operation unsupported
Enter the user name:
I can able to connect to the database using tns entry without any problem.
SQLNET. Contents of the ORA:
====================
Bash-2. $03 cat /var/opt/oracle/sqlnet.ora
ENCRYPTION_WALLET_LOCATION=(source=(method=file)(METHOD_DATA=(Directory=/dboracle/ORABASE/product/10.2.0/dbs/wallet/)))
SQLNET. WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
I'm not aware of the portfolio. Please, help me to solve this problem.
Thank you.
Kind regards
National Stadium>
SQLNET. Contents of the ORA:
====================
Bash-2. $03 cat /var/opt/oracle/sqlnet.ora
ENCRYPTION_WALLET_LOCATION=(source=(method=file)(METHOD_DATA=(Directory=/dboracle/ORABASE/product/10.2.0/dbs/wallet/)))
SQLNET. WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
>You can replace the keyword ENCRYPTION_WALLET_LOCATION with just WALLET_LOCATION in your file sqlnet.ora.
EWL is only used for transparent encryption of data, but if you want to use the external password store, you will need to use WALLET_LOCATION rather than ENCRYPTION_WALLET_LOCATION. However, if you want to use TDE and external repository of password, then make sure that your sqlnet.ora file has two entries ENCRYPTION_WALLET_LOCATION and WALLET_LOCATION
Concerning
Vincent -
ORA-00439: feature not enabled: Dump file during expdp Data Compression
My version of the database is:
SQL > select * from v version $;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
AMT for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL > show the compatible parameter
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
compatible string 11.2.0.0.0
However when I tried to do this:
Directory = data_pump_dir dumpfile = prod_schema.dmp patterns = expdp system has, b logfile = prod - schema.log compression = all >
Export: Release 11.2.0.1.0 - Production Thu Jan 12 08:39:48 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Password:
Connected to: Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production
ORA-39002: invalid operation
ORA-00439: feature not enabled: Dump file data Compression
This is on linux.
Thank youuser569151 wrote:
I see. So how can I made a dump of smaller export? right now it is about 30g.If you want only to save disk space, you can compress the dump file with an application of operating system when the dump is complete.
Otherwise, you can check the exported data, if you can exclude all the data from the dump.
ITI
Johan -
Hello
What is the nucleus of a file system for any operating system or file system - at the heart of any os? Thank you, BS
Original title: file system - at the heart of any system
Hello
Use Bing or Google to find your answers.
Here's a little info:
File system
http://en.Wikipedia.org/wiki/File_systemCategory: Computer file system
http://en.Wikipedia.org/wiki/category:Computer_file_systemsI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
I have a need to call a web service from an APEX application, so I thought I'd try to experience everything first call a web service that is accessible to the public from W3Schools. The URL of the WSDL that I use is:
http://www.w3schools.com/webservices/TempConvert.asmx?WSDL
The 1st thing I try in APEX is to create a Web Service based on the above URL reference. Problem is that I get the following error:
ORA-29273: HTTP request failed ORA-12535: TNS:operation expired
Any ideas?
I even tried with some other URL WSDL and always the same exact error.
Thanks in advance.
Hello
Maybe your database server have firewall that blocks to internet connection?
Kind regards
Jari
Maybe you are looking for
-
need to google and U.S. air toolbars - then - I go back to older firefox?
These toolbars need - add on not compatible - want to go back to older firefox which allowed these toolbars
-
Re: Mouse problem Bluetooth on the Satellite A660
Some days, I got BSOD (b4 he mouse worked fine.) Then after reboot mouse was not recognized, so I tried to re - connect, but battery BT said whenever I try to connect: "Detection of Service failed" any help would be appreciated. My mouse is zepater T
-
How to reset to factory default ts1120ps designjet
I need to reset my printer 44 inch HP Designjet TS1120ps to factory default (CK840A). I don't know if I have big fingers my admin password, but it is not wear. The print server running W2K8R2. At this point since he's not taking my pw, I would be
-
IOM pinning via the port-channel
Hello It seems to me that, with UCS manager 1.4 and higher, it is possible to setup the pinning of the IOM through the port-1-channel. I couldn't find any configuration guide for this kind of configuration. Can you help me or inform me on this subjec
-
USB ports not working not on Windows but works on Ubuntu (fixed)
Hello I have dual boot Windows 8 and 13.04 Ubuntu on my laptop. For some reason, my USB ports doesn't work on Windows, but it still works on Ubuntu. I ran a convenience store in the Panel and has detected that there is a problem with my USB (Code 43)