Adam Singleton
asked on
SSIS job failing due to deadlock
I'll start by confessing that I am unfortunately VERY new to SQL and a bit out of my depth, so your help would be massively appreciated.
I'm trying to run an SSIS job which up until recently has been working fine.
After about 15 mins the job fails and I receive
So I rerun the job and the same thing happens over and over.
I have had a look for any running jobs (I assume I checked correctly...) and cannot find anything.
I assume something is stuck in a locked state from where the job was previously running and had to be stopped (via job activity monitor) but I haven't got a Scooby where to go from here.
We are using MS SQL 2014.
I have been researching deadlocks but as I mentioned i'm new to SQL and i'm not getting very far
If anyone has any specific ideas or advice, that would be amazing.
Cheers
I'm trying to run an SSIS job which up until recently has been working fine.
After about 15 mins the job fails and I receive
"Product Sales With View Fact:Error: SSIS Error Code DTS_OLEDBERROR. An OLE DB error has occurred. Error Code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Transaction (process ID 72)Was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."
So I rerun the job and the same thing happens over and over.
I have had a look for any running jobs (I assume I checked correctly...) and cannot find anything.
I assume something is stuck in a locked state from where the job was previously running and had to be stopped (via job activity monitor) but I haven't got a Scooby where to go from here.
We are using MS SQL 2014.
I have been researching deadlocks but as I mentioned i'm new to SQL and i'm not getting very far
If anyone has any specific ideas or advice, that would be amazing.
Cheers
ASKER
Thanks for the help Raja.
Ive attached a copy of the log if you wouldn't mind taking a look.
-----------
08/08/2018 12:40:56,spid22s,Unknown,w aiter id=process1fb1ad848 mode=IX requestType=wait
08/08/2018 12:40:56,spid22s,Unknown,w aiter-list
08/08/2018 12:40:56,spid22s,Unknown,o wner id=process37f051c28 mode=S
08/08/2018 12:40:56,spid22s,Unknown,o wner-list
08/08/2018 12:40:56,spid22s,Unknown,o bjectlock lockPartition=0 objid=917578307 subresource=FULL dbid=6 objectname=Merit.dbo.Trans id=lock268bc7100 mode=S associatedObjectId=9175783 07
08/08/2018 12:40:56,spid22s,Unknown,w aiter id=process37f051c28 mode=S requestType=wait
08/08/2018 12:40:56,spid22s,Unknown,w aiter-list
08/08/2018 12:40:56,spid22s,Unknown,o wner id=process1fb1ad848 mode=IX
08/08/2018 12:40:56,spid22s,Unknown,o wner-list
08/08/2018 12:40:56,spid22s,Unknown,p agelock fileid=1 pageid=4895952 dbid=6 subresource=FULL objectname=Merit.dbo.OnBus Equipment id=lock37f8eaa80 mode=IX associatedObjectId=7205759 4043629568
08/08/2018 12:40:56,spid22s,Unknown,r esource-li st
08/08/2018 12:40:56,spid22s,Unknown,P roc [Database Id = 6 Object Id = 1570820658]
08/08/2018 12:40:56,spid22s,Unknown,i nputbuf
08/08/2018 12:40:56,spid22s,Unknown,@ int2_STX
08/08/2018 12:40:56,spid22s,Unknown,c oalesce(@S topReferen ce<c/> '999999999999')<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ id_BatchNo <c/>
08/08/2018 12:40:56,spid22s,Unknown,@ dat_TransD ate + CAST(@str_TransTime as datetime)<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ dat_TransD ate<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ int2_Passe s<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ int2_Ticke ts<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ int4_NonRe venue<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ int4_Reven ue<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ int2_Class <c/>
08/08/2018 12:40:56,spid22s,Unknown,@ int2_Aligh tingStage< c/>
08/08/2018 12:40:56,spid22s,Unknown,@ int2_Board ingStage<c />
08/08/2018 12:40:56,spid22s,Unknown,@ str_Locati onCode<c/>
08/08/2018 12:40:56,spid22s,Unknown,@ id_Module< c/>
08/08/2018 12:40:56,spid22s,Unknown,@ id_Duty<c/ >
08/08/2018 12:40:56,spid22s,Unknown,@ id_Journey <c/>
08/08/2018 12:40:56,spid22s,Unknown,V ALUES (@id_Stage<c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt2_STX)
08/08/2018 12:40:56,spid22s,Unknown,S topReferen ce<c/>
08/08/2018 12:40:56,spid22s,Unknown,i d_BatchNo< c/>
08/08/2018 12:40:56,spid22s,Unknown,d at_TransTi me<c/>
08/08/2018 12:40:56,spid22s,Unknown,d at_TransDa te<c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt2_PassCo unt<c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt2_Ticket Count<c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt4_NonRev enue<c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt4_Revenu e<c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt2_Class< c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt2_Alight ingStageID <c/>
08/08/2018 12:40:56,spid22s,Unknown,i nt2_Boardi ngStageID< c/>
08/08/2018 12:40:56,spid22s,Unknown,s tr_Locatio nCode<c/>
08/08/2018 12:40:56,spid22s,Unknown,i d_Module<c />
08/08/2018 12:40:56,spid22s,Unknown,i d_Duty<c/>
08/08/2018 12:40:56,spid22s,Unknown,i d_Journey< c/>
08/08/2018 12:40:56,spid22s,Unknown,I NSERT INTO Trans( id_Stage<c/>
08/08/2018 12:40:56,spid22s,Unknown,f rame procname=Merit.dbo.usp_Pro cessConces sionTicket SaleRecord line=71 stmtstart=5452 stmtend=7222 sqlhandle=0x0300060032d2a0 5dc82ecc00 68a7000001 0000000000 0000000000 0000000000 0000000000 0000000000 0000
08/08/2018 12:40:56,spid22s,Unknown,e xecutionSt ack
08/08/2018 12:40:56,spid22s,Unknown,p rocess id=process1fb1ad848 taskpriority=0 logused=12688 waitresource=OBJECT: 6:917578307:0 waittime=2035 ownerId=29480874 transactionname=user_trans action lasttranstarted=2018-08-08 T12:40:54. 103 XDES=0x3743cd770 lockMode=IX schedulerid=1 kpid=87864 status=suspended spid=67 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2018-08-0 8T12:40:54 .173 lastbatchcompleted=2018-08 -08T12:40: 54.173 lastattention=1900-01-01T0 0:00:00.17 3 clientapp=.Net SqlClient Data Provider hostname=hostname hostpid=5696 loginname=loginnameisolati onlevel=re ad committed (2) xactid=29480874 currentdb=6 lockTimeout=4294967295 clientoption1=673185824 clientoption2=128056
08/08/2018 12:40:56,spid22s,Unknown,S elect * from <nl/>DW_ProductSalesValidD ataView<nl />ORDER BY Trans_ID
08/08/2018 12:40:56,spid22s,Unknown,i nputbuf
08/08/2018 12:40:56,spid22s,Unknown,u nknown
08/08/2018 12:40:56,spid22s,Unknown,f rame procname=adhoc line=1 stmtend=120 sqlhandle=0x020000004092a6 32e35248fc 9f9c806c9a f98e98c976 cab2000000 0000000000 0000000000 0000000000 0000
08/08/2018 12:40:56,spid22s,Unknown,e xecutionSt ack
08/08/2018 12:40:56,spid22s,Unknown,p rocess id=process37f051c28 taskpriority=0 logused=0 waitresource=PAGE: 6:1:4895952 waittime=2020 ownerId=29428821 transactionname=SELECT lasttranstarted=2018-08-08 T12:31:20. 190 XDES=0x1b5c9c180 lockMode=S schedulerid=8 kpid=53808 status=suspended spid=82 sbid=0 ecid=0 priority=0 trancount=0 lastbatchstarted=2018-08-0 8T12:31:20 .177 lastbatchcompleted=2018-08 -08T12:31: 20.177 lastattention=1900-01-01T0 0:00:00.17 7 clientapp=Microsoft SQL Server hostname=hostname hostpid=16108 loginname=loginname isolationlevel=read committed (2) xactid=29428821 currentdb=6 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
08/08/2018 12:40:56,spid22s,Unknown,p rocess-lis t
08/08/2018 12:40:56,spid22s,Unknown,d eadlock victim=process37f051c28
08/08/2018 12:40:56,spid22s,Unknown,d eadlock-li st
Ive attached a copy of the log if you wouldn't mind taking a look.
-----------
08/08/2018 12:40:56,spid22s,Unknown,w
08/08/2018 12:40:56,spid22s,Unknown,w
08/08/2018 12:40:56,spid22s,Unknown,o
08/08/2018 12:40:56,spid22s,Unknown,o
08/08/2018 12:40:56,spid22s,Unknown,o
08/08/2018 12:40:56,spid22s,Unknown,w
08/08/2018 12:40:56,spid22s,Unknown,w
08/08/2018 12:40:56,spid22s,Unknown,o
08/08/2018 12:40:56,spid22s,Unknown,o
08/08/2018 12:40:56,spid22s,Unknown,p
08/08/2018 12:40:56,spid22s,Unknown,r
08/08/2018 12:40:56,spid22s,Unknown,P
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,c
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,@
08/08/2018 12:40:56,spid22s,Unknown,V
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,S
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,d
08/08/2018 12:40:56,spid22s,Unknown,d
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,s
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,I
08/08/2018 12:40:56,spid22s,Unknown,f
08/08/2018 12:40:56,spid22s,Unknown,e
08/08/2018 12:40:56,spid22s,Unknown,p
08/08/2018 12:40:56,spid22s,Unknown,S
08/08/2018 12:40:56,spid22s,Unknown,i
08/08/2018 12:40:56,spid22s,Unknown,u
08/08/2018 12:40:56,spid22s,Unknown,f
08/08/2018 12:40:56,spid22s,Unknown,e
08/08/2018 12:40:56,spid22s,Unknown,p
08/08/2018 12:40:56,spid22s,Unknown,p
08/08/2018 12:40:56,spid22s,Unknown,d
08/08/2018 12:40:56,spid22s,Unknown,d
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Raja
To be honest I haven't got a clue how to do this, I may have to pass the job on.
At least we've got somewhere to look now.
Cheers for the help
To be honest I haven't got a clue how to do this, I may have to pass the job on.
At least we've got somewhere to look now.
Cheers for the help
ASKER
Thanks for your Help with this Raja.
Been getting nowhere for days
Been getting nowhere for days
Welcome, glad to help..
1. Enable Deadlock Trace in your SQL Server instance(Hope you have sysadmin privileges)
DBCC TRACEON(1222,-1);
2. Run your SSIS Package and if it encounters deadlock, then your Deadlock details will be available in SQL Server Error Log.
3. Try troubleshooting the deadlock details or share us to help better..