Dbms_lob.fileopen failed though utl_file.fgetattr works fine

Hi ,
I am using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod.
I am working on loading MS .doc into Oracle.
I have created dir using following code:
BEGIN
EXECUTE IMMEDIATE
'CREATE OR REPLACE DIRECTORY TEST_SN1 AS'||
'''\\inecg-sdc11\XYZ_ABC2\DT-AUTOMATION\DUMMY_12LNEW''';
END;
I have verified the existence of file(Status.doc) using utl_file.fgetattr using the following code:
DECLARE
ex BOOLEAN;
flen NUMBER;
bsize NUMBER;
BEGIN
utl_file.fgetattr('TEST_SN1', 'Status.doc', ex, flen, bsize);
IF ex THEN
insert into test_msg values('File Exists');
ELSE
insert into test_msg values('File Does Not Exist');
END IF;
insert into test_msg values('File Length: ' || TO_CHAR(flen));
insert into test_msg values('Block Size: ' || TO_CHAR(bsize));
commit;
END;
the code succuessfully returns the msg 'File exists' along with the file length .
I have also tried opening the file using utl_file and dbmc_lob package+
SQL> DECLARE
2 vInHandle utl_file.file_type;
3 vNewLine VARCHAR2(250);
4 BEGIN
5 vInHandle:= utl_file.fopen('TEST_SN1', 'Status.doc', 'R');
6 utl_file.fclose(vInHandle);
7 END;
8 /
PL/SQL procedure successfully completed.
But the following code still produces error ORA-22288:+
This is what the output was:
SQL> declare
2 l_bfile bfile;
3 begin
4 l_bfile := bfilename( 'TEST_SN1', 'Status.doc' );
5 dbms_lob.fileopen( l_bfile );
6 dbms_lob.fileclose( l_bfile );
7 end;
8 /
declare
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at line 5
Even though the file exists and Oracle is able to identify the file, I cant figure out what is
stopping my code to open that file.
Please help me to figure out the problem.
For more undertstanding ,You can also refer the my conversation with Tom Kyte at following link:
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:636223754581#2815252100346024210
Thanks a million tons!
Regards
Saurabh Nolakha,
Bangalore

Hi,
Thanks for your quick response.
The file Status.doc which I am trying to access is in remote server at path *\\inecg-sdc11\XYZ_ABC2\DT-AUTOMATION\DUMMY_12LNEW* .Though the path is not mapped to the WINDOWS system where Oracle is installed but I am able to access the file(open and read) from that system.
Do you mean that I need to map the network drive to that system?*
if yes, then why UTL_FILE is working perfectly?*
Also, in my requirement, theres a high possibility that the path(of remote server) may change in future(if mapped).So ,is there any alternative for that?*
Please provide your useful suggestions
Regards
Saurabh Nolakha

