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

Similar Messages

  • 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: 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

  • 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-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

  • Ora 164

    Hi ,
    I have following code to insert into remote table and used autonomous transaction like below. When it called from java (XA datasource) getting followoing error - ora 164
    ORA-00164: distributed autonomous transaction disallowed within migratable distributed transaction
    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.
    My code is like belwo
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    --INSERT LOB VALUE
    INSERT INTO local_work_table (MSG_TYPE_T,APPL_N,MSG_I,XML_DATA_T,STAT_C,CRTE_D,CRTE_USER_I)
    VALUES (msg_type_in,app_name_in,msg_id_in,l_v_version||xml_msg_in,'N',sysdate,USER)
    RETURNING ROWID
    INTO l_r_rowid;
    INSERT INTO Table_remote (MSG_TYPE,APP_NAME,MSG_ID,XML_DATA,STATUS,CREATE_DT,CREATED_BY)
    SELECT MSG_TYPE_T,APPL_N,MSG_I,XML_DATA_T,STAT_C,CRTE_D,CRTE_USER_I FROM DSTB_MSG_OUT_W
    WHERE ROWID=l_r_rowid;
    DELETE FROM local_work_table ;
    commit;
    end;
    Table_remote is remote DB insertion using DB link.
    Thanks,
    Sujeeth

    Hi,
    The problem is the XA datasource.
    Most often this is used by default, without thinking about the necessity and caveeats.
    Does your application make use of that XA datasource, else get rid of it.
    If it does, you may wanna look into
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_xa.htm#sthref1881
    Regards
    Peter

  • Unable to get Portal User in a Remote DB

    Hello,
    We are developing an application with Portal on Instance A and the application tables on Instance B. We have DB triggers on the application tables in B and would like to capture the Portal USER using wwctx_api.get_user. Have created a DB link and PUBLIC SYNONYM in B to access the package in A. However, when we call the function in B, we get the following error -
    ORA-00164: autonomous transaction disallowed within distributed transaction.
    Has anyone tried something similar?
    Thanks.

    Hi,
    If you submit your form to a procedure in the portal instance you can get the portal user inside of this procedure.
    you can then send this value to the table in the other instance.
    Regards
    Michael

  • Autonomous transaction in Tuxedo

    Our development team is using Bea Tuxedo as a middle tier in our transactions...we encountered a problem in using PRAGMA AUTONOMOUS_TRANSACTION in one of our services, 'ORA-00164: autonomous transaction disallowed within distributed transaction...'
    of course my question would be... what is the solution to this? or is there a solution to this?
    would really appreaciate if you could lend me a hand with this problem.

    CREATE TABLE GOKHAN_DENEME (EMPNO NUMBER(4) NOT NULL,
    ENAME VARCHAR2(10),
    EJOB VARCHAR2(9),
    DEPTNO NUMBER(2));
    INSERT INTO GOKHAN_DENEME VALUES (7369, 'SMITH', 'CLERK', 20);
    INSERT INTO GOKHAN_DENEME VALUES (7499, 'ALLEN', 'SALESMAN', 30);
    INSERT INTO GOKHAN_DENEME VALUES (7521, 'WARD', 'SALESMAN', 30);
    INSERT INTO GOKHAN_DENEME VALUES (7566, 'JONES', 'MANAGER', 20);
    CREATE TABLE GOKHAN_DENEME_2 (MGR NUMBER(4) NOT NULL,
    COMM NUMBER(7, 2));
    INSERT INTO GOKHAN_DENEME_2 VALUES (7369, 20);
    INSERT INTO GOKHAN_DENEME_2 VALUES (7499, 30);
    INSERT INTO GOKHAN_DENEME_2 VALUES (7521, 30);
    INSERT INTO GOKHAN_DENEME_2 VALUES (7566, 20);
    create or replace
    TRIGGER GOKHAN_DENEME_TRG1
    AFTER DELETE ON GOKHAN_DENEME FOR EACH ROW
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    RAISE_APPLICATION_ERROR(-20000, 'ERRORRRRRR');
    END;
    create or replace
    TRIGGER GOKHAN_DENEME_2_TRG1
    AFTER DELETE ON GOKHAN_DENEME_2 FOR EACH ROW
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    DELETE FROM GOKHAN_DENEME WHERE EMPNO = :OLD.MGR;
    COMMIT;
    END;
    the delete statement is:
    DELETE FROM GOKHAN_DENEME_2 WHERE MGR = 7566;
    the error mesage is:
    Error starting at line 74 in command:
    DELETE FROM GOKHAN_DENEME_2 WHERE MGR = 7566
    Error report:
    SQL Error: ORA-20000: ERRORRRRRR
    ORA-06512: at "DBO.GOKHAN_DENEME_TRG1", line 49
    ORA-04088: error during execution of trigger 'DBO.GOKHAN_DENEME_TRG1'
    ORA-06512: at "DBO.GOKHAN_DENEME_2_TRG1", line 10
    ORA-04088: error during execution of trigger 'DBO.GOKHAN_DENEME_2_TRG1'
    20000. 00000 - "%s"
    *Cause:    The stored procedure 'raise_application_error'
    was called which causes this error to be generated.
    *Action:   Correct the problem as described in the error message or contact
    the application administrator or DBA for more information.

  • What logging implementation for distributed transaction on Oracle 8?

    Hi,
    I have a script running on Oracle 8 that accesses remote databases. I would like to create a transaction log that creates log entries in another table as the script progresses. I initially tried creating a logging procedure that used PRAGMA AUTONOMOUS_TRANSACTION but this failed because of this error message:
    ORA-00164: autonomous transaction disallowed within distributed transaction
    I can't set the transaction to read only as database updates are part of the script.
    Is there another strategy that I could use to create the logs I need?
    Cheers,
    kj

    Hi,
    I have a script running on Oracle 8 that accesses remote databases. I would like to create a transaction log that creates log entries in another table as the script progresses. I initially tried creating a logging procedure that used PRAGMA AUTONOMOUS_TRANSACTION but this failed because of this error message:
    ORA-00164: autonomous transaction disallowed within distributed transaction
    I can't set the transaction to read only as database updates are part of the script.
    Is there another strategy that I could use to create the logs I need?
    Cheers,
    kj

  • Procedure successful when using dbms_job, but fails in a shell script

    I have a procedure which is throwing the following error when run from a shell script. This procedure completes successfully when run using dbms_job
    ORA-00164 distributed autonomous transaction disallowed within migratable distributed transaction

    Mohan et al,
    When I get an ORA error that I don't understand I plug it into Google; use the whole error code, ie 'ORA-00164'.
    The second link in this case gives a reasonable explanation of what is happening.
    http://www.dbasupport.com/oracle/ora9i/autonomoustrans.shtml
    Cheers,
    Colin

