June 2, 2015 at 1:05 pm
I have an SSIS Package that runs an SQL command on a DB2 linked server and inserts the resulting data into the SQL Server table using the following :
insert into StagingTableForDB2Data
execute(@cmd) at LinkDB2db
From time to time the Job will just hang and we end up stopping it.
What that leaves us with a lock on the table StagingTableForDB2Data meaning we cant rerun it. The only way we have found to get around this is to restart the server.
Here are details on the session that is causing the lock:
If we leave it, it will just sit there for days and never rollback so we are left with this lock.
I believe it is waiting for the DB2 to respond and to that end I know that on peak times non priority queries on the DB2 server are killed. For some reason this doesn't come back to sql server and it just waits.
Want to know how we can release without having to restart the server and how can make it more "gracefull"
June 2, 2015 at 8:03 pm
This is a tough one. You have to find the connection on the DB2 side of the house and kill it before the SQL Server connection will rollback.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 3, 2015 at 11:52 am
So checked with the DB2 DBA's and they see no session but believe it was killed on their side when due to high loads on the server.
Given it was killed I would expect the process on the SQL Server side to either fail or be killed and rollback.
Question now is for the stuck process on the SQL Server side how can I get rid of it without having to restart the server ?
November 5, 2015 at 4:38 am
Well, I don't have enough knowledge but I hope this may help you - DB2 Server Table Space Locked
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply