on 06-28-2006 1:17 AM
Hello all,
I am trying the JDBC to file Scenario. There are 5 records in a table, i can see the records in the MONI being successfully picked by the sender jdbc adapter, after being picked up i want those records to be deleted. So i write a DELETE statement in the UPDATE SQL Querey but i cannot see those records deleted from the database. i think i need to specify some COMMIT which i am not sure of, can you please provide me your suggestions for deleting records from database.
Thanks in advance
Arathi,
Like mentioned by moorthy, keep the transaction isolation level to SERIALIZABLE or REPEATEABLE READ and it will get deleted as a single transaction and make sure that the where clause is correct.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Thanks for your inputs....i tried setting the isolation level to : repeatable_read/serializable but, i guess i might have problem in my SQL sts:
my table is very simple with 5 records and 2 columns
TABLE_1
ID SC_NUM
1 aa
2 bb
3 cc
4 dd
my squery sql st is:
SELECT ID,SCHED_NUM from JHI_LOAD_DELTA
my update st is:
UPDATE ID,SCHED_NUM from JHI_LOAD_DELTA
from your inputs, i find that i have to use a where clause, i am not sure...can you correct me
Thanks
Hi,
Refer SAP FAQ- 831162 Question no 8.
Also refer this-
http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Krishnamoorthy,
Where do i find that SAP FAQ?
Also, i had ben to help and from my understanding i thought that i have to set the advanced parameters,
by setting the transaction isolation level to : read committed and enabled the database auto-committ, but did not work.
Any other suggestions pls.
SAP Note if from SAP Service Market place. The link is
https://websmp103.sap-ag.de/notes
And the content of this SAP note is -
<i>Q: If I have the following configured in a JDBC Sender:
Select Query:
SELECT column FROM TABLENAME WHERE FLAG = "TRUE"
Update Query:
UPDATE TABLENAME SET FLAG = "FALSE" WHERE FLAG = "TRUE"
How do I know that the JDBC adapter will not update newly added rows (rows that were added between the time that the SELECT and UPDATE queries were executed) that were not read in the initial SELECT query?
A: The SELECT and the UPDATE are run in the same DB transaction, i.e. both statements have the same view on the database.
Make sure that both statements use the same WHERE clause. An additional requirement for the correct operation of this scenario is the configuration of an appropriate transaction isolation level on the database (i.e., repeatable_read or serializable). You might also consider using a "SELECT FOR UPDATE" statement instead of a plain SELECT statement to ensure proper locking on the database.</i>
Did you check this -
<i>Processing can only be performed correctly when the Transaction Isolation Level is set to repeatable_read or serializable.</i>
Regards,
Moorthy
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.