ORA-00283:,ORA-19909:,ORA-19909:

Hi,
I am doing recovery with hot backup (whiout using RMAN) in my stand by database dupdb but getting below error.
SQL> select name, open_mode from v$database;
NAME      OPEN_MODE
DUPDB     MOUNTED
SQL> set logsource 'D:\app1\Archivelocation';
SQL> recover database using backup controlfile until cancel;
ORA-00283: recovery session canceled due to errors
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: 'D:\APP1\APP\HIMANSHU\ORADATA\DUPDB\SYSTEM01.DBF'
Please let me know What wrong I am doing here.
Thanks,
Michel

HI, welcome to OTN form,
fb767351-a660-4b18-9a9f-73bc141f6a0c wrote:
Hi,
I am doing recovery with hot backup (whiout using RMAN) in my stand by database dupdb but getting below error.
SQL> select name, open_mode from v$database;
NAME      OPEN_MODE
DUPDB     MOUNTED
SQL> set logsource 'D:\app1\Archivelocation';
SQL> recover database using backup controlfile until cancel;
ORA-00283: recovery session canceled due to errors
ORA-19909: datafile 1 belongs to an orphan incarnation
ORA-01110: data file 1: 'D:\APP1\APP\HIMANSHU\ORADATA\DUPDB\SYSTEM01.DBF'
From Metalink: (Oracle Support)
From Metaclick
Error:     ORA-19909 (ORA-19909)
Text:     datafile %s belongs to an orphan incarnation
Cause:     Either the specified datafile was restored from a backup that was
     taken during a period of time that has already been discarded by a
     resetlogs operation, or Oracle cannot identify which database
     incarnation the file belongs to. The alert log contains more
     information.
Action:     Restore a backup of this file that belongs to either the current
     or a prior incarnation of the database. If you are using RMAN to
     restore, RMAN will automatically select a correct backup.
Thank you