Similar Messages

  • Rich Client Login fails from Infoview but works fine if opened from desktop

    Hi Friends,
    When i open WebI Rich Client from my infoview (By changing the preferrance settings in Infoview), it returns an error as "Login Fails" , but if i open the webI Rich Client from my Start->Programs->Business Objects XI 3.0->WebI Rich Client , it works fine. i am not sure why invoking rich client from infoview fails, but the same works fine, if opened directly from the desktop. I have only one user "administrator" Created with no password in the Enterprise.
    Configuration:
    Platform:             Windows Xp
    Type:                  Vertical Installation  (All the servers and Presentation Layer in a single Box)
    Boxi Version:     BOXI 3.0
    Authentication:   BO Enterprise.
    Any help in the regard is appreciated.
    Regards,
    Ram kumar G
    Edited by: Ramkumar Govindasamy on Aug 11, 2009 9:58 AM

    Hi,
    Windows XP is not officially supported for a BOBJ server installation. Can you consider installing BO on a Windows Server machine?
    Have a look prior to the installation at the Support Platforms document for BO XI 3.0. You can find this here:
    [http://service.sap.com/bosap-support]
    Regards,
    Stratos

  • Cannot Log-On even though the internet works fine?

    Cannot Log-On even though the internet works fine? I have not made any changes to my system. Anyone else having the same problem. My handle is an AIM handle, if this helps. Is it because its the first of a new year?
    Thanks in Advance!
    Mark

    I found out its my IM archiving company thats is down. Global Relay.
    Thanks anyway!
    Mark

  • Dbms_lob.FileOpen failed using remote directory in oracle 10g

    when i create a directory with the remote shared path like '\\kf-kjyxp\sharepath\temporary' . then in a pl/sql block i use dbms_lob.fileopen to open bfile object , a failure occurs .but the situation does not happen when i use a local diretory like 'd:\sharepath\temporary'.the most puzzling thing is that when i use dbms_lob.FILEISOPEN to check whether i can access the file ,it returns 1 which means succeed . And dbms_lob.GETLENGTH() also returns the right value.
    here is the testing code:
    declare
         pFile bfile;
         sDir varchar2(255);
         sFileName varchar2(255);
         bExist integer := 0;
         Amount Integer := 4000;
    begin
         sDir := 'SRC_PATH';
         sFileName := 'ele_onlinedoc.ico';
         pFile := bfilename(sDir, sFileName);
         --checking  file existence
         bExist := DBMS_LOB.FILEEXISTS(pFile);
         if bExist = 1 then
              dbms_output.put_line('File Exist');
         else
              dbms_output.put_line('File Not Exist');
         end if;
         --check file size
         Amount := dbms_lob.Getlength(pFile);
         dbms_output.put_line(TO_CHAR(Amount));
         if dbms_lob.FILEISOPEN(pFile) = 1 then
              dbms_output.put_line('File is already Opend');
         else
              dbms_output.put_line('File is closed');
         end if;
         dbms_lob.fileOpen(pFile,dbms_lob.file_readonly);
         dbms_lob.fileclose(pFile);
    EXCEPTION
         When VALUE_ERROR then
              dbms_output.put_line('Exception Value_error');
         When OTHERS then
              dbms_output.put_line('Exception OTHERS');      
              dbms_output.put_line(to_char(SQLCODE));
              dbms_output.put_line(sQLERRM);
    end;
    OUTPUT:
    File Exist
    1078
    File is closed
    Exception OTHERS
    -22288
    ORA-22288: file or LOB operation FILEOPEN failed
    we can see that file is detected and also we can get the right size(1078 byte) ,
    but fail to open the file.
    so what`s the problem .
    thanks!

    ORA-22288: file or LOB operation string failed string
    Cause: The operation attempted on the file or LOB failed.
    Action: See the next error message in the error stack for more detailed information. Also, verify that the file or LOB exists and that the necessary privileges are set for the specified operation. If the error still persists, report the error to the DBA.

  • Update downloads fail, initial app installs work fine, Windows 8.1, internet connection and firewall settings fine

    I just installed the CS6/CC applications I use without any issue. I then was prompted to install various updates. All the updates failed and the message says the downloads failed. I checked my internet and firewall settings and they are fine. I the was able to install a different CC application I hadn't installed before. That process worked fine so I retried all the updates. They all failed again and for the same reason. I have even tried a cold system reboot. Nothing works. I am really baffled.
    Has anyone run into this and, if so, were you able to figure it out.

    pre cc updates:  http://www.adobe.com/downloads/updates/
    cc updates:  http://prodesigntools.com/adobe-cc-updates-direct-links-windows.html
    cc 2104 updates:  http://prodesigntools.com/adobe-cc-2014-updates-links-windows.html

  • Autostart of network-service fails, but manual start works fine

    I followed a guide to set up a network connection. The steps were to create a network config (/etc/config.d/network)
    interface=eth0
    address=192.168.1.2
    netmask=24
    broadcast=192.168.1.255
    gateway=192.168.1.1
    then a service description (/etc/systemd/system/network.service)
    [Unit]
    Description=Network startup
    Wants=network.target
    Before=network.target
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    EnvironmentFile=/etc/conf.d/network
    ExecStart=/sbin/ip link set dev ${interface} up
    ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}
    ExecStart=/sbin/ip route add default via ${gateway}
    ExecStop=/sbin/ip addr flush dev ${interface}
    ExecStop=/sbin/ip link set dev ${interface} down
    [Install]
    WantedBy=multi-user.target
    and then enable the service using systemctl enable network.
    After the rebooting calling systemctl states the service as failed. If I start it manually using systemctl start network everything works fine.
    How do I get it to work with autostart? Thanks in advance.
    Last edited by devrandom (2013-08-03 12:22:55)

    With 'a guide' I presume you referred to this guide
    The guide states
    To set static IP on enp3s0 interface you will need to create /etc/conf.d/network@enp3s0 config file and run:
    # systemctl enable [email protected]
    where enp3s0 has to be changed into your own interface name.
    Note that the EnvironmentFile has to change to /etc/conf.d/network@<interface>.

  • I can't access the internet with Firefox on my computer (Windows 7 PC). I have used Firefox as my browser for 1 year but 5 days ago it stopped working even though Internet Explorer worked fine. I can't solve the problem and need some help.Randy Brown

    September 26, 2011
    Dear Mozilla,
    I am having some difficulty accessing the internet with Firefox on one of my PC computers. I normally use Mozilla Firefox as my web browser and google is my homepage and gmail is my email system. The operating system is Windows 7. For over a year this system worked perfectly but a few days ago it stopped working. When I launch Firefox now I get the message that that website (www.google.com) is unavailable. In fact, I can’t access any website and I am blocked from the internet entirely within Firefox. My internet connection is fine because Internet Explorer works fine. I can access google and any other website within that web browser. I have investigated all the security issue I can manage and found no smoking gun. I’ve tried uninstalling and reinstalling Firefox to no avail. Is Windows 7 compromising the effectiveness of Firefox? Any suggestions or other assistance you can offer would be appreciated.
    Sincerely,
    Randy Brown
    [email protected]

    You only have to clone your mac when using certain cable modem.  You don't clone your mac when using dsl.
    Greetings from Northern Ontario, Canada

  • My iPad won't load web pages, even though it was working fine two days ago.

    Up until 2 days ago I had no problems with my iPad 3.
    However now it will not load any web pages at all (Using Safari). In order to get it to load web pages I either
    have to reboot or turn it off and then on again. It then connects but only ever to one page at a time.
    I don't understand what the issue is since it was fine before. It is not my Wifi network as it works fine on
    other laptops.

    Try this:
    1. Close all apps in the Task Bar. Double-click the Home button and hold apps down for a second or two. Tap the minus sign to close app.
    2. Hold the Sleep and Home button down until you see the Apple Logo.

  • Webservices in Adobe form fails even when it works fine in Portals.

    Hi All,
    I am new to web services in adobe form, can somebody help me to understand the reason of failing web service call in my adobe form.
    We are working on a simple adobe form with a simple webservice.  the web service is in SAP CRM 7.0 and we are designing the form in Livecycle designer stand alone not through SFP tcode.
    problem is when we execute the web service from adobe form nothing happens.
    There is no script in the adobeform to check if the web serive is called. the technical team claims there is no hit happening to the service. but when we execute the same web service with in a simple web dynpro app in portal it does work.
    earlier we had some similar forms with web service which used to work, now they are also not working from adobeform.
    Are we missing something, when importing/data connection  a webservice how do we make sure from the form that the connection and trigger are successful.
    Please let me know if you need any more information.
    Thanks & Regards
    Sai Krishna.

    Hi All,
    Just a small update on the query I posted.
    I searched tru and found couple of posts in Adobe fourm which says
    Adobe readers cannot execute web services, to do so we need to have Reader Extension on the Adobe reader.
    Is this the problem for my form, if i just dont understand why such restrictions for developers at the design time itself..?
    Regards,
    Sai Krishna.

  • CUPS fail with kernelck ,while works fine with default kernel

    I have weird problem with cups. I 've set it up it works good ,my printer prints ,etc but only on default arch kernel ,when i boot with kernelck (from arch reps) i get
    cupsd: Child exited on signal 15!
    when deamons starts on boot.
    It is really weird it work flawlessly on arch default kernel and fail on archck...
    I have no idea what to do.

    I also met this err:
    Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported
    the log file:
    I [11/Aug/2007:10:00:00 +0800] Listening to 127.0.0.1:631 (IPv4)
    I [11/Aug/2007:10:00:00 +0800] Loaded configuration file "/etc/cups/cupsd.conf"
    I [11/Aug/2007:10:00:00 +0800] Using default TempDir of /var/spool/cups/tmp...
    I [11/Aug/2007:10:00:00 +0800] Cleaning out old temporary files in "/var/spool/cups/tmp"...
    I [11/Aug/2007:10:00:00 +0800] Configured for up to 100 clients.
    I [11/Aug/2007:10:00:00 +0800] Allowing up to 100 client connections per host.
    I [11/Aug/2007:10:00:00 +0800] Using policy "default" as the default!
    I [11/Aug/2007:10:00:00 +0800] Full reload is required.
    I [11/Aug/2007:10:00:00 +0800] Loaded MIME database from '/etc/cups': 34 types, 38 filters...
    I [11/Aug/2007:10:00:01 +0800] Loading job cache file "/var/cache/cups/job.cache"...
    I [11/Aug/2007:10:00:01 +0800] Full reload complete.
    I [11/Aug/2007:10:00:02 +0800] Listening to 127.0.0.1:631 on fd 2...
    E [11/Aug/2007:10:00:02 +0800] Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported
    remove cups package use
    pacman -Rcns cups
    reinstall it but still doesn't work

  • I updated my iPad 4 with the new iOS7 and since then Skype started problem and now email i.e, yahoo as well. I can hear people on Skype but they can't hear me though it was working fine with old version. Is any one else having same problem?

    I recently purchased iPad 4 and it is only one month old. I updated with iOS 7 and next day got problem with Skype and yahoo mails. People can't hear me on Skype though I can hear them clearly. I was replying yahoo mails quite nicely and now as I start typing the iPad turns black and have to open it again. Is there any one else facing the same problem? I was thinking to go to apple shop for support? Any suggestions?

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

  • My email refuses to accept password and I can't receive emails even though webmail is working fine.

    I've contacted BigPond and been told its because of keychain access, but have checked all keychain and deleted and redone keychains. Deleted email account and reinstalled. checked all my passwords and settings in prefs in Mail. Don't know if this is related to recent security prob I had with Apple ID that was being hacked as I kept getting messages to reset my id. Went to apple support and setup the 2 step security but was still getting emails about id reset, so don't know if this started the problem. Am ready to scream!

    See if turning off SSL works. That is in Mail > Preferences > Accounts (your account) > Advanced button
    and deselect Use SSL.
    Mac OS 10.6.8
    Mail 4.6

  • What is a 403 Forbidden error message which I get on firefox, safari and chrome. I don't know if it is the website or something with my mac though everything else works fine.

    When trying to log in to crossstitch.com I get this message:
    You don't have permission to access /index.php on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
    Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.crossstitchforum.com Port 80
    I googled the error message and don't really understand what it means.
    I don't know if it is the website or something else. I am not sure where to check and I don't know how to get in touch with the webmaster. If anyone can help I would appreciate it.

    If it is a Firefox add-on, you may be able to disable or remove it here:
    new Firefox button > Add-ons > Extensions
    or
    classic Tools menu > Add-ons > Extensions

  • When clicking one of the link od WEb Application I am getting this error: Error loading stylesheet: Parsing an XSLT stylesheet failed. Same link works fine in IE

    I am using McAfee EPO 4.6.0 when trying to view agent log receiving the error above. I can view this log in IE...

    I am using McAfee EPO 4.6.0 when trying to view agent log receiving the error above. I can view this log in IE...

  • My ipad just won't let me enter my apple password on FaceTime or iMessage, it works fine on my iPhone, I have tried numerous things but nothing works, can anybody help please, will a bug fix sort this out when they finally make one

    My ipad just won't let me sign in with my apple password on FaceTime or iMessage since updating to ios7 it says check my network connection, even though my iPhone works fine with the same password, can anybody help please, I have tried numerous things but nothing  works.  Will I have to wait for a bug fix to sort this? I hear they are working on one a the minute, I hate ios7

    Try a Restart.
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider. Press and hold the Sleep/Wake button until the Apple logo appears.
    Resetting your settings
    You can also try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. You won't lose any data, but it takes time to enter all of the settings again.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. Apple recommends this only if you are unable to restart it.
    Or if this doesn't work and nobody else on the blog doesn't have a better idea you can contact Apple.
    Here is a link to their contacts with most of the information below.
    http://www.apple.com/contact/

Maybe you are looking for