Error "Mutating table" when execute a trigger
Hi all,
I'm a newbie in oracle. Recently i do some database migration from sql server 2005 to oracle 11g. Some of my table are using trigger which is not running in oracle. It has error "mutating table" when i'm trying to update some table. According to some information i got from the internet this can be solve by creating 1 packages and 3 trigger, but i found this article http://www.oracle.com/technetwork/issue-archive/2008/08-sep/o58asktom-101055.html which confuse me much. It says that the trigger is not allowed to be used for multiple user, meanwhile my application was for multiple user. What should i do then ?
*sorry for my bad english
Hi,
Sorry for my late reply, below is one of my trigger that causes error. This trigger was automatically created when im doing the migration.
create or replace
TRIGGER "DBO_ORACLE_240312".tgrRwyPktUpd
-- =============================================
-- Author: Debora Farah Rasul
-- Create date: 09.02.2012
-- Description: Update Riwayat Pangkat untuk data SKCPNS/SKPNS
-- =============================================
AFTER UPDATE
ON RiwayatPangkat
FOR EACH ROW
DECLARE
v_temp NUMBER(1, 0) := 0;
BEGIN
IF NULL/*TODO:TRIGGER_NESTLEVEL()*/ > 2 THEN
RETURN;
END IF;
--SQL Server BEGIN TRANSACTION;
BEGIN
SELECT 1 INTO v_temp
FROM DUAL
WHERE ( ( SELECT :NEW.isTrigger
FROM DUAL ) = -1 );
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
IF v_temp = 1 THEN
BEGIN
MERGE INTO SKCPNS
USING (SELECT :NEW.PegawaiID AS PegawaiID, :NEW.NoNota AS NoNota, :NEW.NoSK AS NoSK, :NEW.TglSK AS TglSK, :NEW.TMTPangkat AS TMTPangkat, :NEW.PangkatID AS PangkatID
FROM dual) src
ON (SKCPNS.PegawaiID = src.PegawaiID )
WHEN MATCHED THEN UPDATE SET NoNota = src.NoNota,
NoSK = src.NoSK,
TglSK = src.TglSK,
TMTCPNS = src.TMTPangkat,
PangkatID = src.PangkatID;
END;
ELSE
BEGIN
SELECT 1 INTO v_temp
FROM DUAL
WHERE ( ( SELECT :NEW.isTrigger
FROM DUAL ) = -2 );
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
IF v_temp = 1 THEN
BEGIN
MERGE INTO SKPNS
USING (SELECT :NEW.PegawaiID AS PegawaiID, :NEW.NoSK AS NoSK, :NEW.TglSK AS TglSK, :NEW.TMTPangkat AS TMTPangkat, :NEW.PangkatID AS PangkatID
FROM dual) src
ON ( SKPNS.PegawaiID = src.PegawaiID )
WHEN MATCHED THEN UPDATE SET NoSK = src.NoSK,
TglSK = src.TglSK,
TMTPNS = src.TMTPangkat,
PangkatID = src.PangkatID;
END;
END IF;
END IF;
MERGE INTO RiwayatGaji
USING (SELECT :NEW.PegawaiID AS PegawaiID, :NEW.NoUrut AS NoUrut, :NEW.NoSK AS NoSK, :NEW.TglSK AS TglSK, :NEW.TMTPangkat AS TMTPangkat, :NEW.PejabatPenetap AS PejabatPenetap, :NEW.MasaKerjaTh AS MasaKerjaTh, :NEW.MasaKerjaBl AS MasaKerjaBl, :NEW.PangkatID AS PangkatID, :NEW.JenisKP AS JenisKP
FROM dual) src
ON ( RiwayatGaji.PegawaiID = :NEW.PegawaiID
AND RiwayatGaji.isTrigger = :NEW.NoUrut)
WHEN MATCHED THEN UPDATE SET NoSK = src.NoSK,
TglSK = src.TglSK,
TMTSK = src.TMTPangkat,
PejabatPenetap = src.PejabatPenetap,
MasaKerjaTh = src.MasaKerjaTh,
MasaKerjaBl = src.MasaKerjaBl,
PangkatID = src.PangkatID,
JenisKenaikan = src.JenisKP;
END;
*Btw thank u for the reply :)
Similar Messages
-
SQL error 3113 occurred when executing EXEC SQL.
Hi,
We are facing one typical problem, One background is failing regularly with
below dump. as we now got all notes giving information, if database restarted
taking backup, these type of failures occur, but our database is only down for backup once in a week, but it is failing with frequenly.
in this two servers are located in different place, in this job tries to connect
another server to get material statistics.
It is giving some error message in sm21 with
SQL error 3113 occurred when executing EXEC SQL.
work procees in reconnect mode.
all notes saying these types of dump occur when database restared, but this dump
even though database is up.
below is short dump, please can anyone help me from this problem.
ABAP runtime errors DBIF_DSQL2_SQL_ERROR
Occurred on 08.01.2007 at 00:30:28
>> Short dump has not been completely stored. It is too big.
SQL error 3113 occurred when executing EXEC SQL.
What happened?
The error occurred in the current database connection "AZ1".
What can you do?
Note the actions and input that caused the error.
Inform your SAP system administrator.
You can print out this message by choosing "Print". Transaction ST22
allows you to display and manage termination messages, including keeping
them beyond their normal deletion date.
Error analysis
How to correct the error
Database error text........: "ORA-03113: end-of-file on communication channel#"
Triggering SQL statement...: "select mara.groes, mara.brgew, mara.ntgew,
mara.gewei, mara.volum, mara.voleh, mara.mstae, mara.mstde, mara.prdha,
marc.matnr, marc.werks, marc.mmsta, marc.mmstd from sapr3.mara, sapr3.m
where sapr3.mara.mandt = sapr3.marc.mandt and sapr3.mara.matnr =
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"DBIF_DSQL2_SQL_ERROR"
"ZM2431216 " or "ZM2431216 "
"EXTRACT_GENERAL_DATA"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in th
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error o
or which actions and input led to the error.
System environment
SAP Release.............. "46C"
Application server....... "essceu3"
Network address.......... "172.19.119.198"
Operating system......... "AIX"
Release.................. "5.3"
Hardware type............ "00C7ADBD4C00"
Database server.......... "ukblx176"
Database type............ "ORACLE"
Database name............ "EU3"
Database owner........... "SAPR3"
Character set............ "es_ES.ISO8859-1"
SAP kernel............... "46D"
Created on............... "Jul 9 2006 20:26:33"
Created in............... "AIX 1 5 00447C4A4C00"
Database version......... "OCI_920__OCI_7_API "
Patch level.............. "2257"
Patch text............... " "
Supported environment....
Database................. "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE
8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.., ORACLE 10.2.0.."
SAP database version..... "46D"
Operating system......... "AIX 1 4, AIX 2 4, AIX 3 4, AIX 1 5, AIX 2 5, AIX 3
5, , System build information:, , LCHN :
841480"
User, transaction...
Client.............. 600
User................ "MPZMMES"
Language key........ "S"
Transaction......... " "
Program............. "ZM2431216 "
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where termination occurred
The termination occurred in the ABAP/4 program "ZM2431216 " in
"EXTRACT_GENERAL_DATA".
The main program was "ZM2431216 ".
The termination occurred in line 980
of the source code of program "ZM2431216 " (when callin
The program "ZM2431216 " was started as a background jo
Source code extract
009500 mara.ntgew,
009510 mara.gewei,
009520 mara.volum,
009530 mara.voleh,
009540 mara.mstae,
009550 mara.mstde,
009560 mara.prdha,
009570 marc.matnr,
009580 marc.werks,
009590 marc.mmsta,
009600 marc.mmstd
009610 into :w_ops-groes,
009620 :w_ops-brgew,
009630 :w_ops-ntgew,
009640 :w_ops-gewei,
009650 :w_ops-volum,
009660 :w_ops-voleh,
009670 :w_ops-mstae,
009680 :w_ops-mstde,
009690 :w_ops-prdha,
009700 :w_ops-matnr,
009710 :w_ops-werks,
009720 :w_ops-mmsta,
009730 :w_ops-mmstd
009740 from sapr3.mara, sapr3.marc
009750 where sapr3.mara.mandt = sapr3.marc.mandt
009760 and sapr3.mara.matnr = sapr3.marc.matnr
009770 and sapr3.mara.mandt = :p_mandt
009780 and sapr3.mara.matnr = :w_ebs-matnr
009790 and sapr3.marc.werks = :p_owerks
> ENDEXEC.
009810 endform. " extract_general_data
009820 *&
009830 *& Form append_i_ops
009840 *&
009850 * Appends W_OPS to I_OPS
009860 *
009870 form append_i_ops.
009880 append w_ops to i_ops.
009890 endform. " append_i_ops
009900 *&
009910 *& Form extract_material_description
009920 *&
009930 * Extracts a Material Description from the remote database an
009940 * modifies the current record in I_OPS.
009950 *
009960 * >P_SPRAS Language Key
009970 *
009980 form extract_material_description using p_spras.
009990 EXEC sql performing set_langauge.
Contents of system fields
SY field contents..................... SY field contents............
SY-SUBRC 0 SY-INDEX 0
SY-TABIX 1 SY-DBCNT 1
SY-FDPOS 18 SY-LSIND 0
SY-PAGNO 0 SY-LINNO 1
SY-COLNO 1
Chosen variables
Name.......................... Contents.1........2........3....+..
W_EBS-PRAT4
2
0
W_OPS-GROES
22222222222222222222222222222222
00000000000000000000000000000000
W_OPS-BRGEW #######
0000000
000000C
W_OPS-NTGEW #######
0000000
000000C
regards,
krishnaiah.Hi,
This is usually a SERVER SIDE DATABASE PROBLEM or SQLNET LISTENER (server side) PROBLEM. The client side should initially be ignored and instead the server should be investigated. In rare cases, this can be caused by client
side memory or other resource problem, or a DLL version mismatch, but this is
unlikely.
Enlist the assistance of your DBA. Then reproduce the ORA-3113 error on your
client application. Ask your DBA to look at the database side Alert.log and
trace files and look for ANY activity. Any activity that coincides with your
ORA-3113 will be a clue.
REgards
Vinod -
Error in sxmb_moni when executing
hi all,
i get error in sxmb_moni when executing (monitor for processed xml messages)
the messages states that "system error occured during persist".how to clear this error message.Hi Allen
Did you configure the right interface mapping in the interface determination? Did you activate your interface mapping? Plz have a look to transaction SXI_CACHE.
this error is beacuse your mapping progrm might be wrong, just check the interface mapping test with mapping program ( it will be error) and with out mapping program ( no error will be there)
cross check your mapping program any madt fields are you missing?
Thanks! -
LE-TRM: Error message LTRM023 when executing LROUT
Dear all,
When executing the transaction LROUT, I get the error message LTRM023 "Site is not defined". I checked table LROUT and it is actually empty.
However, I created appropriate settings in maintenance views V_T340DT, V_T347A, V_LLOCT and all other SPRO entries related to my TRM site. Futhermore, I implemented all OSS notes related to LROUT or TRM route.
Then, I activated debug mode.
> Issue 1:
Main program SAPLLTRM
Source code LLTRMU09
Function LTRM_LLOCT_READ
IF ss_lloct IS INITIAL
OR ss_lloct-locat <> i_locat.
SELECT SINGLE * FROM lloct INTO ss_lloct
WHERE locat = i_locat.
The issue is that settings of table LLOCT are not red. I had to manually set i_locat = "site" to process further.
> Issue 2:
Main program SAPLLTRS_SERVICES
Source code LLTRS_SERVICESU08
Function LTRS_LRSTY_READ
SELECT * FROM lrsty INTO TABLE it_lrsty
WHERE locat = i_locat.
IF sy-subrc <> 0.
RAISE table_lrsty_not_maintained.
ENDIF.
But sy-subrc = 4..., so system raise error message table_lrsty_not_maintained. However, table LRSTY is maintened.
Did you already have this issue? How did you solve it?
In advance, thx a lot for your help.
PS: I play with ECC 5.0, Release 500, SP SAPKGPAC05. With nearly equivalent settings in ECC 6.0, Release 604, SP SAPK-60402INEADFPS, I don't have any trouble running LROUT...Hi,
Have you found the answer at your problem.
I know you posted it one year ago but I am in the same case.
So, if you have found the solution, I would be very pleased if you could help me.
Edited by: FlorianFFF on Aug 26, 2011 3:03 PM -
Error ORA-03113 when execute procedure via OEM
Hi All,
I got error messages
ORA-03113: end-of-file on communication channel
ERROR at line 1:
ORA-03114: not connected to ORACLE
when execute procedure via Oracle Enterprise Manager
Who do you know what 's the problem and how can I resolves ?
Thanks,
MckaSolution Description:
=====================
The ORA-3113 error is a general error reported by Oracle client tools,
which signifies that they cannot communicate with the oracle shadow
process. As it is such a general error more information must be collected
to help determine what has happened.
This short article describes what information to collect for an
ORA-3113 error when the Oracle server is on a Unix platform.
General Issues:
===============
1) Is it only one tool that encounters the error or
do you get an ORA-3113 from any tool doing a similar operation?
If the problem reproduces in SQL*Plus, use this in all tests
below.
2) Check if the problem is just restricted to:
[ ] One particular UNIX user,
[ ] Any UNIX user
or [ ] Any UNIX user EXCEPT as the Oracle user.
3) Check if the problem is just restricted to:
[ ] One particular ORACLE logon
or [ ] Any ORACLE logon that has access to the
relevant tables.
4) If you have a client-server configuration does this occur from:
[ ] Any client
[ ] Just one particular client
or [ ] Just one group of clients ?
If so what do these clients have in common ?
Eg: Software release .
5) Do you have a second server or database version where the
same operation works correctly? -
Cant find output window when executing a trigger in sql developer?
Hello,
this is a serious question: I really cant find the output window when i executed a trigger with this code line:
dbms_output.put_line('hello');
I dont know where i cann see the word "hello" to test my trigger.
Can please someone help me?There is a seperate forum for SQL DEVELOPER
SQL Developer
G. -
HTTP Error: 401 unauthorized when executing a costcenter report.
Hi.
I get this HTTP error when executing an costcenter report.
The steps I do is following.
Call upp the report Y_D02_77000xxx
Under the "kostenstellen:Selection I Fill in this values.
Controlling area
Fiscal Year
From Period
To Period
Plan version
and finally i enter the "Cost Center group"
Then i press "execute" and get the result for differrent Cost Element, i get 2 lines "*Total" and
"**Over/underabsorption"
Now i doubleclick Over/underabsorption and select report "Cost Centers: Actual Line Items"
Now i Should get a new window woth results but instead i get a blank screen with the errormessage:
"HTTP error: 401 unauthorized"
This procedure worked fine until a couple of weeks ago.
Anyone have any ideas about what could be the problem?
Regards JohanYou might want to check all of your connections in SM59. When you get the 401 error, this is sometimes due to a connection failure (bad password and so on) in the RFC connections (this can also happen if you are using the Content Manager).
Hope that helps.
J. Haynes -
Error in BDC when executed in back ground
Hi All,
We are working on a BDC interface for Material Master Basic Data Add or Change using SAP 4.7. The interface is working fine with CALL TRANSACTION (N,A screen modes), BDC foreground and Display error modes.
When the same session is executed in background mode it is not getting processed.
The error is caused while calling screen 2031 which uses a control. The diagnosis we received is given below
Control Framework: Fatal error - GUI cannot be reached
Message no. DC006
Diagnosis
When the Control Framework is started, the system checks whether the installed GUI supports frontend components such as controls. This check failed; the causes may be as follows:
1.) The program is running in the background
2.) A transaction was called using CALL TRANSACTION ... STARTING IN BACKGROUND TASK.
Procedure
Programs that run in the background cannot address controls on the frontend. In this case, the application must either include a fallback that does not depend on the user interface, or the program or transaction must detect for itself that is running in the background and terminate itself.
Is there any alternate method available for running the session in background with the controls?
Please help us in this regard.
Thanks in advance.
Kathirvel BalakrishnanHi Kathirvel!
In description of error: 'In this case, the application must either include a fallback that does not depend on the user interface, or the program or transaction must detect for itself that is running in the background and terminate itself.'
Obviously in material master only second option was implemented - termination.
Alternative: using IDOCs or BAPIs like BAPI_MATERIAL_SAVEDATA, BAPI_MATERIAL_MAINTAINDATA_RT.
Regards,
Christian -
Oracle error message 1445 when executing a SAP query
Hello experts,
We are running a ECC6.0 DEV and ACC system on an Oracle database (release 10.2.0.2.0).
When I execute a query in SQ01 on our acceptance system, a database error occurs (ORA-1445). However, when I execute the same query on our DEV system, this error does not occur.
I managed to find that this error might be due to a bug in Oracle and that this bug occurs when executing a query with many joins (more than 6), which indeed I am doing. What I do not understand is that this query does run on DEV without errors but not on ACC.
Does anyone have a suggestion?
Thanks and regards,
Alfio EspositoCheck if note "1126517 - ORA-1445 or incorrect values with 10.2" applies and also check if you have the same patches on DEV + PRD installed (using opatch lsinventory)
Markus -
Oracle error -6508 returned when executing JSP
The JSP program executes a stored procedure from a package. I've recompiled the package after some changes. The JSP returns -6508 error when it is executing the procedure. The error is returned only after recompiling the stored package. What could be the problem?
Hi,
ORA-6508 error is returned when the stored procedure cannot be found.
ORA-06508 PL/SQL: could not find program unit being called
Cause: An attempt was made to call a stored program that could not be found. The program may have been dropped or incompatibly modified, or have compiled with errors.
Action: Check that all referenced programs, including their package bodies, exist and are compatible.
Please check the package signature and the specifications.
Thanks,
Rashmi. -
Error SG 105 when executing transaction KKAK
Hi,
When executing transaction KKAK (Results Analysis) for month end processing we get the following error for a especific sales order:
"E SG105 Enter rate CAD/USD rate type P for 01/01/2010 in the system settings"
My question will be: why is the system asking to enter that rate which we never use. We use rate M but not P. Is that really necessary?
We are using release 470, level 003, Support Package SAPKH47031.
Thanks for your help.HI,
in the year-depending parameters of the controlling area version definition, the ex.rate type (P) and the valid-from-date is defined, thats why P is used.
Best regards, Christian -
Error in report when executing pl/sql function body returning sql query.
Hi,
I have used the pl/sql function body returning sql query for creating a report. I have created a datepicker(
P10_TASK_DATE) which can be submitted.The code is as below
DECLARE
v_sql varchar2(3000);
BEGIN
if :P10_TASK_DATE is not null THEN
v_sql:='select
* from tasks';
return v_sql;
else
v_sql:='select * from discovery';
return v_sql;
END IF;
END;if the date field is empty "select * from discovery" is executed and report is getting generated. But when we give a
date using date picker the page is submitted and i get "report error: ORA-01403: no data found" even
though the "tasks" table has data in it. Plz help
Thanks,
TJhi
Please try this
1. Create 2 region
1st region source=
select * from tasks'
go to the tab -> condition =
item NOT NULL
EXpression1 =:P10_TASK_DATE
this will run whenever the item have any date
2. open your 2 nd region source code= select * from discovery
put the condition
item is NULL
EXpression1 =:P10_TASK_DATE
thanks
Mark Wyatt -
Error (mutating table)
Hello,
i wanna update a field to 'N' after inserting a record into a table, with other field set to 'N'
create or replace trigger aft_insert_absente
after insert on absente
for each row
declare
begin
update absente set motivata='N' where :new.motivabila='N';
end;this gives me an error
Please help
Thanks!Hi,
Are you saying that when someone INSERTs a new row, and motivabila='N' on that row, then you want to make sure that motivata='N' on that row also?
If so, use a before insert trigger, like this:
create or replace trigger bef_insert_absente
before insert on absente
for each row
declare
begin
IF :NEW.motivabila = 'N'
THEN
:NEW.motivata := 'N';
END IF;
end;If that's not the problem, then please post
(a) some sample data that might be in the table before the insert
(b) an INSERT statemnet
(c) what should be in the table after the insert -
Error is coming when executing the report in bex
hai experts,
any body help me in this matter.
when i execute the qurey in bex its showing error message coming with popup box.
Error is showing like this.
"no value found"
" Exception 1 when calling WB_HTML_HELP_URL_GEToccured"
but when i click on "OK" button its showing result.can any body tell me why its showing error message like this .
regards
maheshyou default method is WEB so its useing URl to open the results, change the setting to use analyzer(XLS) and update your GUI Front End patch.
-
Hi,
I designed a query with a simple AMOUNT keyfigure (It is not a formula nor a Restricted KeyFigure). When I check the query, it seems to be okay, but when i execute it the column of the key figure displays the correct amount but with a ERR in the end of all amounts. For example:
$123456.55ERR
$134567.78ERR
How can I remove this ERR from the column? Why is this happening?
ThanksHi,
The amount is showing ERROR is because the currency dimension for your keyfigure AMOUNT is not mapped. Check your update rules,transfer rules whether the currency dimension for keyfigure AMOUNT is mapped or not.If not map it with the corresponding dimenison. (OR) You can eliminate ERROR in the report using NODIM function. Create a formula as NODIM( AMOUNT ). It wont display dimension for the given keyfigure.
Regards,
Ram
Maybe you are looking for
-
Hi, Suppose I am having date '28-feb-2007'. I want to add 1.9 years into this ? How can I do this ? thanks & regards pjp
-
How can I get IPhoto to identify duplicate photos so I can delete them?
I have accidently created copies of hundreds of photos in my library. Not sure how really. Can IPhoto identify the duplicates in my library so I can delete them on mass? Some of the them have three or four copies in different albums. I am concerned i
-
Q10 sync with Microsft Outlook
To replace my Tourch 9800, I bought a Q10 when they first came out, but I had to return it when I could not get it to sync with Outlook. (Unless I had and enterprose Server - which I don't). I understand that there is now Link software that will allo
-
Images in CCM 2.0 - use of URL MIME
Hello, Im working with images in a CCM 2.0 Catalog and I want to use the URL MIME in the catalog instead of using the url directly in the positions of the catalog. It is not working. Before (when the images were visible) URL MIME: no value /CCM/DE
-
HTTP Server I developed a multithreaded web server on Java capable of responding to HTTP 200,404,400 & 501. I connect to server on port 6897 from IE browser - http://localhost/index.html its tested successfully for responses-HTTP 200 and HTTP 404. wh