Similar Messages

  • ORA-00283

    Hello
    I am using Oracle XE on Linux. I want to create a backup server in case my production server is down the backup server has the most recent backup available.
    To do this I taken a Cold backup of the Production DB and copied the files at the same location at my Backup server. Backup DB started fine.
    From onwards I don't want to down my Production server and therefore I taken the backup of production controlfile by using
       ALTER DATABASE BACKUP CONTROLFILE ........Then I copied all the archivelogs from production to the Backup server. On the backup server I connected SQL Plus and wrote:
    SQL> startup mount;
    ORACLE instance started.
    Total System Global Area  536870912 bytes
    Fixed Size                  1259932 bytes
    Variable Size             427820644 bytes
    Database Buffers          104857600 bytes
    Redo Buffers                2932736 bytes
    Database mounted.                       
    SQL> recover database using backup controlfile;
    ORA-00279: change 27442002 generated at 03/23/2009 10:05:52 needed for thread 1
    ORA-00289: suggestion :                                                       
    /home/omer/flash_recovery_area/XE/archivelog/2009_03_24/o1_mf_1_3167_%u_.arc  
    ORA-00280: change 27442002 for thread 1 is in sequence #3167                  
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00283: recovery session canceled due to errors
    ORA-00354: corrupt redo log block header
    ORA-00353: log corruption near block 43565 change 3028861204237 time 03/23/2009
    10:05:52
    ORA-00334: archived log:
    '/home/oracle/flash_recovery_area/XE/archivelog/2009_03_22/o1_mf_1_3167_4wf77s3d_.
    arc'
    ORA-01112: media recovery not started Kindly help me in doing this.
    Habib

    H a b i b wrote:
    SQL> recover database using backup controlfile;
    ORA-00279: change 27442002 generated at 03/23/2009 10:05:52 needed for thread 1
    ORA-00289: suggestion :
    /home/omer/flash_recovery_area/XE/archivelog/2009_03_24/o1_mf_1_3167_%u_.arc
    ORA-00280: change 27442002 for thread 1 is in sequence #3167
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00283: recovery session canceled due to errors
    ORA-00354: corrupt redo log block header
    ORA-00353: log corruption near block 43565 change 3028861204237 time 03/23/2009
    10:05:52
    ORA-00334: archived log:
    '/home/oracle/flash_recovery_area/XE/archivelog/2009_03_22/o1_mf_1_3167_4wf77s3d_.
    arc'You have corrupted archive log. Maybe during copying not all file copied. Copy once more this particular file from production server and try again to recover.

  • ORA-00283: recovery session canceled due to errors

    Dear All,
    I have standby database in which STANDBY_FILE_MANAGEMENT was MANUAL. I have shrink undo table-space in primary database. After 2 days I tried to recover standby database. I got following error.
    ORA-00283: recovery session canceled due to errors
    ORA-01274: cannot add data file '/home/app/oracle/oradata/OMNDB/undotbs01.dbf'
    - file could not be created
    I am unable to shrink undo table-space in standby database as I did in primary database as it is not open.
    please anyone help me to get clarify this issue.
    In Standby_
    SQL> select name from v$datafile;
    NAME
    /home/app/oracle/oradata/OMNDB/system01.dbf
    /home/app/oracle/oradata/OMNDB/undotbs01.dbf
    /home/app/oracle/oradata/OMNDB/sysaux01.dbf
    /home/app/oracle/oradata/OMNDB/MY_oms_ts01.dbf
    /home/app/oracle/oradata/OMNDB/nologging_ts01.dbf

    Thank you CKPT for reply.
    this is the output when MRP
    SQL> recover standby database;
    ORA-00283: recovery session canceled due to errors
    ORA-01111: name for data file 2 is unknown - rename to correct file
    ORA-01110: data file 2: '/home/app/oracle/product/10.2.0/db_1/dbs/UNNAMED00002'
    ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
    ORA-01111: name for data file 2 is unknown - rename to correct file
    ORA-01110: data file 2: '/home/app/oracle/product/10.2.0/db_1/dbs/UNNAMED00002'
    this is in the alert log
    ORA-1112 signalled during: ALTER DATABASE RECOVER CANCEL ...
    Tue Jan 29 09:17:53 2013
    db_recovery_file_dest_size of 10240 MB is 0.00% used. This is a
    user-specified limit on the amount of space that will be used by this
    database for recovery-related files, and does not reflect the amount of
    space available in the underlying filesystem or ASM diskgroup.
    Tue Jan 29 10:29:57 2013
    ALTER DATABASE RECOVER standby database
    Tue Jan 29 10:29:57 2013
    Media Recovery Start
    Managed Standby Recovery not using Real Time Apply
    Tue Jan 29 10:29:57 2013
    Media Recovery failed with error 1111
    ORA-283 signalled during: ALTER DATABASE RECOVER standby database ...

  • ORA-00283: recovery session canceled due to errors. Help me.

    Something appears to be wrong with my control file backup. Upon
    moving the backed up files to my "test" machine, I place them in the
    data directory, and rename my control file backup to the correct name
    and run this procedure:
    - I start the instance
    - I mount the database
    - I issue a recover database
    I then receive the following error:
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    Does anyone have any thoughts around this?

    Hi,
    Have you taken backup of control file?
    (alter database backup controlfile to trace)
    Does the path of datafiles on test machine is same as that of production machine from where you have copied files?
    Steps:
    1> startup nomount
    2> copy create controlfile command from tracefile
    If paths are different change them.
    3> recover database until cancel using backup controlfile
    It will ask archive logs path, specify path.
    Press cancel after you have applied all archivelogs.
    4> alter database open resetlogs
    5> add tempfile in database.

  • IR Report Search - ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression

    Hi All,
      I had created a IR report based on a table and it was working with no issues.  But after few days, when I try searching using the IR search bar it shows "ORA-20001: get_dbms_sql_cursor error ORA-00936: missing expression" error message. I don't see any debug messages or errors in the debug window. The Finder drop down is empty too, there are no columns displayed to filter.
    When I recreate the IR report(new page) based on the same table, It works fine and there are no issues with the search.  But the old IR report search doesnt work. I have not modified the any thing in the old report after initial creation. Report uses Primary key based on a sequence.
    What might have caused this issue?
    Is there a way to intercept the search query from IR report?
    Apex version - 4.2.3.00.08.
    Any help on this appreciated.
    Thanks,
    Jagan

    Hi MK, as I had mentioned in my post, I don't see any logs in the debug window, query tab.
    Can you please guide me how to check the query logs on search?
    Thanks,
    Jagan

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • IR: ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier

    Hi everyone,
    has anyone else had this error which has been driving me round the bend during the last three days?
    I have an interactive report which used to work fine.
    Now it happens (when the page loads/a filter is en- or disabled) that - from time to time, but unpredictable - I receive
    ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier
    The report is based on a table function.
    I will try to set up a testcase and post the link here, but so far I haven't managed to force the error to occur.
    But maybe someone else has already bumped into this kind of error? I would be grateful for any hints!
    Best regards,
    Sabine
    Application Express 4.1.0.00.32
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    Hi Jari,
    I changed the type definition (the return type of the table function) and extended the select list in the source of the IR.
    I do not use 'select *' but reference every column explicitly. So APEX easked me whether to add the new column.
    I also tried deleting in recreating the region, but no luck.
    Any more ideas?
    Best regards,
    Sabine

  • ORA-20006: ORA-01722: invalid number ORA-06512: at "APPS.WF_NOTIFICATION"

    Hi,
    I am having a wft program, which checks a function activity and depending on the value returned sends difference notifications.
    The package body completed successfully from backend and while running the workflow program it sends a notification also. But while opening the notification it gives the following error,
    ORA-20006: ORA-01722: invalid number ORA-06512: at "APPS.WF_NOTIFICATION", line 5328 ORA-06512: at line 5
    I have 3 procedures in my package body and all the 3 procedures have exceptions defined as follows, if they are using any workflow activities.
    ==========================================================
    EXCEPTION
         WHEN OTHERS THEN
              WF_CORE.context (
              'WFCustCheck',
              'MisCustDataFromTableDoc',
              document_id,
              display_type,
              document,
              document_type,
              SQLERRM
    RAISE_APPLICATION_ERROR (-20006, SQLERRM);
    ==========================================================
    But I am not able to figure out what is causing this error. What does this "line 5328 ORA-06512: at line 5" in the error message indicate?. My package body has only 600 lines. And why is the error message not displaying the procedure name? though I have defined the procedure name in the exception.
    What is the best way to get the procedure name in the error message? So that it becomes easier for identifying which procedure is causing the erro?
    Please let me know.
    Thanks

    Hi,
    Instead of the RAISE_APPLICATION_ERROR command, just replace that with RAISE;
    The error is coming out of the package that is sending the notification (WF_NOTIFICATION), which is invoked when you open the notification. I'm guessing that line 5 is the line in your code though.
    Are you using documents to send the notification, or are they purely defined in the .wft file?
    Matt
    Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
    http://www.workflowfaq.com
    http://forum.workflowfaq.com
    NEW! - WorkflowFAQ Blog at http://thoughts.workflowfaq.com

  • Linked Servers - Sql server 2005 to connect to Oracle 11g using ldap.ora instead of tnsnames.ora

    We have a SQL Server 2005 64bit box that needs a linked server created to Oracle 11g 64bit box. I have all the Oracle client software installed and can successfully connect to the Oracle database using SQL+ on the SQL Server 2005 64bit box. When I create
    the linked server and select the OraOledb.Oracle provider, I get the TNSNames error. The Oracle server does not use tnsnames.ora it uses OLAP.ora to resolve. How do I get Linked server to stop trying to connect via TNSNames and use the OLAP.ora file instead?
    I can't find any articles for this specific issues. All Oracle examples tell you to use TNSNAMES. The Oracle server is not under my companies control so I can not force the vendor to use tnsnames instead of OLAP.

    Hi,
    Have you got a resolution?
    Thank you.

  • ORA-20001: error 29th ORA-24344 When creating a workspace

    Hi,
    I just installed APEX 4.0 on 10g (10.2.0.4).
    When I tried to create a new workspace, at the last step (after clicking "Create Workspace" button), it fails with the following error.
    ORA-20001: error 29th ORA-24344: success with compilation error
    Error provisioning test.
    I could not find any errors in PLSQL debug error, and in DBA_ERRORS table.
    Could you help me to fix this problem? I ran utlrp.sql to make sure we don't have invalid objects. And I read the installation log and found no errors. XDB, OWA installed.
    I have another APEX 4.0 instance on 11g R2, and it works fine.
    Thanks
    Jung
    Edited by: jwryoo on Jul 15, 2010 8:37 AM

    thanks.
    Yes, that's I already checked and confirmed that the privilege is granted.
    DBA_ERRORS did not show any errors owned by APEX% users.
    But I did see some errors owned by XDB.
    PL/SQL: Item ignored
    PLS-00201: identifier 'UTL_FILE' must be declared
    PL/SQL: Statement ignored
    PLS-00201: identifier 'DBMS_LOB' must be declared
    It seems the DB has revoked some public access for security reasons.
    So, I am trying to ask DBA to grant the privileges to XDB.

  • ORA-06512 and/or ORA-00936 ... simple procedure problem probably

    I'm passing in codes like the following to the stored procedure (below):
    ",IRE,UK,FR,SCOT,WALES" (a string of words seperated by a ',')
    Problem is I get the following error:
    ORA-00936: missing expression ORA-06512: at "APPNAME.PKG_TOOL", line 132 ORA-06512: at line 1
    I googled the two ORA's but am still stumped. I'd appreciate any help at all as I'm still not overly familiar with SQL.
    PROCEDURE sp_check_code_Exist(p_CodeList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
         thissql varchar(1000);
         BEGIN
              thissql := thissql || 'select * from codes_data c where ';
              thissql := thissql || 'c.code in ('|| p_CodeList ||') ';
              open p_cursor FOR thissql;
              begin
                     Execute immediate thissql;
              end;
         END sp_check_code_Exist;

    I know this is digressing a bit from the thread heading but I'd like to know if I really will be screwed if I don't optimise.
    The machine that this is being hosted on will be a top notch machine with a very fat line and will have probably only thousands of codes.
    This is the code as it stands now
    PROCEDURE sp_check_GenericCodes(p_GenericsList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
         thissql varchar(1000);
         BEGIN
              thissql := thissql || 'select distinct generic_code from emc_codes_data ed where ';
              thissql := thissql || 'ed.generic_code in ('||p_GenericsList||')';
              open p_cursorSMB FOR thissql;
         END sp_check_GenericCodes;So all I'll be returning is a few thousand words which will then be sorted alphabetically and will be then compared to another string which will be sorted alphabetically, to see if there is any missing code, and if there are then those codes will be spit out to an admin who will realise he made a mistake and where the mistake is.
    This is how its all called:
    public string checkGenericCodesExist(string codesList)
                   OracleDataReader rdr = null;
                   DBConnect dbConnLocal = null;
                   OracleCommand cmd = null;
                   string sRetVal = null;
                   string CurrentFunction = "PPTEngine.clsPart.genericCodeExsists";               
                   try
                        dbConnLocal = new DBConnect(CurrentFunction, "Pkg_SMBTool.sp_check_GenericCodes", m_Stream);
                        // Pass in parameters
                        dbConnLocal.addParam(new OracleParameter("p_cursorSMB", OracleType.Cursor));                    
                        dbConnLocal.setParamDirection("p_cursorSMB",ParameterDirection.Output);
                        dbConnLocal.addParam(new OracleParameter("p_GenericsList", OracleType.VarChar));
                        dbConnLocal.setParamValue("p_GenericsList", codesList);                    
                        // Execute
                        cmd = dbConnLocal.ExecuteProcedure();
                        rdr = (OracleDataReader)cmd.Parameters["p_cursorSMB"].Value;
                        // Loop
                        if (rdr.HasRows)
                             while (rdr.Read())
                                  if (!rdr.IsDBNull(rdr.GetOrdinal("Generic_Code"))) m_GenericCode = rdr.GetString(rdr.GetOrdinal("Generic_Code"));
                        rdr.Close();
                        //remove the '
                        string[] PPTCodes = codesList.Replace( "'", null).Split("','".ToCharArray());
                   catch (Exception e)
                        Log.WriteToFile(CurrentFunction + " - " + e.Message, System.Diagnostics.TraceLevel.Error);
                        throw e;
                   finally
                        if (dbConnLocal!=null) dbConnLocal.Close();
                   return sRetVal;
              }The above function is still a work in progress, but is almost there.

  • Solved: ORA-20001: get_dbms_sql_cursor error ORA-01445: cannot select ROWID

    I got an error, googled it and couldn't find a good answer. Joe Fuda helped me to fix the problem. Here is the answer for future google results.
    Error:
    ORA-20001: get_dbms_sql_cursor error ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    Query that triggered the error:
    SELECT
    p.rowid
    , p.product_id
    , p.product_type
    , p.product_name
    , p.product_description
    FROM
    product p
    , link_release_product rp
    WHERE
    rp.release_id = 1
    AND
    p.product_id = rp.product_id
    This is casued by the keyword "rowid".
    The same error occurs if 'p.rowid' is replaced with 'p."ROWID"'.
    You can replicate this error in SQL Command by adding wrapping the query with 'select * from ( [the query] )'
    Fix:
    Add an alias to 'p.rowid' so the query is now like:
    SELECT
    p.rowid product_rowid
    , p.product_id
    , p.product_type
    Reason:
    Unclear, it might have something to do with how APEX does pagination.

    ok, found the answer... it has to do with the single row view issue addressed in this thread... ORA-01446 on Interactive query
    (sorry if there's a better way to link to other threads in this forum).

  • Ora -00283 & ora-01610

    Hello
    i got the following errors on creation of database. after the command alter database open resetlogs i got the above error
    i checked the status of datafile and it shows as recover.
    so after mounting the database i ran the command recover datafile 'location of datafile' , but it gave me error ora-06101 saying : recovery using the backup controlfile option must be done
    i went thr some of the forums on metalink on this error.
    i ran the command
    SQL> recover database until cancel using backup controlfile;
    following was the O/P
    ORA-00279: change 475702716 generated at 09/07/2004 19:04:58 needed for thread
    ORA-00289: suggestion : E:\ARCH_DEV\ARC01162.001
    ORA-00280: change 475702716 for thread 1 is in sequence #1162
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00308: cannot open archived log 'E:\ARCH_DEV\ARC01162.001'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'E:\ORACLE\ORA92\DEV\SYSITCH.DB1'
    could anyone tell me how to proceed thr next step
    thanks
    Kedar

    Well, the error is it can't find the archive log - is the path and file name correct?
    DO you still have your archive logs? If you have ran out of archivelogs, then you can look into your REDO logs and see which one contains the SCN (system change number) that is being asked for and enter that as the log for recovery. (using the same process you used above)
    good luck

  • Ora-00604 error and ora 01000 error while report generation.

    hi all,
    I am trying to generate the multiple reports of same template through a program.
    While this job is running, i get the following error at the BIP console and the reports don't get generated.
    [101711_044115578][][EXCEPTION] java.sql.SQLException: ORA-00604: error occurred
    at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-01000: maximum open cursors exceeded
    Kindly help.
    Thanks.

    Lots of resources with a simple search to see what this is about, for example:
    http://www.orafaq.com/wiki/ORA-01000
    ORA-01000:     maximum open cursors exceeded
    Cause:     A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.
    Action:     Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.
    open_cursors parameter
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams160.htm#REFRN10137
    Oracle support note:
    OERR: ORA-1000 maximum open cursors exceeded (Doc ID 18591.1)

  • Problems with moving files to ora directory UTL_FILE.PUT_RAW - ORA-29285

    hi,
    i'm using apex 4.1
    i have a procedure which moves my file from apex_application_files to ORA directory.
    if i choose a text file or small word document which is 1kb, it works. but if i have pdf file (85kb) or word document (16kb) it gives me ORA-29285: file write error
    what's my problem?
    PROCEDURE put_file_to_server (p_filename IN VARCHAR2,p_cert_type IN VARCHAR2,p_cert_pk IN NUMBER)
    AS
    l_file UTL_FILE.file_type;
    l_blob_len INTEGER;
    l_pos INTEGER := 1;
    l_amount BINARY_INTEGER := 32767;
    l_buffer RAW (32767);
    v_new_filename VARCHAR2(100);
    v_bfile BFILE ;
    BEGIN
    -- delete from apex_application_files;
    --Neuen Dateinamen generieren
    v_new_filename := p_cert_type||'_'||p_cert_pk;
    v_bfile := BFILENAME (v_directory, v_new_filename);
    --Datei erstellen
    l_file := UTL_FILE.fopen(v_directory,v_new_filename,'w');
    IF DBMS_LOB.FILEEXISTS (v_bfile) = 1 THEN
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'File exists');
    FOR rec IN (select blob_content lblob from apex_application_files where rownum = 1)
    LOOP
    l_blob_len := DBMS_LOB.getlength(rec.lblob);
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Filesize is '||l_blob_len);
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.read (rec.lblob, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw (l_file, l_buffer, FALSE);
    l_pos := l_pos + l_amount;
    END LOOP;
    COMMIT;
    END LOOP;
    --Datei schließen
    UTL_FILE.fclose(l_file);
    else
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Datei doesn't exist');
    end if;
    EXCEPTION
    WHEN OTHERS
    THEN
    -- Close the file if something goes wrong.
    IF UTL_FILE.is_open (l_file) THEN
    UTL_FILE.fclose (l_file);
    END IF;
    delete from apex_application_files;
    RAISE;
    delete from apex_application_files;
    END put_file_to_server;

    Sorry but din't test this...Can you give it a try and see if this works?
    PROCEDURE put_file_to_server(
        p_filename  IN VARCHAR2,
        p_cert_type IN VARCHAR2,
        p_cert_pk   IN NUMBER)
    AS
      l_file UTL_FILE.file_type;
      l_blob_len INTEGER;
      l_pos      INTEGER      := 1;
      l_amount BINARY_INTEGER := 32767;
      l_buffer RAW (32767);
      v_new_filename VARCHAR2(100);
      v_bfile BFILE ;
      vblob BLOB;
      vstart NUMBER := 1;
      my_vr RAW(32000);
      bytelen NUMBER := 32000;
      LEN     NUMBER;
    BEGIN
      -- delete from apex_application_files;
      --Neuen Dateinamen generieren
      v_new_filename := p_cert_type||'_'||p_cert_pk;
      v_bfile        := BFILENAME (v_directory, v_new_filename);
      --Datei erstellen
      --l_file                          := UTL_FILE.fopen(v_directory,v_new_filename,'w');
      l_file                          := UTL_FILE.fopen(v_directory,v_new_filename, 'WB', 32760);
      IF DBMS_LOB.FILEEXISTS (v_bfile) = 1 THEN
        cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'File exists');
        FOR rec IN
        (SELECT blob_content lblob,
          LENGTH(blob_content) LEN
        FROM apex_application_files
        WHERE rownum = 1
        LOOP
          cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Filesize is '|| LEN);
          IF LEN < 32760 THEN
            utl_file.put_raw(l_file,lblob);
            utl_file.fflush(l_file);
          ELSE -- write in pieces
            vstart      := 1;
            WHILE vstart < LEN
            LOOP
              dbms_lob.read(vblob,bytelen,vstart,my_vr);
              utl_file.put_raw(l_file,my_vr);
              utl_file.fflush(l_file);
              -- set the start position for the next cut
              vstart := vstart + bytelen;
              -- set the end position if less than 32000 bytes
              x         := x - bytelen;
              IF x       < 32000 THEN
                bytelen := x;
              END IF;
            END LOOP;
          END IF;
         END LOOP;
        ELSE
          cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Datei doesnt exist');
        END IF;
        utl_file.fclose(l_file);
      EXCEPTION
      WHEN OTHERS THEN
        -- Close the file if something goes wrong.
        IF UTL_FILE.is_open (l_file) THEN
          UTL_FILE.fclose (l_file);
        END IF;
        DELETE FROM apex_application_files;
        RAISE;
        DELETE FROM apex_application_files;
      END put_file_to_server;Edited by: Vitor Rodrigues on 17/Fev/2012 12:03

Maybe you are looking for

  • I need to move my PSE 11 from an old laptop running Vista to a new PC on Windows 8.1.

    Originally my photos were all on the hard drive, but as that filled up I have moved them all to an external USB drive. All my photos that are cataloged are on the same external drive. I have a full catalog backup from Elements, but on the same USB dr

  • Issue with IP address resource

    Hi I have been having an issue on our file server cluster recently where an IP address for the backup LAN scope will not come online. This happened a few days ago and the IP address eventually went online, but now it has been failing for over of day

  • Getting error in Workflow

    Hi Experts, I am getting the error when the step is executed the error is 'Work item 000000004013: Object CL_HRASR00_WF_COMPONENTS method WI_EXECUTION_VIA_R3_INBOX cannot b'... I used the Standard Task 'TS17900100' and i maintained the Program Exit a

  • Play Clips in Reverse Order

    I have clips A,B,C lets say for example. However I want to play it backwards meaning C,B,A. I do not want to just reverse playback the clips. I want to completely mirror clips A,B,C to play C,B,A. Do I need to copy and merge all the clips as one then

  • Upgrade from Siebel Analytics 7.8 to 7.9, what's the process?

    Hello If we were gonna upgrade siebel analytics 7.8 to 7.9, what is needed? Do I have to install 7.9 so it overrides 7.8 or how does it work? I have little experience doing that, so please help me with the process.. Thank you so very much.