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
Similar Messages
-
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: 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
nullJay,
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 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?
ThanxHello,
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 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 WongI 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 -
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?
DavidIt 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 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 helpThanks 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 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?
nullIs 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'si'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-00604 error and ora 01000 error while report generation.
hi all,
I am trying to generate the multiple reports of same template through a program.
While this job is running, i get the following error at the BIP console and the reports don't get generated.
[101711_044115578][][EXCEPTION] java.sql.SQLException: ORA-00604: error occurred
at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded
Kindly help.
Thanks.Lots of resources with a simple search to see what this is about, for example:
http://www.orafaq.com/wiki/ORA-01000
ORA-01000: maximum open cursors exceeded
Cause: A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.
Action: Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.
open_cursors parameter
http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams160.htm#REFRN10137
Oracle support note:
OERR: ORA-1000 maximum open cursors exceeded (Doc ID 18591.1) -
Ora-00604,ora-01422 error while dropping the table
Hi gurus,
I am using Oracle 10g R2 on windows 2000 platform,while dropping the table the following error occured.
ORA-00604 : error occurred at recursive sql level 1.
ORA-01422: exact fetch returns more than requested number of rows.
Need urgent help.
Thanks in advanceIs there an AFTER EVENT trigger defined on this database? Can you check that?
Secondly, was this database migrated from earlier version? I remember having seen this problem on 9i (it was 9.2.0.1 or 9.2.0.2; I can't recall exactly). -
Ora 600 error Arguments [25012] [11]
hi,
i've an ORA-00600: error Arguments [25012], [2], [11], [], [], [], [], [] by DELETE FROM table WHERE filed = :b1
ther are only 8 file in database. (not 11)
Can anybody help, or give me an information about Bug number: 742709
OS NT 4 / SP6 ORACLE RDBMS Version: 8.0.5.2.1.
Thank in advice
JFATrace File Contents:
============================================================================================
[oracle@oem trace]$ more /d01/app/guest/diag/rdbms/db11g/db11g/incident/incdir_191809/db11g_smon_4198_i191809.trc
Dump file /d01/app/guest/diag/rdbms/db11g/db11g/incident/incdir_191809/db11g_smon_4198_i191809.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /d01/app/guest/product/11.2.0/dbhome_1
System name: Linux
Node name: oem.tap.com
Release: 2.6.18-164.el5xen
Version: #1 SMP Thu Sep 3 02:41:56 EDT 2009
Machine: i686
Instance name: db11g
Redo thread mounted by this instance: 1
Oracle process number: 13
Unix process pid: 4198, image: [email protected] (SMON)
*** 2010-10-15 12:05:24.395
*** SESSION ID:(16.1) 2010-10-15 12:05:24.395
*** CLIENT ID:() 2010-10-15 12:05:24.395
*** SERVICE NAME:(SYS$BACKGROUND) 2010-10-15 12:05:24.395
*** MODULE NAME:() 2010-10-15 12:05:24.395
*** ACTION NAME:() 2010-10-15 12:05:24.395
Dump continued from file: /d01/app/guest/diag/rdbms/db11g/db11g/trace/db11g_smon_4198.trc
ORA-00600: internal error code, arguments: [13013], [5001], [267], [8444108], [2], [8444108], [17], [], [], [], [], []
========= Dump for incident 191809 (ORA 600 [13013]) ========
*** 2010-10-15 12:05:24.399
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=dma0vxbwh325p) -----
update smon_scn_time set time_mp=:1, time_dp=:2, scn=:3, scn_wrp=:4, scn_bas=:5, num_mappings=:6, tim_scn_map=:7 where scn = (sele
ct min(scn) from smon_scn_time)
========================================================================================== -
Ora-01008 error with bind variable
Hi,
We have a test program which have one bind variable on a column which is varchar2(20), in the test program we've passed a 20 character string to the variable. The program returns error in one of the databases but all others are successful. We've checked the column is same in all of them.
Exception in thread "main" java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01008: not all variables bound
Could you please advise how to troubleshoot this issue?
RegardsWe aren't going to be able to help you if you won't post the database code that is giving the error.
And now we need the Java code that is constructing the query that you are using.
Your error is saying there is a second variable that you are not providing a value for.
And you said
>
We have a test program which have one bind variable on a column which is varchar2(20), in the test program we've passed a 20 character string to the variable.
>
But you are using a string that is 23 characters long
"a3g34-b13fd-efaie-f83fk"How does 23 go into 20? -
Getting error-ORA-24381: error(s) in array DML
Hi i have written the following code to bulk insert into a database table.
I am getting an error while returning the result of the bulk insert query into the collection
I have tried to track it by using sql%bulk_exceptions.error_code.
But the error code that it is showing is just 1.
I trapped it using sqlerrm.
and that is showing-error(s) in array DML
What do i do?
DECLARE
CURSOR temp_rec_tap_cur
IS
SELECT *
FROM temp_records_tap;
TYPE temp_rec_tab IS TABLE OF temp_rec_tap_cur%ROWTYPE;
v_test_tab temp_rec_tab;
v_rec_num num_tab;
v_filename temp_records_tap.file_name%TYPE;
v_error_code tap_reject.error_code%type;
v_rej_value tap_reject.field_rej%type;
v_errors number;
BEGIN
SELECT file_name
INTO v_filename
FROM table1
WHERE ROWNUM<2;
OPEN temp_rec_tap_cur;
LOOP
BEGIN
FETCH temp_rec_tap_cur
BULK COLLECT INTO v_test_tab LIMIT 1000;
FORALL i IN v_test_tab.FIRST .. v_test_tab.LAST SAVE EXCEPTIONS
INSERT INTO tapdetail_tapin
VALUES v_test_tab (i)
RETURNING record_num
BULK COLLECT INTO v_rec_num;
EXCEPTION
WHEN DUP_VAL_ON_INDEX
THEN
NULL;
WHEN OTHERS
THEN
v_errors:=sql%bulk_exceptions.count;
for i in 1..v_errors
loop
dbms_output.put_line(sql%bulk_exceptions(i).error_code);
p3_errorlog ('TAPINDETAWARE', SQLERRM, v_filename);
end loop;
END;
--RAISE;
EXIT WHEN temp_rec_tap_cur%NOTFOUND;
END LOOP;
INSERT INTO table2
SELECT file_id, file_name, sender_pmn, recipient_pmn, call_date,
call_date_only, call_type, call_number, FIRST_RECORD,
service_type, service_code, home_bid, serve_bid,
chargeable_subs_type, imsi_min, msisdn_mdn, air_charges,
air_charges_sdr, air_time, national_call_charges,
national_call_charges_sdr, national_call_time,
international_call_charges, international_call_charges_sdr,
international_call_time, dir_assist_charges,
dir_assist_charges_sdr, dir_assist_time, other_charges,
other_charges_sdr, other_time, volume_charges,
volume_charges_sdr, volume_units, tot_charges, tot_charges_sdr,
tot_duration, state_tax, state_tax_sdr, local_tax,
local_tax_sdr, state_and_use_tax, state_and_use_tax_sdr, va_tax,
va_tax_sdr, other_tax, other_tax_sdr, charge_refund_indicator,
advised_charge_currency, advised_charge, advised_charge_sdr,
advised_charge_commission, advised_charge_commission_sdr,
exchange_rate, mcc, mnc, process_date, chargeable_units,
record_num, mscid,null,null,decode(call_type,0,'250',1,'251',5,'255'),null,'Duplicate Call'
from temp_records_tap
where record_num not in (select column_value from table(v_rec_num)) ;
EXCEPTION
WHEN OTHERS THEN
p3_errorlog ('TAP', SQLERRM, v_filename);
END;Edited by: user8731258 on Sep 14, 2010 2:58 AM
Edited by: user8731258 on Sep 14, 2010 3:01 AMWhat is the type declaration of num_tab and how is record_num defined?
ORA-24381: error(s) in array DML
Cause: One or more rows failed in the DML.indicates that you fail on the insert itself. Are the table definitions the same? Same primary/unique keys?
Edited by: MBr on 14-Sep-2010 03:16 -
PL/SQL: ORA-04052: error occurred when looking up remote object.
Hi All,
I'm getting the following error message while executing a PL/SQL Block.
PL/SQL: ORA-04052: error occurred when looking up remote object UPLDUSER.filestatushistory@FTS
ORA-00604: error occurred at recursive SQL level 1
ORA-03106: fatal two-task communication protocol error
ORA-02063: preceding line from FTSStatement
declare
v_coun number;
begin
select count(*) into v_coun
from updluser.filestatushistory@fts;
end;Back ground of the situation as follows,
My DataBase version 10.2.0.3 DB Name :DB1
Table Owner : UPLDUSER
Table Name : FILESTATUSHISTORY
I have a report user on the same database and I have grant all on the above table to report user
Report User : RPT_FTS
SQL> GRANT ALL ON FILESTATUSHISTORY_V TO RPT_FTS;Now Please find the below database details where I'm getting subjected error.
Database version : 9.2.0.8
DB Name : DB2
User Name : RPT_REPORTS
I Have create a dblink from RPT_REPORTS to RPT_FTS on DB1 and the dblink works fine. But getting the above error while running it.
but When I do the same other 10.2.0.3 db , the above PL/SQL block works fine without any problem.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now the strange about this is that I have Created a new table on DB1 db like below;
SQL> CREATE TABLE UPLDUSER.ABC AS SELECT * FROM FILESTATUSHISTORY;and retry my code on DB2 (9.2.0.8) after changing the table to ABC and it worked. Now I don't know whats wrong with a original table(FILESTATUSHISTORY).
To over come the problem and a work-a-round method I create a view on the DB1 (RPT_FTS) like the below
SQL> CREATE VIEW FILESTATUSHISTORY AS SELECT * FROM UPLDUSER.FILESTATUSHISTORY;and was able to run the PL/SQL block Remotely.
Just wants To know what whould have been the cause for this .
Cheers
KanchanaHi Kanchana,
Perhaps following link of google search has answer to your query
ORA-04052. The search result contains some useful articles whose URLs I shan't post in the forums.
HTH!
*009*
Maybe you are looking for
-
I upgraded to 5.0.5 on my iphone4 and now 2 apps won't work - Skype and Pinterest. When I tap them they open and then immediately close. I have tried turning off my phone and deleting the apps then reinstalling them. They still don't work. What d
-
How can we use javascript to get a list of attachments currently attached to our PDF document? Thanks in advance, Ali.
-
XML IDOC to Native IDOC Conversion
Hi, We have a scenario, where we need to convert XML idoc into native idoc and write to a file. I am doing this based on How To Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0. When I first executed the scenario, I was getting t
-
ACH and Wirepayments in EDI820 format
All, I'm currently working on setting up a payment program to produce a file for all ACH and Wire transfers. The client is currently sending in EDI820 format. I do understand that RFFOUS_T also supports wire transferes and ACH files. I understand th
-
Mail sounds suddenly not working
For some strange reason, my mail sounds are not operating. I have a certain sound selected to announce incoming mail, but as of today, it doesn't ring. Nor do I get my "No Mail" sound. When I go to System preferences>Sound, none of the sounds play wh