Maybe you are looking for

  • Exit button not working in exe file made with Aggregator

    Hi, I created an .exe file using Aggregator in full screen mode but the exit button on the skin doesn't work. When I click the exit button, the dislay hiccups (wobbles a bit) but the file keeps playing and doesn't close. This is especially problemati

  • Calling JSP file from applet and passing a parameter in POST form

    Hi, Can anybody help me. I want to call a JSP page from within a applet and to this JSP page i want to pass the query which the applet has created in POST method. I want to refresh the applet page with the new JSP page by passing the query object so

  • SmartPrint standalone for IE 9 will not install. Yes, I downloaded the new version.

    First, the gorey details: Windows 7 Professional 64 bit IE9 HP Officejet 8600 e Pro Installed the printer and it's working fine.  During installation, web print was automatically installed and the icon appeared on the toolbar.  When I clicked it, it

  • Does JSTL functions work in custom Spaces Page Style ?

    I am trying to create a custom page style and have to write some logic where I have to use fn:containsIgnoreCase. When I create pages that use this Page Style, it throws a white page and doesnt work. I have also added the below in the root xmlns:fn="

  • Center div 1 place div 2 to the right of div 1

    I'm in the middle of putting together a template, basically I want my content centered on the page, but I want to create a div in the right area for ads. See link http://www.kiddoclicks.com/ I want the white area to say in line with my main image whi