ORA-27140: attach to post/wait facility failed

Hi
We are facing following probelm on hp 11i /oracle 9i system
##ORA-27140: attach to post/wait facility failed
Details Log As Below
BR0002I BRARCHIVE 6.40 (15)
BR0006I Start of offline redo log processing: adqqukeg.sve 2005-08-20 11.59.10
BR0280I BRARCHIVE time stamp: 2005-08-20 11.59.10
BR0301W SQL error -27140 at location BrDbConnect-2
ORA-27140: attach to post/wait facility failed
BR0310W Connect to database instance UX1 failed
BR0280I BRARCHIVE time stamp: 2005-08-20 11.59.10
BR0301W SQL error -27140 at location BrDbConnect-2
ORA-27140: attach to post/wait facility failed
BR0310W Connect to database instance UX1 failed
BR0278W Command output of '/oracle/UX1/920_64/bin/sqlplus':
SQL*Plus: Release 9.2.0.6.0 - Production on Sat Aug 20 11:59:10 2005
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
SQL> Connected to an idle instance.
SQL> ORA-01034: ORACLE not available
SQL> Disconnected
BR0280I BRARCHIVE time stamp: 2005-08-20 11.59.10
BR0279W Return code from '/oracle/UX1/920_64/bin/sqlplus': 0
BR0302W SQLPLUS call for database instance UX1 failed
BR0323W 'Archive log list' for database instance UX1 failed
BR0019W Volume size or disk capacity reached - not all offline redo log files will be saved
BR0280I BRARCHIVE time stamp: 2005-08-20 11.59.10
BR0008I Offline redo log processing for database instance: UX1
BR0009I BRARCHIVE action ID: adqqukeg
BR0010I BRARCHIVE function ID: sve
BR0048I Archive function: save
BR0011I 34 offline redo log files found for processing, total size 1160.301 MB
BR0112I Files will not be compressed
BR0130I Backup device type: tape
BR0102I Following backup device will be used: /dev/rmt/0mn
BR0103I Following backup volume will be used: UX1A01
BR0280I BRARCHIVE time stamp: 2005-08-20 11.59.10
BR0256I Enter 'c[ont]' to continue, 's[top]' to cancel BRARCHIVE:
If any one know this error

we solved the problem by resetting the permissions on the oracle executable as described underneath in the first solution mentioned.
The error ora-27140 is due to the lack accessibility to oracle
executables.
1. Please make sure that all oracle executables has permission as per
the note mentioned below.
583861 UNIX: Errors due to Oracle executable
(chmod 6751 oracle) Owner ORA<SID>
2. If the problem is not solved with this, please download the latest
patch level of the BR*tools as per SAP note 12741.
" Check the owner, the group and the permissions for sapdba and the br*
tools as described in Note 113747.
(Up to 4.6D, the same settings were valid for sapdba as for brarchive
and brbackup, but this has changed with the transfer of the command lin options to brconnect.)
File libsbt.* is a dynamic backup library (DLL). By default, it is not
used. For more information about this library, see Note 142635. The
settings for this are:
-rwxr-xr-x <sid>adm sapsys ... libsbt.*"

