SSIS transaction handling error
Hello All,
I have set transaction in control flow but if you look at below screen shot this package is keep running forever i don't know what wrong in it and it don't even have huge data record coming in from source table has only 300 records
NOTE: I cant use in build transaction which is in SSIS like supported , Required and unsupported since I am having DTC transaction error and i cant those properties on server so I have only below option
for data flow details find below screen shot
Check all logs/event viewer for related messages:
http://social.msdn.microsoft.com/Forums/en-US/ee4ebd62-2a87-4edf-892f-93a885451d7e/location-of-sql-server-error-log-and-windows-event-log?forum=sqltools
SSIS progress display:
http://stackoverflow.com/questions/1475107/measuring-progress-of-ssis-data-flow
Kalman Toth Database & OLAP Architect
SELECT Video Tutorials 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012
Similar Messages
-
Transaction and Error handling in Mediator 11g
Hi Experts/Gurus/All,
We have following scenario in Mediators :-
For Inbound Interfaces :-
M1-->M2-->M3
M1 calls M2 and M2 calls M3
There are 3 mediators, Mediator#1(M1),Mediator#2(M2) and Mediator#3(M3)
M1 performs a FIle Read and do a ABO-->OAGIS conversion
M2 performs routing
M3 performs a OAGIS -->ABO(JDE E1) conversion.
Now,we are in middle to decide the Fault Handling Mechanism for this case.
M1 is Asynchronous , M2 is Synchronous and M3 is also Synchronous.
Question is :
1. M1 will start a new Transaction,Do M1 will propogate the same transaction to M2 which,as being Synch,propogates the same transaction to M3 ?
2. How will the commit and Roll back will be taken care of?
3. What if M1 errors out?
4. Whatif M2 errors out?
5. What if M3 errors out?
In question 3,4 and 5:
What will happen will the Full Transaction ? If M3 erros out,would the Entire Transaction Propogated by M1 will be roll back?
Also ,How about Error handling in this case:
Do I need to create seperate fault-policy.xml and fault-binding.xml for M1,M2 and M3 ?
Another Scenario is of OUTBOUND interfaces :-
M1-->M2-->M3
M1 calls M2 and M2 calls M3
However , M1,M2 and M3 are all Asynchronous.
In this scenarios how would I handle following :-
1. If M2 Errors out,I need the entire Interface which comprises of M1-->M2-->M3 to roll back?
2. If M3 Errors out,I need the entire Interface which comprises of M1-->M2-->M3 to roll back?
3. Seperate Transactions means I have to create seperate fault-policy.xml and fault-mapping.xml to handle errors?Hi,
You could create a package, and use the OdiSqlUnload to export the data into a flat file (csv) from snp_check_tab, then amend it. Then create an interface to load the data from the flat file to your tables, either via external tables or SQL Loader.
Question is, why are you amending data going from source to target? there surely has to be something wrong with the Architecture (especially if you are getting errors in production). If you amend data, so that it is different in source as it is in target, then when it comes to regression testing, this will never match.
The errors should go be fixed at source, and either you, or the business should have access to do so.
Cheers
Bos -
In call transaction how can we handle error records.
hai..tellme how can we handle error records in call transaction..we can get error records into one flatfile ok...then we have to execute the same bdc program with dat flat file (error records) once again...is it wright ..
Hi,
check this program u will get idea
seee this prog. its will help u .
copy and run this prog.
TYPES : BEGIN OF t_disp ,
vendorno(9),
compcc(13),
purchorg(14),
accgroup(15),
title(7),
name(5),
country(8),
ordcurr(14),
END OF t_disp.
TYPES : BEGIN OF t_err,
msgtyp LIKE bdcmsgcoll-msgtyp,
l_mstring(250),
END OF t_err.
DATA: i_disp TYPE STANDARD TABLE OF t_disp,
wa_disp TYPE t_disp,
i_err TYPE STANDARD TABLE OF t_err,
wa_err TYPE t_err.
data definition
Batchinputdata of single transaction
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
messages of call transaction
DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
error session opened (' ' or 'X')
DATA: e_group_opened.
message texts
TABLES: t100.
PARAMETER : p_file1 LIKE ibipparms-path,
p_cmode LIKE ctu_params-dismode DEFAULT 'N'.
"A: show all dynpros
"E: show dynpro on error only
"N: do not display dynpro
*selction screen.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file1.
AT SELECTION-SCREEN ON p_file1.
IF p_file1 IS INITIAL.
MESSAGE 'FILE IS NOT FOUND' TYPE 'E'.
ENDIF.
START-OF-SELECTION.
PERFORM f_disp_file1.
END-OF-SELECTION.
PERFORM f_disp_errs.
*& Form F_DISP_FILE1
text
--> p1 text
<-- p2 text
FORM f_disp_file1 .
DATA: l_filename1 TYPE string.
MOVE p_file1 TO l_filename1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_filename1
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = i_disp
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*? prepare BDC data
DELETE i_disp INDEX 1.
LOOP AT i_disp INTO wa_disp .
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
wa_disp-vendorno.
'ztest_1'.
PERFORM bdc_field USING 'RF02K-BUKRS'
wa_disp-compcc.
'0001'.
PERFORM bdc_field USING 'RF02K-EKORG'
wa_disp-purchorg.
'0001'.
PERFORM bdc_field USING 'RF02K-KTOKK'
wa_disp-accgroup.
'0001'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFA1-ANRED'
wa_disp-title.
'Mr.'.
PERFORM bdc_field USING 'LFA1-NAME1'
wa_disp-name.
'test name'.
PERFORM bdc_field USING 'LFA1-SORTL'
'TEST NAME'.
PERFORM bdc_field USING 'LFA1-LAND1'
wa_disp-country.
'in'.
PERFORM bdc_field USING 'LFA1-SPRAS'
'en'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-AKONT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNA'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-WAERS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=UPDA'.
PERFORM bdc_field USING 'LFM1-WAERS'
wa_disp-ordcurr.
'inr'.
PERFORM bdc_transaction USING 'XK01'.
WRITE:/ WA_DISP-VendorNo,
WA_DISP-COMPCC,
WA_DISP-PURCHORG,
WA_DISP-ACCGROUP,
WA_DISP-title,
WA_DISP-name,
WA_DISP-country,
WA_DISP-ORDCURR.
CLEAR: wa_disp.
REFRESH bdcdata.
ENDLOOP.
ENDFORM. " F_DISP_FILE1
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF FVAL NODATA.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form bdc_transaction
text
-->P_0322 text
FORM bdc_transaction USING tcode.
DATA: l_mstring(480),
l_subrc LIKE sy-subrc.
REFRESH messtab.
CALL TRANSACTION tcode USING bdcdata
MODE p_cmode
UPDATE 'L'
MESSAGES INTO messtab.
l_subrc = sy-subrc.
IF SMALLLOG 'X'.
WRITE: / 'CALL_TRANSACTION',
TCODE,
'returncode:'(I05),
L_SUBRC,
'RECORD:',
SY-INDEX.
LOOP AT messtab.
SELECT SINGLE * FROM t100 WHERE sprsl = messtab-msgspra
AND arbgb = messtab-msgid
AND msgnr = messtab-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
WRITE: / messtab-msgtyp, l_mstring(250).
*? Send this errors to err internal table
wa_err-msgtyp = messtab-msgtyp.
wa_err-l_mstring = l_mstring.
APPEND wa_err TO i_err.
ELSE.
WRITE: / messtab.
ENDIF.
CLEAR: messtab, wa_err.
ENDLOOP.
SKIP.
ENDIF.
ENDFORM. " bdc_transaction
*& Form f_disp_errs
text
--> p1 text
<-- p2 text
FORM f_disp_errs .
SORT i_err BY msgtyp.
LOOP AT i_err INTO wa_err.
AT FIRST.
WRITE : / text-002.
ULINE.
ENDAT.
AT NEW msgtyp.
IF wa_err-msgtyp = 'S'.
WRITE : / text-003.
ULINE.
ELSEIF wa_err-msgtyp = 'E'.
WRITE : / text-001.
ULINE.
ENDIF.
ENDAT.
WRITE : / wa_err-msgtyp, wa_err-l_mstring.
CLEAR wa_err.
ENDLOOP.
ENDFORM. " f_disp_errs
Regards -
I am running SQL Agent that executes an SSIS process from sql server1. The SSIS process executes its SQL/tables/sp’s against another sql server2.
I get an error after adding data flow tasks with transaction supported within a sequence with transaction required. The error, “The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D024 "The transaction
manager has disabled its support for remote/network transactions"
Prior to adding this sequence everything was working from sql agent, and there were other sequences with oledb destinations.
Everything works when running within SSIS Package.
I see this article on similar issue,
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0bfa2569-8849-4884-8f68-8edf98a9b4fe/problem-to-execute-a-package-and-tasks-with-a-certain-transactionoption-property-i-need-help?forum=sqlintegrationservices
“I had similar issue and solved by setting the following on both the machines. Allow Remote Clients, Allow Remote Administration,
Allow Inbound Clients, Allow Outbound Clients, and TIP are enabled in Component Services/My Computer/Properties/MSDTC/Security Configuration.”
I don’t want to remove transaction required for the “Remove Duplicates from Staging” sequence.
Anyone seen this?
Greg HansonDTC was running on remote computer. The problem was it was no longer accepting transactions from remote servers. This was in SSIS so I had to turn to "Transaction Supported" for all Data Flow Transactions.
Greg Hanson -
Hi guys please give me sample code for call transaction that handles error
hi guys, please give me sample code for call transaction that handles error,
please send me the sample code in which there should be all decleration part and everything, based on the sample code i will develop my code.
please do help me as it is urgent.
thanks and regards.
prasadnn.Hi Prasad,
Check this code.
Source Code for BDC using Call Transaction
*Code used to create BDC
*& Report ZBDC_EXAMPLE *
*& Example BDC program, which updates net price of item 00010 of a *
*& particular Purchase order(EBELN). *
REPORT ZBDC_EXAMPLE NO STANDARD PAGE HEADING
LINE-SIZE 132.
Data declaration
TABLES: ekko, ekpo.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekko-ebeln,
waers TYPE ekko-waers,
netpr TYPE ekpo-netpr,
err_msg(73) TYPE c,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_error TYPE t_ekko,
it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_success TYPE t_ekko.
DATA: w_textout LIKE t100-text.
DATA: gd_update TYPE i,
gd_lines TYPE i.
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
*Used to stores error information from CALL TRANSACTION Function Module
DATA: BEGIN OF messtab OCCURS 0.
INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
*Screen declaration
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
TITLE text-001. "Purchase order Num
SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
TITLE text-002. "New NETPR value
PARAMETERS: p_newpr(14) TYPE c obligatory. "LIKE ekpo-netpr.
SELECTION-SCREEN END OF BLOCK block2.
*START-OF-SELECTION
START-OF-SELECTION.
Retrieve data from Purchase order table(EKKO)
SELECT ekkoebeln ekkowaers ekpo~netpr
INTO TABLE it_ekko
FROM ekko AS ekko INNER JOIN ekpo AS ekpo
ON ekpoebeln EQ ekkoebeln
WHERE ekko~ebeln IN so_ebeln AND
ekpo~ebelp EQ '10'.
*END-OF-SELECTION
END-OF-SELECTION.
Check data has been retrieved ready for processing
DESCRIBE TABLE it_ekko LINES gd_lines.
IF gd_lines LE 0.
Display message if no data has been retrieved
MESSAGE i003(zp) WITH 'No Records Found'(001).
LEAVE TO SCREEN 0.
ELSE.
Update Customer master data (instalment text)
LOOP AT it_ekko INTO wa_ekko.
PERFORM bdc_update.
ENDLOOP.
Display message confirming number of records updated
IF gd_update GT 1.
MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
ELSE.
MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
ENDIF.
Display Success Report
Check Success table
DESCRIBE TABLE it_success LINES gd_lines.
IF gd_lines GT 0.
Display result report column headings
PERFORM display_column_headings.
Display result report
PERFORM display_report.
ENDIF.
Display Error Report
Check errors table
DESCRIBE TABLE it_error LINES gd_lines.
If errors exist then display errors report
IF gd_lines GT 0.
Display errors report
PERFORM display_error_headings.
PERFORM display_error_report.
ENDIF.
ENDIF.
*& Form DISPLAY_COLUMN_HEADINGS
Display column headings
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records updated successfully:'(013).
WRITE:/ sy-uline(42).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(004), sy-vline,
(11) 'Old Netpr'(005), sy-vline,
(11) 'New Netpr'(006), sy-vline.
WRITE:/ sy-uline(42).
ENDFORM. " DISPLAY_COLUMN_HEADINGS
*& Form BDC_UPDATE
Populate BDC table and call transaction ME22
FORM bdc_update.
PERFORM dynpro USING:
'X' 'SAPMM06E' '0105',
' ' 'BDC_CURSOR' 'RM06E-BSTNR',
' ' 'RM06E-BSTNR' wa_ekko-ebeln,
' ' 'BDC_OKCODE' '/00', "OK code
'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'EKPO-NETPR(01)',
' ' 'EKPO-NETPR(01)' p_newpr,
' ' 'BDC_OKCODE' '=BU'. "OK code
Call transaction to update customer instalment text
CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
MESSAGES INTO messtab.
Check if update was succesful
IF sy-subrc EQ 0.
ADD 1 TO gd_update.
APPEND wa_ekko TO it_success.
ELSE.
Retrieve error messages displayed during BDC update
LOOP AT messtab WHERE msgtyp = 'E'.
Builds actual message based on info returned from Call transaction
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = messtab-msgid
msgnr = messtab-msgnr
msgv1 = messtab-msgv1
msgv2 = messtab-msgv2
msgv3 = messtab-msgv3
msgv4 = messtab-msgv4
IMPORTING
message_text_output = w_textout.
ENDLOOP.
Build error table ready for output
wa_error = wa_ekko.
wa_error-err_msg = w_textout.
APPEND wa_error TO it_error.
CLEAR: wa_error.
ENDIF.
Clear bdc date table
CLEAR: bdc_tab.
REFRESH: bdc_tab.
ENDFORM. " BDC_UPDATE
FORM DYNPRO *
stores values to bdc table *
--> DYNBEGIN *
--> NAME *
--> VALUE *
FORM dynpro USING dynbegin name value.
IF dynbegin = 'X'.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-program,
value TO bdc_tab-dynpro,
'X' TO bdc_tab-dynbegin.
APPEND bdc_tab.
ELSE.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-fnam,
value TO bdc_tab-fval.
APPEND bdc_tab.
ENDIF.
ENDFORM. " DYNPRO
*& Form DISPLAY_REPORT
Display Report
FORM display_report.
FORMAT COLOR COL_NORMAL.
Loop at data table
LOOP AT it_success INTO wa_success.
WRITE:/ sy-vline,
(10) wa_success-ebeln, sy-vline,
(11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
(11) p_newpr, sy-vline.
CLEAR: wa_success.
ENDLOOP.
WRITE:/ sy-uline(42).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. " DISPLAY_REPORT
*& Form DISPLAY_ERROR_REPORT
Display error report data
FORM display_error_report.
LOOP AT it_error INTO wa_error.
WRITE:/ sy-vline,
(10) wa_error-ebeln, sy-vline,
(11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
(73) wa_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
ENDFORM. " DISPLAY_ERROR_REPORT
*& Form DISPLAY_ERROR_HEADINGS
Display error report headings
FORM display_error_headings.
SKIP.
WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
SKIP.
WRITE:2 'The following records failed during update:'(008).
WRITE:/ sy-uline(104).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(009), sy-vline,
(11) 'Netpr'(010), sy-vline,
(73) 'Error Message'(012), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. " DISPLAY_ERROR_HEADINGS
Hope this resolves your query.
Reward all the helpful answers.
Regards -
Transaction Handling - JDBC Receiver Adapter - Multiple SP Calls
Hello,
I have the following scenario:
I send an XML-SQL structure with multiple statment elements (each of them calling a different stored procedure). A stored procedure raises an error back to the JDBC Receiver Adapter in case of error.
Is it possible to have transaction handling in the JDBC Receiver to ensure:
- Commit only after ALL stored procedures where succesful (no error risen during calls)
- Rollback of ALL already called stored procedures in case an error has been risen
How can I implement these requirements in the JDBC Receiver Adapter?One more comment, I have found the following info for JDBC Drivers:
<i> "JDBC driver's default is to autocommit, meaning that the result of every SQL statement is permanent as soon as it is executed. This is why the course hasn't had to be concerned with transactions so far, and is perfectly acceptable in many cases."</i>
So I think that each SP-Call is automatically commited in case autocommit on JDBC Driver Level is set to "true". Does anyone know where I can change these settings? Directly on JDBC Receiver Adapter or do I have to go to Visual Admin for those changes? -
I have a serious problem with Forte Transaction handling.
If a transaction gets aborted through the statement Transaction.Abort
(not because of a database exception), looks like some resources/locks
are not released as a result of which if the current screen is closed,
Forte does not allow the screen to be re-opened. It gives some vague
error like 'Incorrect syntax near '.'
Following is the piece of code. I would appreciate it if someone could
give me a solution.
Thanks,
Begin Transaction
commitFlag = true;
Function1(commitFlag);
if commitflag
Function2(commitFlag);
end if;
if NOT commitflag
ex :UserDefinedException = new;
Transaction.Abort(ex,true);
end if;
Exception
When ex : UserDefinedException do
End Transaction;
Function1(commitFlag In/Out)
SQL Select some_flg from some_tab;
If some_flag = 'A'
ex : UserDefinedException = new;
commitFlag = false;
raise ex;
end if;
update some_tab with some_flg;
Exception
when ex:UserDefinedException do
Function2(commitFlag In/Out)
SQL Select some_flg from another_tab;
If some_flag = 'A'
ex : UserDefinedException = new;
commitFlag = false;
raise ex;
end if;
update another_tab with some_flg;
Exception
when ex : UserDefinedException do
}Transaction processing in FORTE is not straight forward. The wrong order
of statements may break your code. In your example I can suggest to
remove exceptions processing blocks from methods Function1 and
Function2. If transaction aborts in Function1, Function2 won't be
executed, so you don't need to use your commitFlag. You should process
an exception what is generated by transaction.abort in the same method
where transaction started or higher, otherwise it does work properly.
Hope it helps.
Igor Teselko.
RAO Meena wrote:
>
I have a serious problem with Forte Transaction handling.
If a transaction gets aborted through the statement Transaction.Abort
(not because of a database exception), looks like some resources/locks
are not released as a result of which if the current screen is closed,
Forte does not allow the screen to be re-opened. It gives some vague
error like 'Incorrect syntax near '.'
Following is the piece of code. I would appreciate it if someone could
give me a solution.
Thanks,
Begin Transaction
commitFlag = true;
Function1(commitFlag);
if commitflag
Function2(commitFlag);
end if;
if NOT commitflag
ex :UserDefinedException = new;
Transaction.Abort(ex,true);
end if;
Exception
When ex : UserDefinedException do
End Transaction;
Function1(commitFlag In/Out)
SQL Select some_flg from some_tab;
If some_flag = 'A'
ex : UserDefinedException = new;
commitFlag = false;
raise ex;
end if;
update some_tab with some_flg;
Exception
when ex:UserDefinedException do
Function2(commitFlag In/Out)
SQL Select some_flg from another_tab;
If some_flag = 'A'
ex : UserDefinedException = new;
commitFlag = false;
raise ex;
end if;
update another_tab with some_flg;
Exception
when ex : UserDefinedException do -
Transaction handling in Siebel
Hi
Can I implement transaction handling in Siebel? If yes, how can I implement it?
Thanks
GanaThis pdf give some background on transactions and error handling within esb 10g.
http://www.oracle.com/technology/products/integration/esb/files/esb-transactions-errorhandling.pdf
not very detailed -
Hi,
I have a problem with transaction handling in OSB 11g. When I add a report action, error messages disappear.
The process is the following:
jms-queue -> proxy-service ->business-service ->EBS webservice.
In the proxy-service I add an error-handler at node-level. In this error-handler I log the error-message in the server log. In the regular process there is a request and response-pipeline.
When I add a message on the queue and when the response from EBS is negative, the message is placed on a errorqueue. That's ok.
When I add a report-action to the error-handler and then I put another message on the queue, the message is disappeared. It is not on the error-queue and not on the normal queue. When I look in the database there is an extra row added.
I use the default datasource(wlsbjmsrpDataSource).
I found for example this blog: http://biemond.blogspot.nl/2010/11/global-transactions-and-quality-of.html ; but I can't find an example with writing to a database and a rollback to an errorqueue. The report-action needs it's own transaction.
In the weblogic console -> datasources -> transaction I unchecked "Keep Connection After Local Transaction" but that didn't work.
What kind of options is possible?
HermanI cant believe i was answered by the famous Anuj!.
You were correct. The weird thing, is that in publish actions the QoS is not propagated onto the target of that Publish per se.
We say this, becouse the Local PS has the Transaction Required = True, ergo the QoS is Exactly Once all along its message flow. It also propagates in the service callout´s and Route Node´s. Thats why we, trying to avoid redundance, didnt specified it in the publish action.
Thank you very much.
Regards.
Mario. -
Hi Gurus,
I am getting one issue while loading the data thru infopackage.
While loading the data in 3.5 flow for some souce system it is taking long time
and givig me transact RFC error. I have checked the source system connectivity and it is fine.Although the status is yellow during the load but at the end of the load it turns to red and it gives me below mentioned error:
Missing data packages for No selection information arrived from the source s
Diagnosis
Data packets are missing from No selection information arrived from the source s. BI processing does not return any errors. The data transport from the source system to BI was probably incorrect.
Procedure
Check the tRFC overview in the source system.
You access this log using the wizard or following the menu path "Environment -> Transact. RFC -> Source System".
Error handling:
If the tRFC is incorrect, resolve the errors listed there.
Check that the source system is connected properly to BI. In particular, check the remote user authorizations in BI.
Kindly let me know your suggestion in this issue.
Thanks in advance.
AmitHi
This error would normally occur, if at the time of processing, the data packets get stuck
To check for stuck trfc follow the path
Environment -> Transact. RFC -> Source System
there, check if trfc recorded, then it means, it is stuck, slecect that particular record and press F6 to execute the LUW.
If this is not the case, check the job overview in the source system.
IF you find ARFCSTATE = loading/sysfail, it means the trfc is stuck ..
you can check the datapacket number from there, and try mannual update for those partiular data packets.
Or else, sometimes, the packet itself doesnt arrive in BW, because of connection problem during the processing of few packets, ands later when you check, it seems fine.
In such cases simply repeat the load
Hope this helps
Regards
Shilpa -
Discussion: Transaction Handling in ccBPM
Regards
DanielThis pdf give some background on transactions and error handling within esb 10g.
http://www.oracle.com/technology/products/integration/esb/files/esb-transactions-errorhandling.pdf
not very detailed -
Exception generated during defered local transaction handling
Hi All,
We are using data direct connect 3.3 driver with MS SQL Server 7 on WebSphere 4.0. We are getting the exception "Exception generated during defered local transaction handling". Anyone encountered similar problem?> please let me know the solution. I am pasting the stack trace here.
Thanks in advance.
Regards,
Girish
[7/29/05 9:19:31:210 EDT] 37c1f1 SystemOut U 2005-07-29 09:19:31,177 [Servlet.Engine.Transports:10] ERROR com.xyz.nuuw.bus.dao.JDBCWrapper -livdsqa11122643171177
java.sql.SQLException: [IBM][SQLServer JDBC Driver]Exception generated during defered local transaction handling. See next exception via SQLException.getNextException for details.
at com.ibm.websphere.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseConnection.transactionableWorkStarting(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.ibm.websphere.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.ibm.websphere.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
at com.ibm.websphere.jdbcx.base.BasePreparedStatementWrapper.executeQuery(Unknown Source)
at com.ibm.ejs.cm.cache.CachedStatement.executeQuery(CachedStatement.java:312)
at com.ibm.ejs.cm.proxy.StatementProxy.executeQueryCommon(StatementProxy.java:410)
at com.ibm.ejs.cm.proxy.PreparedStatementProxy.executeQuery(PreparedStatementProxy.java:53)
at com.xyz.nuuw.bus.dao.JDBCWrapper.getdata(JDBCWrapper.java:164)
at com.xyz.nuuw.bus.dao.AccountSetupPH.getKeyID(AccountSetupPH.java:445)
at com.xyz.nuuw.bus.bo.AccountSetupBO.getKeyID(AccountSetupBO.java:50)
at com.xyz.nuuw.accountSetup.bus.ejb.AccountSetupSBBean.getKeyID(AccountSetupSBBean.java:85)
at com.xyz.nuuw.accountSetup.bus.ejb.EJSRemoteStatelessAccountSetupSB_14ea1086.getKeyID(EJSRemoteStatelessAccountSetupSB_14ea1086.java:99)
at com.xyz.nuuw.accountSetup.bus.ejb._AccountSetupSB_Stub.getKeyID(_AccountSetupSB_Stub.java:310)
at com.xyz.nuuw.bus.AccountSetupBD.getKeyID(AccountSetupBD.java:73)I am currently working with IBM on a similar problem with WAS 5.1 and SQL Server 2000. The SQLException has a nested exception that can be retrieved using the getNextException() method. This will give you some more information as to what is causing the problem. Ours seems to be triggered by a dropped connection at the SQL end. normally WAS will recover from that gracefully, but in our situation it is not.
Doug -
Yaourt fails "error: failed to prepare transaction (unexpected error)"
Today, I am trying to do a full system upgrade using yaourt, but I get this strange message:
[christian@pb-tj72 ~]$ yaourt -Syua
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
error: failed to prepare transaction (unexpected error)
:: Starting full system upgrade...
It makes me wonder that it first reports the error and then executes the full system upgrade.
I hope that this is a well-known problem or that somebody can help me with instructions regarding how to increase verbosity or which log files to look at.
Otherwise, will the yaourt-alternatives work with the AUR packages that I've already installed with yaourt?
BR,
ChristianSS4 wrote:I'd imagine yaourt has a -v switch for verbose
I tried yaourt -Syuv (didn't work together with the '-a' switch). First I got error: you cannot perform this operation unless you are root., but when running as sudo, it works. This makes me wonder whether the -v switch is undocumented or if it invokes pacman instead.
pstree -a shows me that in fact, yaourt -Syuv launches pacman -Syuv
nbvcxz wrote:Please find if you have some packages installed with "unsatisfied" dependences (eg. pulseaudio but no rtkit or libreoffice but no orbit2). To see more please do first pacman -Syu - should tell you more.
pacman -Syu tells me that I do have unresolved dependencies since my kernel is frozen until a certain bug is resolved:
warning: linux: ignoring package upgrade (3.2.14-1 => 3.3.2-1)
resolving dependencies...
warning: ignoring package linux-3.3.2-1
warning: cannot resolve "linux>=3.3", a dependency of "virtualbox-modules"
warning: ignoring package linux-3.3.2-1
warning: cannot resolve "linux>=3.3", a dependency of "virtualbox-modules"
But shouldn't yaourt handle this in the same way that pacman would?
My conclusion so far is that yaourt doesn't work with unresolved dependencies. So I will try another tool. -
ORA-01591: lock held by in-doubt distributed transaction string error
Hi Gurus,
I am getting the error
ORA-01591: lock held by in-doubt distributed transaction string error while running once procedure.
Procedure basically inserts 2 tables and update 1 table.
The order of execution is given below.
However I get the error as table _a locked.
Can you please help me how to handle this ?
Begin
Insert into table_a values (values1, value2); -- (our DB)
Insert into table_b@remote_DB values (value1, value2); --( REMOTE DB)
update table C ; -- (our DB)
commit; -- when I debugged I get exception with the sql error above in this commit.
End;Tina wrote:
Hi Gurus,
I am getting the error
ORA-01591: lock held by in-doubt distributed transaction string error while running once procedure.
Procedure basically inserts 2 tables and update 1 table.
The order of execution is given below.
However I get the error as table _a locked.
Can you please help me how to handle this ?
Begin
Insert into table_a values (values1, value2); -- (our DB)
Insert into table_b@remote_DB values (value1, value2); --( REMOTE DB)
update table C ; -- (our DB)
commit; -- when I debugged I get exception with the sql error above in this commit.
End;
01591, 00000, "lock held by in-doubt distributed transaction %s"
// *Cause: Trying to access resource that is locked by a dead two-phase commit
// transaction that is in prepared state.
// *Action: DBA should query the pending_trans$ and related tables, and attempt
// to repair network connection(s) to coordinator and commit point.
// If timely repair is not possible, DBA should contact DBA at commit
// point if known or end user for correct outcome, or use heuristic
// default if given to issue a heuristic commit or abort command to
// finalize the local portion of the distributed transaction. -
Hi, if tr r 100 records to be updated, if 3, 52 and 99 records are failed ,what happens in case of session and calltransaction method, how we can correct the errors in both cases and what happens they will update remaining fields or not.
hi,
if you use session u can check unprocessed records using SM35 tcode.In sm35 after processing the session you can check error log for unprocessed records depending up on the error message we can modify that particular record.
In the call transaction method we have to explicitly catch errors using BDCMSGCOLL and FORMAT_messages.
just check the below coding.
Handling errors in calltransaction using XK01 tcode.
REPORT ZSR_BDC_CT_ERROR1.
TABLES : RF02K,LFA1.
DATA: BEGIN OF ITAB OCCURS 0,
LIFNR LIKE RF02K-LIFNR,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
SPRAS LIKE LFA1-SPRAS,
END OF ITAB.
DATA : BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
BDCMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
INCLUDE BDCRECX1.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'z:\flatfiles\sr1.txt'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*perform open_group.
LOOP AT ITAB.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0100'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RF02K-LIFNR'
ITAB-LIFNR.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
ITAB-KTOKK.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
ITAB-NAME1.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
ITAB-SORTL.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
ITAB-LAND1.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
ITAB-SPRAS.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_DYNPRO USING 'SAPLSPO1' '0300'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=YES'.
PERFORM BDC_TRANSACTION USING 'XK01'.
IF SY-SUBRC <> 0.
*LOOP AT bdcmsg.
*WRITE: bdcmsg-DYNAME,
bdcmsg-DYNUMB,
bdcmsg-MSGTYP,
bdcmsg-MSGSPRA,
bdcmsg-MSGID,
bdcmsg-MSGNR,
bdcmsg-MSGV1,
bdcmsg-MSGV2,
bdcmsg-MSGV3,
bdcmsg-MSGV4.
*ENDLOOP.
READ TABLE BDCMSG WITH KEY MSGTYP = 'E'.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = BDCMSG-MSGID
LANG = SY-LANGU
NO = BDCMSG-MSGNR
V1 = BDCMSG-MSGV1
V2 = BDCMSG-MSGV2
V3 = BDCMSG-MSGV3
V4 = BDCMSG-MSGV4
IMPORTING
MSG = BDCMSG-MSGV1
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE : / BDCMSG-MSGV1.
ENDIF.
ENDLOOP.
*perform close_group.
Maybe you are looking for
-
My icloud calendar and my wife's are not syncing
Hoping someone can help with this issue. My wife and I both got my iphones on the day the 6's were released. With iOS8 installed, we decided to use the new feature of the family iCloud with my existing account being the primary account and her's bei
-
Hi ALL i am getting the timeout error in production client but in development and quality its working fine. there are 30 thousands record in it_items. can i remove this bte function module if yes how, pls guide me. LOOP AT it_items. MOVE-CORR
-
Auto employee vendor creation report
HI Experts, How to right a program which creates employee as a vendor automatically when HR hires any new employee in SAP, also in future if any detail has been changed in his HR master then the same will be automatically changed in his respective ve
-
Work flow for Purchase requisition
HI EXPERTS, I am new for MM workflow, my client asked me to overall purchase requisition approval through work flow,i did configuration like BUS 2105 -OBJ TYPE WS20000077-RECIVER TYPE RELEASESTEPCREATED-EVENT TYPE AND ASSIGN AGENT
-
IWeb doesn't show JPEGs and PDFs after move to new computer.
I bought a new Mac mini (running OS X 10.8.2), moved all files from the old one, installed the most recent Domain.sites file from the old computer into the new computer's User/Library/Application Support/iWeb, but now iWeb opens with all embedded .jp