ORA-00164: Why???

I get an ORA-00164 error message in this case:
A PL-SQL program update DB1 with data selected in DB2 through a DB-LINK.
For each data set, it does a commit or rollback depending on success or error and tries to log this information in a table of DB1 using a procedure with AUTONOMOUS_TRANSACTION PRAGMA.
When it enters in this function, it gets this message. Since It DOESN'T write in DB2, there should not be a distributed transaction, and there is no distributed query in this code.
I know I could turn around this by commiting/rollbacking around the log code, but this is not clean.
Can someone help?
Thanks.

As far as Oracle is concerned you are moving data across a database link, so it considers this situation a distributed transaction.
Your alternative is to upgrade to 9.2 which (I believe) does support AUTONOMOUS TRANSACTION PRAGMA across db links.
Cheers, APC

Similar Messages

  • ORA-00164

    Hello
    I'm getting an "ORA-00164 distributed autonomous transaction disallowed within migratable distributed transaction" from the following section of a query...
    SELECT
            BL.billing_list_id,
            P.group_id,
         bl.bill_date,
         f_billing_get_bill_no(     BL.billing_list_id,
                          f_css_unique_id('INVOICE_ID',1),
              Bl.bill_term_dt,
              'B',
              BL.billing_list_ps_flag,
              PP.first_payment_flag,
              PP.method
              ) AS bill_no
    ...The f_billing_get_bill_no, and f_css_unique_id functions are both set to use autonomous transactions and both commit their work before returning, but I still get this error. None of the tables are remote, and unless I get rid of the f_css_unique_id call, I get this error.
    I've looked up the error text and it just says:
    Cause: A request was made by the application to start a distributed autonomous transaction when the application was in a migratable distributed transaction.
    Action: Roll back or commit the current distributed transaction first.
    The thing I don't understand is what a migratable transaction is and why this error is occurring when I've issued the relevant commits. Any ideas?
    David

    It seems that you cannot start another autonomous transaction when the application is already within an autonomous transactionUmm, up to a point Lord Copper.
    SQL> CREATE OR REPLACE FUNCTION f1 RETURN NUMBER AS
      2      PRAGMA autonomous_transaction;
      3  BEGIN
      4         UPDATE dept set deptno=deptno*1;
      5         COMMIT;
      6      RETURN 1;
      7  END f1;
      8  /
    Function created.
    SQL>
    SQL> CREATE OR REPLACE FUNCTION f2 RETURN NUMBER AS
      2      PRAGMA autonomous_transaction;
      3   n NUMBER;
      4  BEGIN
      5      UPDATE bonus set comm=comm*1;
      6   n := f1;
      7     COMMIT;
      8     RETURN n;
      9  END f2;
    10  /
    Function created.
    SQL> VAR x NUMBER
    SQL> BEGIN
      2    :x := f2;
      3  END;
      4  /
    PL/SQL procedure successfully completed.
    SQL> PRINT x
             X
             1
    SQL> Perhaps this is a version thang. The above was run on 9iR2. I know there were some issues with AUTONOMOUS_TRANSACTION and distributed calls in 8i, but you say your transaction isn't distributed. Could it be a bug?
    Cheers, APC

  • ORA-00164 Autonomous and Distributed Transactions in Oracle 8i - Forms6i

    Hi, in Forms6i I'm using Autonomous transactions (insert and update), and I want to use also a database link to make a query in a remote database (Distributed transaction). Even when this request are done in different PL/SQL within Forms6i, I get the error message ORA-00164 Distributed transactions disallowed within autonomous transactions. Is there a way to avoid this error message?
    Thanx

    Hello,
    I had a similar Problem, when I tried to log errormessages while selecting by db-link.
    I use pipes now to send the errormessages. The pipe is read at regular intervals and then I can Insert without using autonomous transactions.
    I hope, this will help you
    Marcus

  • ORA-00164 Error

    I am trying to execute a insert into a table A (located on a remote database) and has a trigger on it which logs on messages using autonomous transactions in the remote messages table.
    Remote database 9.2.x.x.x
    Current database 9.0.x.x.x
    The operation is done using the db link.
    insert into tableA@remote values (1, 'a') ;
    I am getting an error ORA-00164
    Is there any way to resolve this error/problem.
    Thanks
    Sanjay

    You are correct,
    Before 9.2 Oracle doesn't support Autonomous Transactions within a Distributed Transaction. As of version 9.2.0 of Oracle9i, this limitation has been removed to a limited extent.
    Check this article,
    Autonomous and Distributed Transactions in Oracle 8i/9i

  • Ora-00164 with generic connectivity

    Hello:
    I have an Oracle 9iR2 database over linux RHAS 2.1 and try to replicate data to an informix server. For that purpose i have another oracle 9i over windows 2000 (brige) to make the replication using database triggers on tables in the Ora9i windows database. When i make transactions directly on the windows database, the data is replicated without problems to the informix server, but when i make the transactions on the linux database to the tables on the windows database via dblink the ora-00164 fires. I use autonomous-transaction on the triggers over the windows databse to make the replication.
    Is there any way to overcome this problem??????
    Any other alternative to make the replication work will be helpful.
    Thanks
    Andrés Wong

    I tried this and get the same error message.
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    NCRO: Failed to make RSLV connection
    ORA-02063: preceding 2 lines from ALPACWOBF
    listener.ora:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = spruce)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = alpacwobf)
    (ORACLE_HOME = C:\oracle\ora92)
    (PROGRAM = hsodbc)
    tnsnames.ora
    alpacwobf.3LOG.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SPRUCE)(PORT = 1521))
    (CONNECT_DATA =
    (SID_NAME = alpacwobf)
    (HS=ok)
    initalpacwobf.ora:
    HS_FDS_CONNECT_INFO = AlpacWOBF
    HS_FDS_TRACE_LEVEL = 4
    HS_FDS_TRACE_FILE_NAME = alpacwobf.log
    ODBC setting is ok. odbc name is alpacwobf, db is access 2000.
    restart the listener.
    tnsping alpacwobf is ok.
    database link creating is ok.
    but when query,I got error.
    alpac > create database link alpacwobf using 'alpacwobf';
    Database link created.
    alpac > select count(*) from test@alpacwobf;
    select count(*) from test@alpacwobf
    ERROR at line 1:
    ORA-28545: error diagnosed by Net8 when connecting to an agent
    NCRO: Failed to make RSLV connection
    ORA-02063: preceding 2 lines from ALPACWOBF
    Any help will be appreciated.
    Thanks a lot.
    Richard

  • ORA-00164 but I cant find an autonomous transaktion

    Hello,
    I have the following statement
    SQL> create table tab2 as
    2 select * from tab1@dblink;
    and get the error
    select * from tab1@dblink
    ERROR at line 2:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00164: autonomous transaction disallowed within distributed transaction
    where is the autonomous transaktion??
    when the table exists and I do an 'insert into select' by dblink it works
    The same statement worked before and I don't know about any changes in the db-parameters.
    We work with 8.1.7
    Thank you for any help

    Thanks for the answer,
    but I found out, that our DBA had installed a BigBrother package, because sometimes tables got 'lost' without anybody knowing anything. Started by a logon Trigger it used autonomous transaktions to write the log.
    Now it runs with simple transactions and the error is gone.
    Marcus

  • ORA-00164: autonomous transaction disallowed within distributed transaction

    I have been trying to solve this problem for weeks now, I have posted this question everywhere I can think of, but I havent really received and answer that has helped, so now I am going to post it here hoping for an answer.
    We are running 9iAS on Solaris and when the following stuff is run we are getting ORA-00164 errors. If you refresh the page a bunch of time the problem goes away. But it comes back the next time you try to execute the procedure again. Here are the cases when the problem shows up.
    Editing the style:
    PROCEDURE : PORTAL30.wwpob_app_style.edit_style
    Saving changes to the banner for a page
    PROCEDURE : PORTAL30.wwptl_banner.savecustom
    Logging out
    PROCEDURE : PORTAL30.wwsec_app_priv.logout
    After setting the default user group and applying the changes:
    PROCEDURE : PORTAL30.wwsec_app_user_mgr.edit_user
    Creating a new group:
    PROCEDURE : PORTAL30.wwsec_app_group_mgr.create_group
    Opening the add portlet screen:
    PROCEDURE : PORTAL30.wwv_main.main
    There are a few other places but I don't have them documented. In ALL cases the problem goes away once we start and stop the Apache using the following comands:
    /app/oracle/n_portal/Apache/Apache/bin/apachectl stop
    ps -ef | grep httpd | grep n_portal
    /app/oracle/n_portal/Apache/Apache/bin/apachectl start
    After starting and stopping Apache the problem is gone for a little while (20-30 mins) then it starts coming back slowly (sometimes the problem is there then it is not). Once the problem is back if you continually press refresh on the browser (5-10 times) the page might appear, if the page does not appear you will see the
    ORA-00164: autonomous transaction disallowed within distributed transaction
    The following error appears in apache log (50% of the time) when Autonomous Transaction error shows up on the screen:-
    DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = 5225534324468880950975536484
    215 PortalSession id = 521335001720MERAJ
    DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = -638034231325135430097553725
    8001 PortalSession id = 992335001711JDALGLIESH
    These errors might be related to dynamic services but we were had the problem long before Dynamic services was installed.
    We want to start pre-production user testing as we have just had 11 developers building portlets for the company, but we cant do much with this error popping up every time a user wants to test it. We have one of the Oracle consultants here and he has asked the oracle developer group what the problem could be, and they seem to think it might be related to our use of DB links however, we never get the problem when we try to run a portlet that uses a database link.
    Please help.
    Jeff Dalgliesh
    null

    Jay,
    My name is Craig McCauley. I'm an Oracle Technical Manager working onsite at Unocal Indonesia. I'm with the Portal group in ATS.
    When I got here the first thing we did was bump up init.ora parameters and apache confif parameters as suggested by the iPlatform group. We have thes sessions parameter (in init.ora) bumped up from 100 to 700. I'm watching v$session and the get these AT messages with as few as 70 total db sessions. Any help your group can give will be greatly appreciated.
    Unocal is planning on implementing Oracle Portal globally - as a common interface. They have similar installs in Thailand and Houston and thus far have not seen the AT messages (although there has not been much development going on at those sites).
    Thanks,
    Craig

  • ORA-00164 Autonomous Transactions in Distributed Env

    Hi,
    We are on 8.1.7 on AIX. We get ORA-00164 when we attempt to call an Autonomous transaction procedure whilst the main transaction has read a remote table.
    In 8.1.6.0.0 this used to check us out with Ora-600, In 8.1.7 it gives error 164. I have read some postings stating that this limitation is expected to be fixed in Oracle server 8.2 or Oracle 9i Release 2.
    Can somebody confirm this,
    BTW what would 9i Release 2 mean - 9.2 or 9.0.2 ?
    Also, is 8.2 out?
    null

    Is this question specific to Oracle9iAS Portal?

  • ORA-00164 Autonomous transaction when creating batch of users

    Hi,
    I ran the script posted earlier in this forum to create a batch of users, I got some errors, support people told me that is appears to be database errors :
    ORA-00164 Autonomous transaction disallowed with distributed transaction.
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL30.WWCTX_SSO", line 669 ORA-06502: PL/SQL: numeric or value error.
    We use 8.1.7.2 database, Portal 3.0.9.8.
    Anyone having a solution for that problem, I don't want to create 250 users manually.
    Thank's

    i'm getting the same thing, but i'm using hardcoded input,
    so i have no dblinks or anything of the sort.
    this is my entire exception line:
    ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", line 323 ORA-06512: at "SYS.HTP", line 859 ORA-06512: at "SYS.HTP", line 974 ORA-06512: at "SYS.HTP", line 992 ORA-06512: at "SYS.HTP", line 40 ORA-06512: at "PORTAL30_SSO.WWSEC_UI", line 568 ORA-06512: at "PORTAL30_SSO.WWSSO_APP_USER_MGR", line 576 ORA-06512: at line 1
    any idea what is causing this?

  • ORA-06508,ORA-06512, why I should re-connect and after that it runs well?

    I have 2 package.
    package A depends on B.
    I call the package A in c++ code. At the begining, all work well.
    I compile package B successfully.
    But when I call package A in c++ code using a existing connection to the oracle, I get
    ORA-06508: PL/SQL:
    ORA-06512: 在 "PARTY.PKG_TRANSACTION", line 102
    ORA-06512: 在 "PARTY.PKG_CFMMC", line 1186
    when I kill this session in database server side and re-connect to the database, it runs well.
    what is wrong, why I should re-connect and then it runs well, and in the mean time, it does raise errors above if I use the old connection?

    It appears sometimes. But sometimes it does not appear.
    you can create 2 package.
    package a, package b.
    A depends on b.
    You can call the package A in the client side using c++ code.
    then compile the b(do not change and code of b, just recompile it) successfully.
    If you are lucky you can see the errors.

  • ORA-01006   -  why?

    I have some problems with my reports.
    <dataTrigger name="beforeReport" source="UC_ANALITIC_REPORT.SALES (:DAT1, :DAT1)"/>
    I'm called my procedure with one variable and i have error message:
    Error
    The report cannot be rendered because of an error, please contact the administrator.
    Error Detail
    ORA-01006: bind variable does not exist
    But I called my procedure with two variables this error is not reproduced
    <dataTrigger name="beforeReport" source="UC_ANALITIC_REPORT.SALES (:DAT1, :DAT2)"/>
    It's OK!
    This does not approach - user must enter only one parameter!!!
    I tried create parametrs is hidden (Parameter Type = Hidden), but I do not know as this variable assign importance equal = :DAT1.
    This is my package:
    CREATE OR REPLACE
    PACKAGE uc_analitic_report
    IS
    DAT1 date;
    DAT2 date;
    FUNCTION SALES( rep_start IN DATE, rep_end IN DATE) RETURN BOOLEAN;
    END;
    Hope you understood my english. :)
    Help my please.

    I need your help

  • 8i on Win2K - always disconnects with ORA-01092- why??

    I have installed ORACLE 8i, Designer and Tutorial on my Win2000 PC. All installed successfully, & I used them for a day. Overnight a power cut caused abnormal shutdown, & now I cannot connect to anything! I get "ORA-01092 - Oracle instance terminated. Disconnection forced". I have stopped and restarted the oracle service, checked the Net8 config which looks OK to my (non DBA) eye. Any help would be appreciated!

    Thanks, but I have solved my problem. Found a log file that was looking for a redo log named "--". Eventually tracked down my init.ora where I had carefully commented my changes with "--" instead of "#". I told you I wasn't a DBA!!

  • ORA-01578, Why are they so frequent?

    I'm having a problem on my server. I have been running some tests for the last few months. A week ago I got my first ORA-01578 errors. Since then I have gotten it maybe 10 times, before the I got non. I'm basically doing the same thing as I did before I started getting them.
    So my question is:
    a) What is causing this error, or rather what is causing the data blocks to become corrupted?
    b) What can I do to prevent it from happening?
    What have I tried so far:
    * I deleted all the data and data structure and started over from the beginning.
    * I created a new tablespace with new data files.

    What is reason "select * from" is working and sort or function against table not working ?I am getting more corrupt errror now
    Reread of rdba: 0x01438d16 (file 5, block 232726) found same corrupted data
    Mon Aug 27 16:13:12 2007
    Thread 1 advanced to log sequence 13013
    Current log# 5 seq# 13013 mem# 0: /redo5/datafiles/redo5.log
    Corrupt block relative dba: 0x00800bc5 (file 2, block 3013)
    Bad check value found during user buffer read
    Data in bad block -
    type: 6 format: 2 rdba: 0x00800bc5
    last change scn: 0x0015.d8908da3 seq: 0x2 flg: 0x04
    consistency value in tail: 0x8da30602
    check value in block header: 0xd892, computed block checksum: 0x2000
    spare1: 0x0, spare2: 0x0, spare3: 0x0
    Reread of rdba: 0x00800bc5 (file 2, block 3013) found same corrupted data

  • Why can't re-install the Oracle 9i AS in the last intalled LINUX ??

    In my host , it is redhat 8 OS . In the last time , it has be installed the oracle 9i AS in the /opt/oracle/product/9.0.2 and I use the oracle-installer program to un-install pre-installing AS. Now , I want to re-install the AS to other $ORACLE_HOME directory , but the process of installing put the error message of following and I can’t re-install the AS:Install has detected an invalid Active EMD Home. Configured as /opt/oracle/product/9.0.2Passsible cause for this error may be a previous installaiton of oracle9i AS that ……I has deleted the /opt/oracle/product/9.0.2/* and /etc/ora* file , why has prompt the error message?Plesase get me a help for re-install the Oracle 9i AS. Very thinks for answer my question !!

    remove /etc/emtab

  • ORA-02041: client database did not begin a transaction

    Hello All,
    I am making calls from oracle 8i to oracle 9i.
    First i am inserting values from 8i into a table in 9i.
    secondly i am calling a procedure to send mail which again is in 9i database.
    If i run the query ..the mail is sent...
    if i run it for the second time i get this error
    ORA-00164: autonomous transaction disallowed within distributed transaction
    ORA-02041: client database did not begin a transaction
    If i run it again...The mail is sent...
    For every odd transaction the mail is sent and for every even transaction i get this error...Please advice me if you have any tips how i can resolve this..
    Thanks,
    AK

    It is maybe not exaclty the same situation but this thread may help you:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:16455356983632477090::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:362818006460

Maybe you are looking for

  • Customer Statement Report

    Hi All, When running customer statement report in AR its not displaying any data.Instead of that showing blank output. As per the report parameters it must be shown output datas. If anyone give a solution to view output data in Customer Statement rep

  • Change the tab color

    Hi, i'm unable to change the tab color of panelTabbed item, i've tried the following in a css sheet: af|panelTabbed::tab:selected { font-style:italic; background-image: url("../Images/section_label_body.jpg"); border-bottom-color: red; border-color:

  • HT3275 I keep getting a message that says, The backup disk image "/Volumes/Data-1/iMac.sparsebundle" could not be created (error 60).

    I keep getting a message when trying to back up my main computer = 'The backup disk image "/Volumes/Data-1/CMN iMac.sparsebundle" could not be created (error 60).' The error message changes sometimes to other numbers but it is not able to back anythi

  • Table Data Provider

    Hi, I am trying to manually fill a table component from a ResultSet. My question is : what Table Data Provider to use ? If you have a look to this adress : http://developers.sun.com/prodtech/javatools/jscreator/reference/fi/2/data-providers.html you

  • I need a new claim code for my HP DJ 3054A

    I have a HP DeskJet 3054A printer that I bought gently used. While I have used this for a while I have been using it as wired. I have printed several instuctions to no avail. Please help as the intructions are not clear to me for this printer. TIA.