Similar Messages

  • Oracle Error :: ORA-27140  attach to post/wait facility failed

    Hi Guys...
    I have a problem when I connect to my database...
    I get the error mentioned above...
    What might be the problem?
    Please help!!!!!!!!!!!!!!!

    What are permissions to $ORACLE_HOME/bin?
    Should be something like this:
    ls -ld $ORACLE_HOME/bin
    drwxr-xr-x 2 oracle dba 8192 Jan 15 17:36 /u01/app/oracle/product/RDBMS10g/bin

  • ORA-27154: post/wait create failed

    hi
    i am runing Oracle 9i R2 on SunOS 5.9 , i tried to startup my database and it gives me this error:
    ORA-27154: post/wait create failed
    ORA-27300: OS system dependent operation:semget failed with status: 28
    ORA-27301: OS failure message: No space left on device
    ORA-27302: failure occurred at: sskgpsemsper
    i have no space problem in my server , i have another database running on the same server without any problem.
    any suggestions !!
    thanks in advanced..
    wisam

    what are the effects of increasing the semmni and the semmnsMore memory (some KBs likely) allocated by the kernel.
    and do i have to reboot the server ?!.Yes (from Oracle doc: If you change the settings, save the /etc/system file and restart the system.)
    accually i have 4 databases in this server . does this make deferent ?From http://download-uk.oracle.com/docs/html/A96167_01/pre.htm#CHDCEHBG
    The SEMMNS parameter should be set to the sum of the PROCESSES parameter for each Oracle database, adding the largest one twice, and then adding an additional 10 for each database.
    Message was edited by:
    Pierre Forstmann
    Message was edited by:
    Pierre Forstmann

  • ORA-27146 Post/Wait Initialization failed

    Hi all,
    I had a problem when trying to startup 2 database at Solaris8 machine. Please help me to solve this problem.
    Problem:
    I have created 2 database seperately. But I couldnt started up those 2 database at the same machine. Like either one is alive but not second one. When I startup the second database, got this error message : ORA-27146 Post/Wait Initialization failed.
    I have tried to increase the sizes of System file variables at /etc/system, but its not.
    I dont know the calculation for those variables when I use 2 or more instances.
    Environment : Solaris8 / Oracle 8.1.5.
    Please let me know if you need more clarification of problem.
    null

    its a resources issue. change the init.ora file for resources such as db block buffers, processes, etc. you will be able to start the instance.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Chinnadurai Periyasamy ([email protected]):
    Hi all,
    I had a problem when trying to startup 2 database at Solaris8 machine. Please help me to solve this problem.
    Problem:
    I have created 2 database seperately. But I couldnt started up those 2 database at the same machine. Like either one is alive but not second one. When I startup the second database, got this error message : ORA-27146 Post/Wait Initialization failed.
    I have tried to increase the sizes of System file variables at /etc/system, but its not.
    I dont know the calculation for those variables when I use 2 or more instances.
    Environment : Solaris8 / Oracle 8.1.5.
    Please let me know if you need more clarification of problem.
    <HR></BLOCKQUOTE>
    null

  • Post/wait initialization failed

    Hi,
    Fail to startup an Oracle 8.1.5 on Solaris 8.
    The error message is:
    ORA-27146: post/wait initialization filed.
    Anyone can help?

    You ned to increase semaphores in etc/system file.Only root can change these values in Solaris.
    PUt the following parametrs sa given below or increase the existing values to march below values.
    These are the values in etc/system file you need to set to overcome your problem.hre you can go up to 200 processes.
    set shmsys:shminfo_shmmax=4294967295
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmseg=10
    set shmsys:shminfo_shmmni=100
    set semsys:seminfo_semmsl=210
    set semsys:seminfo_semmni=100
    set semsys:seminfo_semmns=510
    set semsys:seminfo_semopm=100
    set semsys:seminfo_semvmx=32767
    Hope this works for you
    null

  • Database error"ORA-00060: deadlock detected while waiting for resource"

    Hi All,
    I got dump as
    Database error text........: "ORA-00060: deadlock detected while waiting for
      resource"
    Internal call code.........: "[RSQL/RDUP/NRIV ]"
    Please check the entries in the system log (Transaction SM21).
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "READ_NRIV" "(FORM)", nor was it propagated by a RAISING clause.
    Can u ppl tell me how to get correct this?
    Edited by: Bala Chandar on Jul 20, 2009 11:01 AM

    Hi Bala,
    Same type of dump we got when we trigger the DTP which in process chain to load data from DSO to Info cube. And the load had processed with 225 data package and at 164th data package we got this error and except 164th data package all data package processed successfully
    And the request was red. So we had done processed manually by clicking the icon. So all its been green and successfully loaded.
    So when you do process manual the particular data package which got failed will be process successfully  

  • ORA-22288: file or LOB operation FILEOPEN failed (The data is invalid)

    Dear All,
    I am trying to insert a image file (gif) to one of my field.
    1. Here is my table structure and trying to insert gif image file to PIC file.
    SQL> desc cis2.david_pic
    Name Null? Type
    ID VARCHAR2(5)
    PIC BLOB
    2. I using sql command to create directory and the path is pointing where the DB
    server was installed.
    SQL> create or replace directory MY_FILES as '\\hkqaa-db1\TEXT_IMPORT';
    3. Written a script to insert empty blob first and than trying to use the dbms_lob.fileopen
    to upload the gif file.
    SQL> declare
    2 l_blob blob;
    3 l_bfile bfile;
    4 begin
    5 insert into cis2.david_pic values ( '1', empty_blob())
    6 returning pic into l_blob;
    7 l_bfile := bfilename('MY_FILES', 'bess_signature.gif');
    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 /
    4. After I ran my script I got this error message.
    declare
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    The data is invalid.
    ORA-06512: at "SYS.DBMS_LOB", line 475
    ORA-06512: at line 8
    Can any tell me what wrong? is this the way to insert image?
    Thanks

    Know this is an old post: (for sharing sake.)
    Please try avoiding
    1. the 'hyphen' in between the path (hkqaadb1 instead of hkqaa-db1)
    2. Give direct path like 'C:\TEXT_IMPORT' instead of network path.
    create or replace directory MY_FILES as '\\hkqaa-db1\TEXT_IMPORT'; -- Not working.
    create or replace directory MY_FILES as 'C:\hkqaadb1\TEXT_IMPORT'; -- Working.
    and this worked fine.
    Edited by: Arunan.KL on Mar 23, 2011 5:04 PM

  • Patch 9239090 - ORA-04021: timeout occurred while waiting to lock object

    Hello Guys,
    I need help urgently to comlete an upgrade of ebs 12.1.1 to 12.1.3.
    We are upgrading ebs 11i to 12i going live this weekend. We have encountered "ORA-04021: timeout occurred while waiting to lock object" on patch 9239090 with two Workers:
    In adctrl:
    1 Run AutoPatch R120 AFUTLGRS.pls FAILED
    2 Run AutoPatch R120 AFUTLOGS.pls FAILED
    sqlplus -s APPS/***** @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    Connected.
    create or replace package wf_bes_cleanup AUTHID CURRENT_USER as
    ERROR at line 1:
    ORA-04021: timeout occurred while waiting to lock object
    I have done everything everything imaginable but cannot get pass these 2 failed workers.
    1) I have checked are there are no locks blocking on any objects:
    select s1.username || '@' || s1.machine
    || ' ( SID=' || s1.sid || ' ) is blocking '
    || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status
    from v$lock l1, v$session s1, v$lock l2, v$session s2
    where s1.sid=l1.sid and s2.sid=l2.sid
    and l1.BLOCK=1 and l2.request > 0
    and l1.id1 = l2.id1
    and l2.id2 = l2.id2 ;
    2) I also checked and there is space in the database.
    3) From adctrl, I have tried restarting the jobs one by one but the worker 1 hangs at and eventually fails on several (12) attempts.
    4) The solution on Doc ID 1291064.1 is not the problem:
    SQL> select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI, FORCE_LOGGING
    from v$database;
    SUPPLEME SUP SUP FOR
    NO NO NO NO
    5) Manual execution still gave ORA-04021:
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
    6) The alert log has no related errors
    7) I Finally, after over 6 hours of waiting, I could only get the patch to continue after by using adctrl option 8 to skip these two workers.
    After proceeding, I have yet hit two more errors and now stuck:
    I have hit another error with the same patch:
    create or replace package body FND_LOG as
    /* $Header: AFUTLOGB.pls 120 ...
    AD Worker error:
    ORA-04021: timeout occurred while waiting to lock object
    Unable to process file in PACKAGE mode.
    Not converting file for Invoker's Rights because it appears to be a package body creation script (based on the filename).
    File is: /u02/applfinp/apps/apps_st/appl/fnd/12.0.0/patch/115/sql/AFUTLOGB.pls
    AD Worker warning:
    Product Data File
       /u02/applfinp/apps/apps_st/appl/admin/xniprod.txt
       does not exist for product "xni".
      This product is registered in the database but the above file does not exist in APPL_TOP.  The product will be ignored without error
    AD Worker error:
    The following ORACLE error:
    ORA-04063: package body "APPS.FND_LOG" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "APPS.FND_LOG"
    ORA-06512: at "APPS.FND_FUNCTION", line 834
    ORA-06512: at "APPS.FND_MENU_ENTRIES_C_DELTRG", line 4
    ORA-04088: error during execution of trigger 'APPS.FND_MENU_ENTRIES_C_DELTRG'
    Can I stop and restart this patch 9239090?

    Hello,
    I later executed the failed jobs or scripts manually (successfully) for the patch to continue
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql
    sqlplus -s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql
    The patch ended with the following :
    The following Oracle Reports objects did not generate successfully:
    ap reports/US APXARATE.rdf
    ar reports/US ARXCTA.rdf
    fa reports/US FASRSVED.rdf
    ont reports/US OEXOEORD.rdf
    pa reports/US PAXACMPT.rdf
    pa reports/US PAXALRUN.rdf
    pa reports/US PAXACRPT.rdf
    pa reports/US PAXCPGAL.rdf
    pa reports/US PAXPCRFD.rdf
    The patch execution ended but the patch number is not record in apps.ad_bugs table:
    select TO_CHAR(CREATION_DATE,'dd-Mon-yyyy, hh24:mm:ss'), BUG_NUMBER from apps.ad_bugs where bug_number in ('9239090');
    no rows selected
    JFI
    Patches located in ad_applied_patches to which there is no a corresponding record in ad_bugs:
    SQL> SELECT a.patch_name, TO_CHAR(max(a.last_update_date),'dd-Mon-yyyy, hh24:mm:ss')
    2 FROM applsys.ad_applied_patches a
    3 WHERE NOT EXISTS (SELECT '1'
    4 FROM ad_bugs b
    5 WHERE b.bug_number = a.patch_name)
    6 group by a.patch_name;
    PATCH_NAME TO_CHAR(MAX(A.LAST_UP
    9239090 26-Oct-2013, 00:10:27
    AutoConfig 25-Oct-2013, 17:10:51
    merger9179588 25-Oct-2013, 11:10:30
    merger_post_5903765 27-Apr-2013, 23:04:45
    mergeu6678700 25-Oct-2013, 16:10:09
    What could have happened that this was not recorded in ad_bugs?
    How to I get this recorded in the ad_bugs table?
    Thanks
    Mathias

  • ORA-02049: timeout: distributed transaction waiting for lock

    Hi,
    My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
    Application Details
    * Using Stateless Session EJB
    * Only one Business method in this EJB with transaction attribute set to "required"
    * This method executes two select queries & one update query
    * We are using JDBC to access the database.
    * We have configured a Data Source & are using it to get a database connection.
    * Weblogic's Oracle Driver is being used.
    More details
    * The application has been running well since a month.
    * Two days ago,the update query failed with the above error.
    * At that time, a single client was accessing the system.
    * Once this problem occurs, it starts appearing frequently.
    * Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
    * At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
    * Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
    Now my questions are
    # Why is this error happening & what does it mean?
    # It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
    # Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
    Thanks
    Guneet Sahai
    Exception Trace
    Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
    BEA1-252DE51AC930078CA638
    at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    guneet sahai wrote:
    Hi,
    My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
    Application Details
    * Using Stateless Session EJB
    * Only one Business method in this EJB with transaction attribute set to "required"
    * This method executes two select queries & one update query
    * We are using JDBC to access the database.
    * We have configured a Data Source & are using it to get a database connection.
    * Weblogic's Oracle Driver is being used.
    More details
    * The application has been running well since a month.
    * Two days ago,the update query failed with the above error.
    * At that time, a single client was accessing the system.
    * Once this problem occurs, it starts appearing frequently.
    * Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
    * At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
    * Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
    Now my questions are
    # Why is this error happening & what does it mean?
    # It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
    # Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
    Thanks
    Guneet SahaiHi Guneet. If you want to debug the JTA issue, I suggest opening an official
    support case. They will lead you through producing the JTA debug information.
    However, I believe you are correct that the transaction you describe is
    completely doable with a simple local transaction, so if you were to alter
    your pool to use the non-XA driver, it would probably be faster, simpler,
    and just work.
    Let me know...
    Joe
    >
    Exception Trace
    Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
    BEA1-252DE51AC930078CA638
    at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

  • Inserting image to table...ORA-22288: file or LOB operation FILEOPEN failed

    Good day!
    I'm just new with using databases, and i'm enjoying it.
    So I read that you can insert images to a table, and so i decided to try it... and here's where I'm at..
    *I made a directory
    CREATE directory image_dir as 'D:\Images';
    --Directory Created.
    *I created a table
    CREATE TABLE animages
    (aname VARCHAR2(40),
    breedno NUMBER(10),
    image_file BLOB,
    image_name VARCHAR2(40),
    CONSTRAINT aname_fk FOREIGN KEY (aname) REFERENCES clist(aname));
    --Table Created.
    *Then I made a procedure for inserting the images
    CREATE OR REPLACE PROCEDURE insert_image_file (p_aname VARCHAR2, p_breedno NUMBER, p_image_name IN VARCHAR2)
    IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := BFILENAME('IMAGE_DIR', p_image_name);
    INSERT INTO animages
         (aname, breedno, image_file, image_name)
    VALUES (p_aname, p_breedno, EMPTY_BLOB(), p_image_name)
    RETURNING image_file
    INTO dst_file;
    SELECT image_file
    INTO dst_file
    FROM animages
    WHERE aname = p_aname AND image_name = p_image_name
    FOR UPDATE;
    DBMS_LOB.fileopen(src_file, DBMS_LOB.file_readonly);
    lgh_file := DBMS_LOB.getlength(src_file);
    DBMS_LOB.loadfromfile(dst_file, src_file, lgh_file);
    UPDATE animages
    SET image_file = dst_file
    WHERE aname = p_aname AND image_name = p_image_name;
    DBMS_LOB.fileclose(src_file);
    END;
    --Procedure Created.
    *So i was able to do those but when i was trying to execute the procedure i get this error..
    execute insert_image_file('African Elephant', 60, 'African_Elephant');
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    The device is not ready.
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SCOTT.INSERT_IMAGE_FILE", line 18
    ORA-06512: at line 1
    I've been looking for a solution for a day now, hope someone could help me, thanks.
    BTW, I got the code for the PROCEDURE from a user named Aparna16, just did some minor editing so it would fit my tables, thanks.
    And sorry if the post is too long.

    Hi;
    ORA-22288:Error:     ORA-22288
    Text:     file or LOB operation %s failed %s
    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.
    Regard
    Helios

  • OWB9.0.4-- ORA-02049: timeout: distributed transaction waiting for lock

    I'm running a simple mapping that copies all columns of data (using a filter on date for just current records) from one table in SQL Server into a staging table on my Oracle DW schema. It's using a dblink with transparent gateway for SQL Server, which works fine from SQL*plus.
    The map is in default mode (bulk-failoverto-row) with bulk size and commit frequency = 1000.
    The audit details show the first 1000 rows selected on the source, with an error on both the source and target tables:
    Target--
    ORA-02049: timeout: distributed transaction waiting for lock
    Source--
    ORA-01002: fetch out of sequence ORA-02063: preceding line from INTERGRATION@JXNSQL01
    (INTERGRATION@JXNSQL01 is the dblink name)
    Any ideas on how I can clear this up?
    Thanks,
    Paul

    Hi,
    After having upgraded to 9.0.4 (from 9.0.3) I'm running into exactly the same problems with some of my mappings. Actually I don't get any rows transferred from the mappings that fail.
    Out of 7 mappings, 3 worked just liked before while the 4 others just keep on running until I cancel them and I then see the BUSY/ORA-02049 in the Audit Browser.
    When comparing the mappings I see that the 3 that works all use some custom Procedures I have made.
    The 4 that doesn't work are all very simple - one of them just loads all the content from a table with two columns in my source to another table with two columns in my target! Two of the other mappings that doesn't work includes some simple CASE-expressions.
    Both my source and my target resides in a Oracle 9.2.0.3 database (not the same).
    Regards,
    Bent Madsen

  • ORA-16607: one or more databases have failed

    Dear folks,
    we are trying to create a physical standby database using DGMGRL CLI .After the configuration is made and while enabling the configuration is made i get this error ORA-16607: one or more databases have failed.When i checked the alert log i get
    ORACLE Instance iasdb - Archival Error. Archiver continuing.
    ARCH: Connecting to console port...
    ARCH: Connecting to console port...
    Error 12514 received logging on to the standby
    Mon Sep 27 08:34:03 2010
    Errors in file /oracle1/admin/iasdb/bdump/iasdb_arc1_7516.trc:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    PING[ARC1]: Heartbeat failed to connect to standby '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=inuchn12.ind.rsa-ins.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=iasdb_XPT.ind.rsa-ins.com)(INSTANCE_NAME=iasdb)(SERVER=dedicated)))'. Error is 12514.
    Error 12514 received logging on to the standby
    Mon Sep 27 08:40:03 2010
    Errors in file /oracle1/admin/iasdb/bdump/iasdb_arc1_7516.trc:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    PING[ARC1]: Heartbeat failed to connect to standby '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=inuchn12.ind.rsa-ins.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=iasdb_XPT.ind.rsa-ins.com)(INSTANCE_NAME=iasdb)(SERVER=dedicated)))'. Error is 12514.
    Error 12514 received logging on to the standby
    Mon Sep 27 08:46:03 2010
    Errors in file /oracle1/admin/iasdb/bdump/iasdb_arc1_7516.trc:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    PING[ARC1]: Heartbeat failed to connect to standby '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=inuchn12.ind.rsa-ins.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=iasdb_XPT.ind.rsa-ins.com)(INSTANCE_NAME=iasdb)(SERVER=dedicated)))'. Error is 12514.
    My enviroinment:
    Database: Oracle 10g
    OS:Oracle solaris 10 SPARC
    Folk kindly help with this.Thanks in advance.
    Regards
    Prasanna.N

    Dear Prasanna.N,
    First of all, please see the following error code;
    Error 12514
    http://ora-12514.ora-code.com/
    ORA-12514:
    TNS:listener does not currently know of service requested in connect descriptor
    Cause: The listener received a request to establish a connection to a database or other service.
    The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener.
    This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
    Action:      
    - Wait a moment and try to connect a second time.
    - Check which services are currently known by the listener by executing: lsnrctl services <listener name>
    - Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.
    - If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.
    - Check for an event in the listener.log file.This is purely a connection problem and you can also use the +"tnsping"+ to see whether the Oracle can resolve the naming service or not. Use the naming service for the tnsping: iasdb_XPT.ind.rsa-ins.com
    Fix that problem and edit the tnsnames.ora file and see the results again. You may need to check the alert.log and the listener.log files for further informational messages.
    Hope That Helps.
    Ogan

  • ORA-00060 hrjptkfl.ldt, hrzatkfl.ldt  workers failed while uploading data

    Hi,
    I had a strange error while applying the NLS patch. I had two workers failed with ORA-00060 deadlock detected while waiting for a resource. for the two files.
    on the table HR_NAVIGATION_UNITS.
    The good thing is the individual requests which these two workers executing completed successfully.
    After searching a lot i could not find any thing relevant to it and just restarted the failed worker using adctrl. And the patch completed that phase. Wonder why thi happened.
    Any way this is not a question, any ideas are appreciated.
    Regards
    Taher

    Taher,
    And the patch completed that phase. Wonder why thi happened. If the patch completed successfully then there is nothing to worry about. Sometimes when doing the installation, the same error is reported in the installation log files, but as long as the installation complete successfully, then you can simply ignore those errors.
    Regards,
    Hussein

  • UTL_SMPT ORA-22288: file or LOB operation GETLENGTH failed No such file or

    Hello Everyone!
    I am trying to write a script to send emails as an attachment(exists in the unix box) using utl_smtp
    i have my reports in the directory : /opt/local/application/orafin/applmgr/out/outfaud. File existing in the directory is S1759.zip
    i have created a directory as:
    create or replace directory
    REPORT_DIRECTORY
    as
    '/opt/local/application/orafin/applmgr/out/outfaud';
    when i use BFILENAME as select BFILENAME('/oracle/oradata/bfiles', 'S1759.zip') from dual
    output: REPORT_DIRECTORY//S1759.zip
    my code is something like this
    v_bfile:= BFILENAME(p_oracle_directory, p_file_name);
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    Error: ORA-22288: file or LOB operation GETLENGTH failed
    No such file or directory
    Could anyone please help me as im really struggling to fix this. Thanks!

    Thank you for the response..
    v_bfile:= BFILENAME(p_oracle_directory, p_file_name);
    -- Get the size of the file to be attached
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    -- Calculate the number of pieces the file will be split up into
    v_pieces := TRUNC(v_file_length / v_amt);
    -- Calculate the remainder after dividing the file into v_amt chunks
    v_modulo := MOD(v_file_length, v_amt);
    IF (v_modulo <> 0) THEN
    -- Since the file does not devide equally
    -- we need to go round the loop an extra time to write the last
    -- few bytes - so add one to the loop counter.
    v_pieces := v_pieces + 1;
    END IF;
    DBMS_LOB.FILEOPEN(v_bfile, DBMS_LOB.FILE_READONLY);
    FOR i IN 1 .. v_pieces LOOP
    -- we can read at the beginning of the loop as we have already calculated
    -- how many iterations we will take and so do not need to check
    -- end of file inside the loop.
    v_buf := NULL;
    DBMS_LOB.READ(v_bfile, v_amt, v_file_pos, v_buf);
    v_file_pos := I * v_amt + 1;
    UTL_SMTP.WRITE_RAW_DATA(p_conn, UTL_ENCODE.BASE64_ENCODE(v_buf));
    END LOOP;
    END;
    DBMS_LOB.FILECLOSE(v_bfile);
    end_attachment(p_conn => p_conn);
    this is the existing code..so you which part of the code should i be replacing? im sorry im new to these concepts. thanks!

  • ORA-22288: file or LOB operation GETLENGTH failed

    I am using the following procedure for email the with attachment. it give the error, while I have check the directory rights is OK, also check the following thread
    Error Message is ORA-22288: file or LOB operation GETLENGTH failed
    but no result,
    I do this on clone working fine, but production not working fine while I found one thing that the file generate in temp folder of clone while in Production did not generate.
    CREATE OR REPLACE PROCEDURE APPS.mail_files (p_from_name VARCHAR2,
    p_to_name VARCHAR2,
    p_subject VARCHAR2,
    p_message VARCHAR2,
    p_oracle_directory VARCHAR2,
    p_binary_file VARCHAR2)
    IS
    -- Example procedure to send a mail with an in line attachment
    -- encoded in Base64
    -- this procedure uses the following nested functions:
    -- binary_attachment - calls:
    -- begin_attachment - calls:
    -- write_boundary
    -- write_mime_header
    -- end attachment - calls;
    -- write_boundary
    -- change the following line to refer to your mail server
    v_smtp_server VARCHAR2(1000) := 'mail.company.com';
    v_smtp_server_port NUMBER := 25;
    v_directory_name VARCHAR2(1000) ;
    v_file_name VARCHAR2(1000);
    v_mesg VARCHAR2(32767);
    v_conn UTL_SMTP.CONNECTION;
    PROCEDURE write_mime_header(p_conn in out nocopy utl_smtp.connection,
    p_name in varchar2,
    p_value in varchar2)
    IS
    BEGIN
    UTL_SMTP.WRITE_RAW_DATA(
    p_conn,
    UTL_RAW.CAST_TO_RAW( p_name || ': ' || p_value || UTL_TCP.CRLF)
    END write_mime_header;
    PROCEDURE write_boundary(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT false)
    IS
    BEGIN
    IF (p_last) THEN
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468--'||UTL_TCP.CRLF);
    ELSE
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468'||UTL_TCP.CRLF);
    END IF;
    END write_boundary;
    PROCEDURE end_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT TRUE)
    IS
    BEGIN
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    IF (p_last) THEN
    write_boundary(p_conn, p_last);
    END IF;
    END end_attachment;
    PROCEDURE begin_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_mime_type IN VARCHAR2 DEFAULT 'text/plain',
    p_inline IN BOOLEAN DEFAULT false,
    p_filename IN VARCHAR2 DEFAULT null,
    p_transfer_enc in VARCHAR2 DEFAULT null)
    IS
    BEGIN
    write_boundary(p_conn);
    IF (p_transfer_enc IS NOT NULL) THEN
    write_mime_header(p_conn, 'Content-Transfer-Encoding',p_transfer_enc);
    END IF;
    write_mime_header(p_conn, 'Content-Type', p_mime_type);
    IF (p_filename IS NOT NULL) THEN
    IF (p_inline) THEN
    write_mime_header(
    p_conn,
    'Content-Disposition', 'inline; filename="' || p_filename || '"'
    ELSE
    write_mime_header(
    p_conn,
    'Content-Disposition', 'attachment; filename="' || p_filename || '"'
    END IF;
    END IF;
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    END begin_attachment;
    PROCEDURE binary_attachment(p_conn IN OUT UTL_SMTP.CONNECTION,
    p_file_name IN VARCHAR2,
    p_mime_type in VARCHAR2)
    IS
    c_max_line_width CONSTANT PLS_INTEGER DEFAULT 54;
    v_amt BINARY_INTEGER := 672 * 3; /* ensures proper format; 2016 */
    v_bfile BFILE;
    v_file_length PLS_INTEGER;
    v_buf RAW(2100);
    v_modulo PLS_INTEGER;
    v_pieces PLS_INTEGER;
    v_file_pos pls_integer := 1;
    BEGIN
    begin_attachment(
    p_conn => p_conn,
    p_mime_type => p_mime_type,
    p_inline => TRUE,
    p_filename => p_file_name,
    p_transfer_enc => 'base64');
    BEGIN
    v_bfile := BFILENAME(p_oracle_directory, p_file_name);
    -- Get the size of the file to be attached
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    -- Calculate the number of pieces the file will be split up into
    v_pieces := TRUNC(v_file_length / v_amt);
    -- Calculate the remainder after dividing the file into v_amt chunks
    v_modulo := MOD(v_file_length, v_amt);
    IF (v_modulo <> 0) THEN
    -- Since the file does not devide equally
    -- we need to go round the loop an extra time to write the last
    -- few bytes - so add one to the loop counter.
    v_pieces := v_pieces + 1;
    END IF;
    DBMS_LOB.FILEOPEN(v_bfile, DBMS_LOB.FILE_READONLY);
    FOR i IN 1 .. v_pieces LOOP
    -- we can read at the beginning of the loop as we have already calculated
    -- how many iterations we will take and so do not need to check
    -- end of file inside the loop.
    v_buf := NULL;
    DBMS_LOB.READ(v_bfile, v_amt, v_file_pos, v_buf);
    v_file_pos := I * v_amt + 1;
    UTL_SMTP.WRITE_RAW_DATA(p_conn, UTL_ENCODE.BASE64_ENCODE(v_buf));
    END LOOP;
    END;
    DBMS_LOB.FILECLOSE(v_bfile);
    end_attachment(p_conn => p_conn);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    end_attachment(p_conn => p_conn);
    DBMS_LOB.FILECLOSE(v_bfile);
    END binary_attachment;
    -- Main Routine
    BEGIN
    -- Connect and set up header information:
    v_conn:= UTL_SMTP.OPEN_CONNECTION( v_smtp_server, v_smtp_server_port );
    UTL_SMTP.HELO( v_conn, v_smtp_server );
    UTL_SMTP.MAIL( v_conn, p_from_name );
    UTL_SMTP.RCPT( v_conn, p_to_name );
    UTL_SMTP.OPEN_DATA ( v_conn );
    UTL_SMTP.WRITE_DATA(v_conn, 'Subject: '||p_subject||UTL_TCP.CRLF);
    v_mesg:= 'Content-Transfer-Encoding: 7bit' || UTL_TCP.CRLF ||
    'Content-Type: multipart/mixed;boundary="DMW.Boundary.605592468"' || UTL_TCP.CRLF ||
    'Mime-Version: 1.0' || UTL_TCP.CRLF ||
    '--DMW.Boundary.605592468' || UTL_TCP.CRLF ||
    'Content-Transfer-Encoding: binary'||UTL_TCP.CRLF||
    'Content-Type: text/plain' ||UTL_TCP.CRLF ||
    UTL_TCP.CRLF || p_message || UTL_TCP.CRLF ;
    UTL_SMTP.write_data(v_conn, 'To: ' || p_to_name || UTL_TCP.crlf);
    UTL_SMTP.WRITE_RAW_DATA ( v_conn, UTL_RAW.CAST_TO_RAW(v_mesg) );
    -- Add the Attachment
    binary_attachment(
    p_conn => v_conn,
    p_file_name => p_binary_file,
    -- Modify the mime type at the beginning of this line depending
    -- on the type of file being loaded.
    p_mime_type => 'text/plain; name="'||p_binary_file||'"'
    -- Send the email
    UTL_SMTP.CLOSE_DATA( v_conn );
    UTL_SMTP.QUIT( v_conn );
    END;
    Error
    ORA-22288: file or LOB operation GETLENGTH failed
    No such file or directory
    ORA-06512: at "SYS.DBMS_LOB", line 678
    ORA-06512: at "APPS.MAIL_FILES", line 122
    ORA-06512: at "APPS.MAIL_FILES", line 179
    ORA-06512: at line 2

    CREATE OR REPLACE PROCEDURE APPS.mail_files (p_from_name VARCHAR2,
    p_to_name VARCHAR2,
    p_subject VARCHAR2,
    p_message VARCHAR2,
    p_oracle_directory VARCHAR2,
    p_binary_file VARCHAR2)
    IS
    -- Example procedure to send a mail with an in line attachment
    -- encoded in Base64
    -- this procedure uses the following nested functions:
    -- binary_attachment - calls:
    -- begin_attachment - calls:
    -- write_boundary
    -- write_mime_header
    -- end attachment - calls;
    -- write_boundary
    -- change the following line to refer to your mail server
    v_smtp_server VARCHAR2(1000) := 'mail.company.com';
    v_smtp_server_port NUMBER := 25;
    v_directory_name VARCHAR2(1000);
    v_file_name VARCHAR2(1000);
    v_mesg VARCHAR2(32767);
    v_conn UTL_SMTP.CONNECTION;
    PROCEDURE write_mime_header(p_conn in out nocopy utl_smtp.connection,
    p_name in varchar2,
    p_value in varchar2)
    IS
    BEGIN
    UTL_SMTP.WRITE_RAW_DATA(
    p_conn,
    UTL_RAW.CAST_TO_RAW( p_name || ': ' || p_value || UTL_TCP.CRLF)
    END write_mime_header;
    PROCEDURE write_boundary(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT false)
    IS
    BEGIN
    IF (p_last) THEN
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468--'||UTL_TCP.CRLF);
    ELSE
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468'||UTL_TCP.CRLF);
    END IF;
    END write_boundary;
    PROCEDURE end_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT TRUE)
    IS
    BEGIN
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    IF (p_last) THEN
    write_boundary(p_conn, p_last);
    END IF;
    END end_attachment;
    PROCEDURE begin_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_mime_type IN VARCHAR2 DEFAULT 'text/plain',
    p_inline IN BOOLEAN DEFAULT false,
    p_filename IN VARCHAR2 DEFAULT null,
    p_transfer_enc in VARCHAR2 DEFAULT null)
    IS
    BEGIN
    write_boundary(p_conn);
    IF (p_transfer_enc IS NOT NULL) THEN
    write_mime_header(p_conn, 'Content-Transfer-Encoding',p_transfer_enc);
    END IF;
    write_mime_header(p_conn, 'Content-Type', p_mime_type);
    IF (p_filename IS NOT NULL) THEN
    IF (p_inline) THEN
    write_mime_header(
    p_conn,
    'Content-Disposition', 'inline; filename="' || p_filename || '"'
    ELSE
    write_mime_header(
    p_conn,
    'Content-Disposition', 'attachment; filename="' || p_filename || '"'
    END IF;
    END IF;
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    END begin_attachment;
    PROCEDURE binary_attachment(p_conn IN OUT UTL_SMTP.CONNECTION,
    p_file_name IN VARCHAR2,
    p_mime_type in VARCHAR2)
    IS
    c_max_line_width CONSTANT PLS_INTEGER DEFAULT 54;
    v_amt BINARY_INTEGER := 672 * 3; /* ensures proper format; 2016 */
    v_bfile BFILE;
    v_file_length PLS_INTEGER;
    v_buf RAW(2100);
    v_modulo PLS_INTEGER;
    v_pieces PLS_INTEGER;
    v_file_pos pls_integer := 1;
    BEGIN
    begin_attachment(
    p_conn => p_conn,
    p_mime_type => p_mime_type,
    p_inline => TRUE,
    p_filename => p_file_name,
    p_transfer_enc => 'base64');
    BEGIN
    v_bfile := BFILENAME(p_oracle_directory, p_file_name);
    -- Get the size of the file to be attached
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    -- Calculate the number of pieces the file will be split up into
    v_pieces := TRUNC(v_file_length / v_amt);
    -- Calculate the remainder after dividing the file into v_amt chunks
    v_modulo := MOD(v_file_length, v_amt);
    IF (v_modulo <> 0) THEN
    -- Since the file does not devide equally
    -- we need to go round the loop an extra time to write the last
    -- few bytes - so add one to the loop counter.
    v_pieces := v_pieces + 1;
    END IF;
    DBMS_LOB.FILEOPEN(v_bfile, DBMS_LOB.FILE_READONLY);
    FOR i IN 1 .. v_pieces LOOP
    -- we can read at the beginning of the loop as we have already calculated
    -- how many iterations we will take and so do not need to check
    -- end of file inside the loop.
    v_buf := NULL;
    DBMS_LOB.READ(v_bfile, v_amt, v_file_pos, v_buf);
    v_file_pos := I * v_amt + 1;
    UTL_SMTP.WRITE_RAW_DATA(p_conn, UTL_ENCODE.BASE64_ENCODE(v_buf));
    END LOOP;
    END;
    DBMS_LOB.FILECLOSE(v_bfile);
    end_attachment(p_conn => p_conn);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    end_attachment(p_conn => p_conn);
    DBMS_LOB.FILECLOSE(v_bfile);
    END binary_attachment;
    -- Main Routine
    BEGIN
    -- Connect and set up header information:
    v_conn:= UTL_SMTP.OPEN_CONNECTION( v_smtp_server, v_smtp_server_port );
    UTL_SMTP.HELO( v_conn, v_smtp_server );
    UTL_SMTP.MAIL( v_conn, p_from_name );
    UTL_SMTP.RCPT( v_conn, p_to_name );
    UTL_SMTP.OPEN_DATA ( v_conn );
    UTL_SMTP.WRITE_DATA(v_conn, 'Subject: '||p_subject||UTL_TCP.CRLF);
    v_mesg:= 'Content-Transfer-Encoding: 7bit' || UTL_TCP.CRLF ||
    'Content-Type: multipart/mixed;boundary="DMW.Boundary.605592468"' || UTL_TCP.CRLF ||
    'Mime-Version: 1.0' || UTL_TCP.CRLF ||
    '--DMW.Boundary.605592468' || UTL_TCP.CRLF ||
    'Content-Transfer-Encoding: binary'||UTL_TCP.CRLF||
    'Content-Type: text/plain' ||UTL_TCP.CRLF ||
    UTL_TCP.CRLF || p_message || UTL_TCP.CRLF ;
    UTL_SMTP.write_data(v_conn, 'To: ' || p_to_name || UTL_TCP.crlf);
    UTL_SMTP.WRITE_RAW_DATA ( v_conn, UTL_RAW.CAST_TO_RAW(v_mesg) );
    -- Add the Attachment
    binary_attachment(
    p_conn => v_conn,
    p_file_name => p_binary_file,
    -- Modify the mime type at the beginning of this line depending
    -- on the type of file being loaded.
    p_mime_type => 'text/plain; name="'||p_binary_file||'"'
    -- Send the email
    UTL_SMTP.CLOSE_DATA( v_conn );
    UTL_SMTP.QUIT( v_conn );
    END;
    Edited by: user12879396 on Oct 22, 2012 10:39 AM

Maybe you are looking for

  • How to use cumulative Value in a formula

    Hello Gurus, I would like to use the cumulative value in a query as part of a formula calculation. I have created a KF which is assigned a constant value 1. When displaying the KF I am cumulating it so for each row I am getting 1,2,3,4...etc. How can

  • Reminders share calendar outlook 2010

    My environment is as follows: Two mailboxes of exchange 2010 mailbox 1 mailbox 2 I am sharing the calendar from Outlook 2010 mailbox 1 I have delegated permissions on the calendar to the mailbox 2 User 1 can see the calendar of the mailbox 2 The prob

  • Best way to import all objects into work repository located on a new master respository

    Hi, We have two separate master repositories, one for all development work repositories (Development, ST, UAT, IAT), and one for Production. What would be the best approach to export and import all objects from the Dev Repository into the Prod Work R

  • Keychain syncing between two computers

    I'm not sure where this post belongs as the issues seems to span different aspects of my computers. Originally I thought it was a mobileme issue but support was unable to help and over the last year I've tried many internet searches and asked many pe

  • Shared music problems

    Many shared music libraries give me this error when I try to access them: "The shared music library ~[x]~ is not accessible for an unknown reason. (-3259) Check that any firewall software running on either the shared computer or this computer has bee