How can i minimize the deadlock for the below event
<deadlock>
<victim-list>
<victimProcess
id="process2ccd0c8"
/>
</victim-list>
<process-list>
<process
id="process2ccd0c8"
taskpriority="0"
logused="472"
waitresource="RID: 7:1:301805:0"
waittime="4729"
ownerId="218717433"
transactionname="implicit_transaction"
lasttranstarted="2015-02-18T02:01:42.190"
XDES="0x8ff01f078"
lockMode="S"
schedulerid="2"
kpid="19796"
status="suspended"
spid="161"
sbid="0"
ecid="0"
priority="0"
trancount="1"
lastbatchstarted="2015-02-18T02:01:42.197"
lastbatchcompleted="2015-02-18T02:01:42.193"
lastattention="1900-01-01T00:00:00.193"
clientapp="Microsoft SQL Server JDBC Driver"
hostname="xxxxxxxxxxxx"
hostpid="0"
loginname="xxxx"
isolationlevel="read committed (2)"
xactid="218717433"
currentdb="7"
lockTimeout="4294967295"
clientoption1="671088672"
clientoption2="128058">
<executionStack>
<frame
procname="adhoc"
line="1"
sqlhandle="0x02000000f96c7e18b47b33db0c837f7598795780ea68c03a0000000000000000000000000000000000000000">
SELECT LOC as LocationName, MATERIALUNITOFMEASURE,
SUM(WMDLXK.DECODE(QTY_TYPE,'QA',QTY,0)) QUANTITY_ON_HAND,
SUM(WMDLXK.DECODE(QTY_TYPE,'QP',QTY,0)) QUANTITY_ON_ORDER,
SUM(WMDLXK.DECODE(QTY_TYPE,'QS',QTY,0)) QUANTITY_SOLD,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) QUANTITY_ON_DEMAND,
SUM(WMDLXK.DECODE(QTY_TYPE,'QO',QTY,0)) QUANTITY_OUT_OF_STOCK,
SUM(WMDLXK.DECODE(QTY_TYPE,'QR',QTY,0)) QUANTITY_RECEIVED,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) QUANTITY_REQUESTED,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) QUANTITY_RETURNED,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) ADJUSTMENT_INVENTORY_QTY
FROM
SELECT DISTINCT LOC_SDQ3 AS LOC, MATERIALUNITOFMEASURE, QTY_SDQ4 AS QTY, QTY_TYPE FROM WMDLXK.CDM_LOCATION_QUANTITY T WHERE LOC_SDQ3 IS NOT NULL AND EDI_BATCH_ID ='erh7ck009edns0ia00003pi92015 02 18 02:01:41'
AND LINE_NUM ='1'
UNION
SELECT DISTINCT LOC_SDQ5 AS LOC, MATERIALUNITOFMEASURE, QTY_SDQ6 AS QTY, QTY_TYPE FROM WMDLXK.CDM_LOCATION_QUANTITY T WHERE LOC_SDQ5 IS NOT NULL AND EDI_BATCH_ID ='erh7ck009edns0i
</frame>
<frame
procname="unknown"
line="1"
sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
unknown
</frame>
</executionStack>
<inputbuf>
SELECT LOC as LocationName, MATERIALUNITOFMEASURE,
SUM(WMDLXK.DECODE(QTY_TYPE,'QA',QTY,0)) QUANTITY_ON_HAND,
SUM(WMDLXK.DECODE(QTY_TYPE,'QP',QTY,0)) QUANTITY_ON_ORDER,
SUM(WMDLXK.DECODE(QTY_TYPE,'QS',QTY,0)) QUANTITY_SOLD,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) QUANTITY_ON_DEMAND,
SUM(WMDLXK.DECODE(QTY_TYPE,'QO',QTY,0)) QUANTITY_OUT_OF_STOCK,
SUM(WMDLXK.DECODE(QTY_TYPE,'QR',QTY,0)) QUANTITY_RECEIVED,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) QUANTITY_REQUESTED,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) QUANTITY_RETURNED,
SUM(WMDLXK.DECODE(QTY_TYPE,'--',QTY,0)) ADJUSTMENT_INVENTORY_QTY
FROM
SELECT DISTINCT LOC_SDQ3 AS LOC, MATERIALUNITOFMEASURE, QTY_SDQ4 AS QTY, QTY_TYPE FROM WMDLXK.CDM_LOCATION_QUANTITY T WHERE LOC_SDQ3 IS NOT NULL AND EDI_BATCH_ID ='erh7ck009edns0ia00003pi92015 02 18 02:01:41'
AND LINE_NUM ='1'
UNION
SELECT DISTINCT LOC_SDQ5 AS LOC, MATERIALUNITOFMEASURE, QTY_SDQ6 AS QTY, QTY_TYPE FROM WMDLXK.CDM_LOCATION_QUANTITY T WHERE LOC_SDQ5 IS NOT NULL AND EDI_BATCH_ID ='erh7ck009edns0
</inputbuf>
</process>
<process
id="processabf1498"
taskpriority="0"
logused="41352"
waitresource="RID: 7:1:301806:33"
waittime="4766"
ownerId="218712317"
transactionname="implicit_transaction"
lasttranstarted="2015-02-18T02:01:38.403"
XDES="0x8ff87e568"
lockMode="U"
schedulerid="9"
kpid="19044"
status="suspended"
spid="149"
sbid="0"
ecid="0"
priority="0"
trancount="2"
lastbatchstarted="2015-02-18T02:01:42.190"
lastbatchcompleted="2015-02-18T02:01:42.183"
lastattention="1900-01-01T00:00:00.183"
clientapp="Microsoft SQL Server JDBC Driver"
hostname="xxxxxxxxxxm"
hostpid="0"
loginname="XXXX"
isolationlevel="read committed (2)"
xactid="218712317"
currentdb="7"
lockTimeout="4294967295"
clientoption1="671088672"
clientoption2="128058">
<executionStack>
<frame
procname="adhoc"
line="1"
stmtstart="40"
sqlhandle="0x02000000f91f4423850b7703e5697b611b66f2000795329b0000000000000000000000000000000000000000">
DELETE FROM WMDLXK.CDM_LOCATION_QUANTITY WHERE EDI_BATCH_ID = @P0
</frame>
<frame
procname="unknown"
line="1"
sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
unknown
</frame>
</executionStack>
<inputbuf>
(@P0 nvarchar(4000))DELETE FROM WMDLXK.CDM_LOCATION_QUANTITY WHERE EDI_BATCH_ID = @P0
</inputbuf>
</process>
</process-list>
<resource-list>
<ridlock
fileid="1"
pageid="301805"
dbid="7"
objectname="WMIDPEN2.WMDLXK.CDM_LOCATION_QUANTITY"
id="lock827cedd00"
mode="X"
associatedObjectId="72057594062766080">
<owner-list>
<owner
id="processabf1498"
mode="X" />
</owner-list>
<waiter-list>
<waiter
id="process2ccd0c8"
mode="S"
requestType="wait" />
</waiter-list>
</ridlock>
<ridlock
fileid="1"
pageid="301806"
dbid="7"
objectname="WMIDPEN2.WMDLXK.CDM_LOCATION_QUANTITY"
id="lock4e67a3c00"
mode="X"
associatedObjectId="72057594062766080">
<owner-list>
<owner
id="process2ccd0c8"
mode="X" />
</owner-list>
<waiter-list>
<waiter
id="processabf1498"
mode="U"
requestType="wait" />
</waiter-list>
</ridlock>
</resource-list>
</deadlock>
Please help me, How can i minimize the deadlock issue for this event
Indexing improvements might greatly improve query performance and reduce likelihood of deadlock, but they are no guarantee to remove deadlocks.
An additional strategy you might try is to serialise the queries. I am guessing that the SELECT and DELETE start at similar times getting IS and IX table locks respectively. Then the DELETE is escalating to a table X lock, for which it must wait for the
IS lock to go. The SELECT query continues until it needs a record/page that is X locked by the DELETE statement. That would be a deadlock. For the DELETE, you might get a full table lock at the beginning of the query. ie try changing the DELETE to the following
BEGIN TRANSACTION
SELECT TOP 0 * FROM WMDLXK.CDM_LOCATION_QUANTITY WITH (TABLOCKX)
DELETE FROM WMDLXK.CDM_LOCATION_QUANTITY WHERE EDI_BATCH_ID = @P0
COMMIT TRANSACTION
The SELECT in the query above will wait until it can get a full table X lock. No deadlock as it will wait for executing select queries to complete. Then the DELETE statement can execute within the full table X lock, so no deadlock there. At the COMMIT, the
full table X lock is released and waiting SELECT queries can continue.
Note: The SELECT queries will be slowed up (waiting for shared lock) while the DELETE executes. Are you OK with that? Actually, it is slightly worse, as a SELECT query might have to wait while the DELETE waits for its X lock, then wait while the DELETE executes.
Hope that helps,
Richard
Similar Messages
-
How can you minimize or (turn) off the "side panel" in Web Intelligence in the view mode.
It is possible to turn on/off options within the Side Panel by Customization of Groups.
But it seems You cannot influence the way Web Intelligence present (minimized or Off) the Side Panel in the IE??
Is there a solution for this??
If not, it would be a nice property of a Web Intelligence document in a future release.Hi Nico,
we patched up to BI 4.1 SP 3 Patch 2
and look look
click side panel to minimize
so .. patch patch ... -
How can I remove Personal Hotspot for the iPad
How can I remove Personal Hotspot for the iPad, I use apple configurator but I still can NOT do it. any idea?
I mean hide it, or remove it or delete it. I just don't wanna anyone on my enterprises use it because my data plan gonna be high cost.
supported by my carrier, I asked my carrier if they can remove it ? they said they can NOT. -
My phone was stolen, I have moved it in lost mode,but I can see that whoever has it,is changing phone name and can use it until I activate lost mode again.Can I do it permanently? How can I cancel ICloud back for the stolen phone, as I cannot delete the stolen phone backup (says that backup is being in use) and this is keeping memory occupied in the Cloud and I cannot back-up the other devices.
http://support.apple.com/kb/ht2526
-
How can I buy apple watch for the space black stainless steel case and the black sport band for one order?
Unfortunately no. I asked the same question when I went to the local Apple Store for my "try on" and as of now you would have to order the watch with the metal link band and the black sports band separately.
-
How can i find Czech books for the ibook app?
i would like to download books in Czech languge.
some one know how can i find Czech books for the ibook app?Google Czech ebooks.
You'll need to make sure the format will work with iBooks or one of the reader apps when you download.
Start with the free books and go on from there. -
2 days ago i rented The Avengers, beside it took almost 7h to download, at the end it did not get fully downloaded... 20 last minutes were not there. I know is just 5 dollars, but, how can i make a claim for the amount paid?, what if I buy a movie later? i will get the same problem!!! still I do not know how the avengers ends!! please do not tell me haha, focus on the problem here!
Welcome to the Apple Community.
Apple's policy on sales of digital content is that all sales are final. If however you wish to appeal to Apple, select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.
Currently, if your purchase happens to be your most recent purchase you will not be redirected to the report form, in this case use the report a problem option from the invoice that was emailed to you.
I believe your issues are probably a network issue, which unless you resolve are likely to be repeated again. -
How can I put something in for the last Wednesday of every month
How can I put something in for the last Wednesday of every month
I don't believe there is such a custom repeat option with the iPhone's Calendar app, but if you are syncing calendar events with a supported calendar app on your computer or syncing calendar events over the air with an email account that supports it with an option to create such a custom repeating event with the online calendar, set up the custom repeating event there.
-
How can create room in icloud for the time machine on the mac
I don't like to be carrying a time capsule around. Just need some space in the icloud for the Time Machine. Is that too hard to do?
vcngu wrote:
Backing up a Macpro in icloud shouldn't be rocket science or is it?
No, it is very simple really, iCloud does not back up from Time Machine, or any other OSX program come to that. iCloud IS NOT an OSX backup system. -
How can we get record numbers for the rows after grouping them?
Post Author: preethibaddam
CA Forum: Formula
hii everyone,
i want to number those records which are grouped by a column.
eg: if i group the emp table with the deptno then the records for the deptno10 group should start from 1 and end with an N number and again when it shifted to deptno20 group than the records for that deptno20 should again start with 1 and end with N number.
i tried placing record number from the field explorer but it is not working. the other group records start with the ended number from the first group.
thanksPost Author: V361
CA Forum: Formula
Record number from CR will count all the records. You could use a running total, and reset on change of group. -
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
I`ve got an appleID. And now I want to enter iTunes Store. But it asks me to write my credit card number(Visa/MasterCard/Amex) But I don`t have such a card. So I can`t log in. How can I log in without this card???
Hi 6323540,
In order to use an Apple ID without a credit card in the iTunes store, you will want to change the payment information associated with that Apple ID. See the guidelines in this article -
Change or remove your payment information from your iTunes Store account (Apple ID)
http://support.apple.com/kb/HT1918
If you have not yet created an Apple ID and went to create one without a credit card, follow the steps in this article -
Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
http://support.apple.com/kb/HT2534
Thanks for using Apple Support Communities.
Best,
Brett L -
How can I get a refund for the u2 album that Apple charged me for
I have just been charged £27.99 for the U2 album that I did not want. How do I get a refund for this. I can't stand U2!!
£27.99 for the album ? If you are referring to The Songs Of Innocence album (£7.99) then that was given free to everyone three months ago, and was free until 13th October - you are sure that you've been charged, it's not a temporary store holding charge ? The purchase price should show on your account's purchase history : See your purchase history in the iTunes Store - or http://reportaproblem.apple.com on your iPad.
If you have been charged for the album but you didn't buy it then try contacting iTunes Support via the above 'report a problem' link.
Or you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption -
How can I create a Title for the worksheet in Discoverer Plus
Dear members,
I am using discoverer 4i Plus to create workbooks. I am not finding an option to insert a title for the worksheet. In Discoverer Desktop we have a separate option to insert or edit a title. I am not sure how can we create titles in Plus.
Any suggestions.
Thanks
SandeepHi,
I am not able to login to Discoverer Desktop Using my Applications username. My Desktop Version is 4.1.37. The same username works in Discoverer 4i Plus and i can create workbook there.
I went to Tools--->Options--->Connections and checked the option connect to both standard and application EUL's and while i am logging in i checked the small box which comes in the login screen. I do not know why this happening.
I am also able to login as the database user in Desktop but not as an application user.
I want to login into desktop as an application user and create a template workbook which has title and then assign that workbook to a particular responsibility since creating title cannot be done in Plus.
I am not sure what's going wrong here because the Desktop works for database user but not for an application user. Any comments are highly appreciated.
Thanks
sandeep -
How can i do different colors for the category in business graphics
Hi everybody,
i have a business graphics and i need different colors for the category. my business graphics is a gantt.
for example
category1
category2
category2
and so on.
Is there a solution for this? How can i do it?
Best regards,
MarkusSorry.
In my opinion, this requirement can not be resolved.
Generally, we use Business Graphic with Category, we just follow:
DATA:lr_graph TYPE REF TO cl_wd_business_graphics.
lr_graph = cl_wd_business_graphics=>new_business_graphics(
bind_series_source = 'NODE_DYN'
chart_type = cl_wd_business_graphics=>e_chart_type-BARS
height = 340
width = 750
* BIND_TOOLTIP = 'GRAPH.TT'
id = 'GRAPH' ).
DATA: lr_bgr_cs TYPE REF TO cl_wd_category.
lr_bgr_cs = cl_wd_category=>new_category(
view = wd_this->mr_view
bind_description = 'NODE_DYN.CATEGORY').
lr_graph->set_category( lr_bgr_cs ).
If we go to SE24, to check the class "CL_WD_CATEGORY", we cannot find any method or attribute about how to manipulate the "Category Font Color"...
Maybe,any other expert can give you fantastic solution, hope. Best wishes.
Maybe you are looking for
-
Hi.... I am having IPod Nano 5th Generation. I can access music and video files (that are stored in Ipod memory) in Ipod. But when I connect the ipod to computer, I am not able to access/import these music and video files through computer. Also, I am
-
HP Office Jet Pro 8610 won't save as PDF
After scanning I hit save and it saves it as a bitmap even when I change it to pdf.
-
Getting Flash Player in Foxfire
I have done all the steps in loading foxfire, yet it still is not recognzed in pogo.
-
Lenovo P400 cant adjust screen brightness
Updated to windows 8.1 and now can not adjust my screen brightness on my Lenovo P400. I tried updating the display driver through the device manager and it told me there were no available updates.
-
Dear sirs, I sucessfully install jdk1.3 ,j2ee 1.3 and 50 day's trial cloudscape5.1 , then run the Cview create a database ,now I want to rigister the database by opening %J2EE_HOME%\config\default.properties file to find the line likes "jdbc.datasour