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.

Similar Messages

  • How to use remote directory for external table

    Hi Folks,
    I have 2 Oracle 11GR2 64 bit database installed on Win 2008 server as prod1 and prod2.
    I have one directory created on prod1 server as EXT_TAB_DIR using the path as D:\OrsDWtest_dir .
    I want to use this directory in Prod2 server and use external table using this remote directory.
    I am able to access the Prod1 directory from Prod2 machine and also i have created Network map drive as Z drive pointing to that prod1 D:\OrsDWtest_dir directory. Also i checked read and Write permissions are there . I am able to create the external table but when i try to fetch the data i m getting below error ..
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file IOMM_20121213_060736.csv in EXT_TAB_DIR not found
    now my doubt is this possible ? Can we use remote directory for External table ? or is there is there any alternative way to achieve same ?
    Thanks & Regards,
    Vikash Jain(DBA)

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

  • Example of using pie graphs in oracle 10g or 9i forms (not JDeveloper)

    Hi..
    Please can anyone show me how to use pie graphs in oracle 10g or 9i forms using bean?
    i also want to know how to put data in pie graph.. as u know in column graph for example we have an x-axis and y-axis,and in pie there is no x-axis and y-axis.. so how i can put the same data in pie graph.. and also i may need more than one value for the x-axis or the y-axis to use in pie graph so how can i do it??
    i use set_custom_property to call properties in beans.
    I would so thankful for how can answer me.. please its urgent
    thanks

    Hi,
    Thanks for your reply..but i already have this demo and it doesn't contain an example for a pie graph..if u know where i can find any example for a pie graph and how to pass data to it i would be so thankful
    Thanks again.
    Eyad Basheer

  • 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

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • How to find exception occured while using LOGON function in oracle 10g

    Hi,
    I am using LOGON function to login with a different user name in oracle 10g forms.
    LOGON ( User, Pass@tns, FALSE)
    The third parameter is passed as 'FALSE' to avoid the login screen to be opened. If any of the other parameter ( User Name, Password, TNS) is passed wrong, connection is not established but no exception is occurred. The value for 'FORM_FAILURE' is set to 'TRUE'.
    What i need is the ORA error for connection failure. The error message related to user name/password (ORA-01017) or connection identifier (ORA-12155).
    How i can get this error code if connection is failed. Is there any other way to login in oracle forms other than 'LOGON'.
    Habib

    Habib Ahmad wrote:
    Hi,
    I am using LOGON function to login with a different user name in oracle 10g forms.
    LOGON ( User, Pass@tns, FALSE)
    The third parameter is passed as 'FALSE' to avoid the login screen to be opened. If any of the other parameter ( User Name, Password, TNS) is passed wrong, connection is not established but no exception is occurred. The value for 'FORM_FAILURE' is set to 'TRUE'.
    What i need is the ORA error for connection failure. The error message related to user name/password (ORA-01017) or connection identifier (ORA-12155).
    How i can get this error code if connection is failed. Is there any other way to login in oracle forms other than 'LOGON'.As salamu alikum, Habib
    If you pass FALSE in login you can't catch anything. Want to catch the error ?
    Then change
    LOGON ( User, Pass@tns, FALSE)
    to
    LOGON ( User, Pass@tns, TRUE) Now Create On-Error trigger at form level
    and try the following code
    if error_code=01017 then
         message('invalid user name or password');
         message('invalid user name or password');
         raise form_trigger_failure;
    elsif error_code=12154 or error_code=1215 then
         message('invalid connection string');
         message('invalid connection string');
         raise form_trigger_failure;
    end if;Hopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • Reading BLOB from SQL Server 2005 using DB Link from Oracle 10g

    Hi All,
    I am trying to read a table's data from SQL Server 2005 using ODBC DB Link created in Oracle 10g (10.2.0.3/4) database. I am not using oracle gateway.
    I am able read all data except for the BLOB data from SQL server 2005. It gives error given below when I try to execute query SELECT * from T_TRANSACTION_DATA@sdeslink inside a stored procedure:
    ORA-22992: cannot use LOB locators selected from remote tables
    Kindly help how to read BLOB from SQL server 2005 inside Oracle 10g.
    Best Regards!
    Irfan

    Irfan,
    If you can read the blob data using 10.2 HSODBC then there should be no problem using the 11g gateway.
    I recommend you download the latest version which is 11.2.0.3 available from My oracle Support as -
    Patch 10404530: 11.2.0.3.0 PATCH SET FOR ORACLE DATABASE SERVER
    This is a full version and does not need a previous version to have bene installed. When installing it needs to be in a completlely separate ORACLE_HOME from the existing 11.2 install.
    For the Ora-22992 problem have a look at this note in My Oracle Support -
    Ora-22992 has a workaround in 10gR2 (Doc ID 436707.1)
    Regards,
    Mike

  • Error while using UTP_MAIL package in oracle 10g

    Hi,
    I am using the UTP_MAIL package to send a mail from oracle 10g.
    I hane connected to the database as sysdba,but while setting the SMTP_SERVER_OUTPUT parameter i get the following error.
    SQL> ALTER SYSTEM SET smtp_out_server='blrkecmbx02.ad.abc.com:25' scope=both;
    ERROR at line 1:
    ORA-02095: specified initialization parameter cannot be modified
    Pls help to figure out a solution.

    This parameter is not modifiable, check the Oracle Reference: SMTP_OUT_SERVER Initialization Parameter
    Try the scope=spfile instead of both.
    ~ Madrid

  • Using javax.crypto in oracle 10g

    Hi,
    I have a java stored procedure for oracle 10g (running jdk1.4) that
    uses the javax.crypto package and the bouncy castle provider for RSA
    decryption. Here is a snippet of the code in the procedure:
    Security.addProvider(new
    org.bouncycastle.jce.provider.BouncyCastleProvider());
    Cipher rsaCipher = Cipher.getInstance("RSA");
    RSAPrivateKey key = (RSAPrivateKey)
    MSPrivKeytoJKey.getPrivateKey(aKey);
    rsaCipher.init(Cipher.DECRYPT_MODE, key);
    rsaCipher.doFinal(encryptedByteArray);
    This works fine on my own machine running jdk1.4. However, when I load
    my stored procedure into the database and run it, I get the following
    exception after the line
    Cipher rsaCipher = Cipher.getInstance("RSA");
    tries to execute:
    java.security.NoSuchAlgorithmException: Cannot find any provider
    supporting RSA
    I have tried the following (based on information gathered from various
    forums):
    - ran
    loadjava -u username/pass@DB -v bcprov-jdk14-137.jar
    - added the following line to java.security
    security.provider.4=org.bouncycastle.jce.provider.BouncyCastleProvider
    but i still get the same error.
    I am reaching out desperately to all you experts for help :)
    Pouria

    Hi,
    Unfortunately, the Java VM only supports the basic JDK functionalities; you could try the Metalink Note 356123.1 which should work using BC library but this note only addresses AES.
    Furthermore, you need the following two extra permissions:
    exec dbms_java.grant_permission('SCOTT', 'SYS:java.security.SecurityPermission','putProviderProperty.BC', '' );
    exec dbms_java.grant_permission( 'SCOTT', 'SYS:java.security.SecurityPermission','insertProvider.BC', '' );
    Oboviously SCOTT would be changed to whichever schema you are using.
    Kuassi http://db360.blogspot.com

  • Use css file in oracle 10g report builder

    hi every one
    i am using oracle 10g report buidler. i want control paramform by usign css file.
    any body have idea how can i use css file in oracle report builder 10g and how can i modify it's path and i how can i manage any css class on a perticular field.

    Thanks Billy.
    Yes you are right.
    Here why I discarded that option is,
    I may get the source files with changing layouts.
    My Actual scenario is as follows.
    Initially we developped all the things using PL/SQL packages. Its working fine.
    But as per the inputs we received from requirements group, the file structure changes dynamically. and we would able to consider those new columns also. We should be able to changes the rules dynamically.
    Lets say, we doing fullouter join on Src_A and Src_B. on columns col1_A and col1_B.
    Now the requirement changes in a way that, the join should be done on Src_A and Src_C. on columns col1_A and col_C.
    For this I need to define a new package.
    Instead of that, I would like to do everything dynamically based on configuration parameters given as input.
    Thank you,
    Regards,
    Gowtham Sen

  • SQL Tuning using Enterprise manager in oracle 10g

    Hi,
    In oracle 10g you have the enterprise manager which can be used to tune sql statements using the SQL Tuning ADvisor and SQL access advisor.
    I believe in oracle 10g the process of SQL Tuning is slightly easier using the Enterprise Manager ...so if some one could explain me that process...
    Again thanking you in advance
    regds
    Manoj Gokhale

    Hi Manoj,
    Didn't you already start two other threads about this same question the SQL forum?
    How do i do the SQL Statement tuning
    Enterprise Manager - sql tuning advisor , Access advisor for SQL Tuning

  • Errors using DBMS_SQLTUNE Advisors for Oracle 10g

    I get errors trying to tune the below query for Oracle 10g using the DBMS_SQLTUNE advisors.
    It happens when I wrap either a large block of PL/SQL code that uses bind variables or multiple nested subqueries with multiple JOIN conditions in a SELECT query statement that I wish to tune using the 10g SQLTUNE advisors.
    Message was edited by:
    benprusinski

    Hi, I was trying to use the DBMS_SQLTUNE package to tune my sql statements used in the huge procedure. I can successfully create a task and execute it. But when I run report tuning task, I'm always getting error like the one in below example. Two questions I have now.
    1) Is this becuase I'm using bind, but not passing any values?
    2) Can I able to use to this package to tune a procedures instead of sql statement?
    Example output...
    SQL&gt; SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_task3')
    2 FROM DUAL;
    DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK3')
    GENERAL INFORMATION SECTION
    Tuning Task Name : my_sql_tuning_task3
    Tuning Task Owner : SCOTT
    Scope : COMPREHENSIVE
    Time Limit(seconds) : 3000
    Completion Status : COMPLETED
    Started at : 02/26/2009 21:44:41
    Completed at : 02/26/2009 21:44:41
    Number of Errors : 1
    DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK3')
    Schema Name: KPRAVEEN
    SQL ID : 479831s42xj1n
    SQL Text : SELECT a.pdrorn, a.pdrcto, a.pdrlln FROM f4311 a
    WHERE a.pddoco = receiptsrcrec.prdoco AND a.pddcto = :2 AND
    a.pdkcoo = :3 AND a.pdsfxo = :4 AND a.pdlnid = :5
    ERRORS SECTION
    SQL&gt;

  • What is the use of GSD in Oracle 10g RAC ...?

    Hi Rajesh,
    If the GSD is not used in the new versions (only for backward comparability). we can drop this resource from CRS. what is the impact of this if we drop this resource.
    Thanks in advance.

    Hi,
    GSD IS USED ONLY IF 9I RAC DATABASE IS PRESENT
    The function of GSD (10g and above) is to service requests for 9i RAC management clients and therefore when there are no 9i databases present, there is nothing for GSD to do.
    Consequently, there will be no impact on a RAC cluster if GSD is offline and 9i is not used.
    If gsd fails to start due to whetever reasons then best thing is to work with Oracle support to analyze and fix the issue. Until that time, gsd can be temporarily disabled.
    In 11.2 GSD is disabled by default and the service will show as target:offline, status:offline.
    Ref: MOC ID : 429966.1
    Hope your question is answered..
    Regards,
    Pradeep. V

  • Use of XML in Oracle 10G

    Hi,
    I am using Oracle 10 G.
    i am having a scenario that, I am getting 2 files as input. I have do full outer join on some columns.
    Prior I don't know on what columns I am going to apply join. The input file structure may changes.
    I would like to configure these type of scenario.
    I thought, I can acheive this using XML.
    So, Can we do this using Oracle XML?
    Any suggestion or help would be appreciated greatly.
    Thanks in advance.
    Thank you,
    Regards,
    Gowtham Sen.

    Thanks Billy.
    Yes you are right.
    Here why I discarded that option is,
    I may get the source files with changing layouts.
    My Actual scenario is as follows.
    Initially we developped all the things using PL/SQL packages. Its working fine.
    But as per the inputs we received from requirements group, the file structure changes dynamically. and we would able to consider those new columns also. We should be able to changes the rules dynamically.
    Lets say, we doing fullouter join on Src_A and Src_B. on columns col1_A and col1_B.
    Now the requirement changes in a way that, the join should be done on Src_A and Src_C. on columns col1_A and col_C.
    For this I need to define a new package.
    Instead of that, I would like to do everything dynamically based on configuration parameters given as input.
    Thank you,
    Regards,
    Gowtham Sen

  • Deletion of archive log using RMAN Target in Oracle 10g

    Hi All,
    I recently have noticed that the archive logs have occupied 102 GBs out of the drive and I need to free up some space. When I tried to connect RMAN Catalog using
    connect catalog user@dbI got error message as
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been usedBut I was able to get through using
    connect target user@dbMy Query is can I use
    RMAN> delete noprompt expired archivelog all;as given in [how to delete archive log file |https://forums.oracle.com/forums/thread.jspa?threadID=2321257&start=0&tstart=0]
    Or shall I take any other approach to delete the obsolete archive logs?
    Regards,
    *009*

    Hello;
    I recently have noticed that the archive logs have occupied 102 GBs out of the drive and I need to free up some space. When I tried to connect RMAN Catalog using
    connect catalog user@dbI got error message as
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been usedBut I was able to get through using
    connect target user@db
    Are you trying to connect it through Grid control ? If connecting through a script, then please post its contents.
    Make sure you are not connecting to the target database using "nocatalog".
    rman target sys/<pwd_of_target>@<target_db> catalog <catalog_schema>/<catalog_schema_pwd>@<catalog_db>
    My Query is can I use
    RMAN> delete noprompt expired archivelog all;
    as given in [how to delete archive log file |https://forums.oracle.com/forums/thread.jspa?threadID=2321257&start=0&tstart=0]
    Or shall I take any other approach to delete the obsolete archive logs?
    Regards,
    *009*Are these archives backed up ? The above command only updates the RMAN repository if in case the archives were delete manually at OS level.
    I would recommend you to backup these archives and then delete them.
    RMAN>backup archivelog all not backedup 1 times delete input;If these archives are already backed up and have not been deleted from the disk, then you can use the below command
    RMAN>delete force noprompt archivelog all completed before 'SYSDATE-n';where "n" is the number of days behind the current date. Make sure to verify if these archives have been backed up before deleting.
    Regards,
    Shivananda

Maybe you are looking for

  • No longer able to include a photo in text message

    All of a sudden the option to text a photo when viewing it on my phone has disappeared.  Any suggestions?

  • Audio lost from Keynote 09 import to iPad

    I thought the recent Keynote for iPad software update was supposed to allow importing audio from Keynote 09 files. I still have no audio with these files on the iPad. Suggestions?

  • Moving Stock out of Quality Inspection

    Hi Guys, I have a slight issue that I need help with. First, let me explain the situation. I have a client that wants to use a 3rd party for their Inventory postings. They DO NOT want SAP Quality to move stock. Currently they have an Interface in pla

  • Massive crashing in iWeb

    For reasons I can't seem to figure out, my iWeb is prone to massive, unpredictable crashes. When I was first building my website, it happened constantly: the entire computer (not just the program) freezes and then the monitor flashes as if it's havin

  • Changing photos' dates

    My camera's clock had a wrong timing with the result of the photos being sorted in the wrong way on iphoto. I tried to change manually the date of the photos but it seems that this is not possible. Is there any way of changing the dates of the photos