Hello Everyone,
I have recently migrated SQl Databases from one SQL(2005) Server to SQL(2008) Server. After Migration During my testing with those I encountered an Issue with Store procedure. Previously It was running Fine on 2005 Server, no Idea why it is throwing an error here.
I have an Issue with SQl Store Procedure, I run this as a Job in SSIS. The Proc Got many Inserts on it.
I use the Config:
OS: 64bit
SQl Server: 2008 64bit
When I Run the Procedure Either through Management Studio or SSIS I recieve this error:
Msg 1204, Level 19, State 4, Procedure usp_Store_Proc, Line 530
The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check
for long-running transactions.
I Have Carefully followed the Articles and Forum threads regarding this issue and tried to Allocate Locks 50000(Prev they were 5000) and Max Server Memory to use 10GB out of 131GB. And Max Memory per Query to 5GB.
Even After setting all these I get the Same Error popping when Procedure is kicked off.
I have use the query to know which Session is Using more Locks
SELECT request_session_id, COUNT (*) num_locks
FROM sys.dm_tran_locks
GROUP BY request_session_id
ORDER BY count (*) DESC
I saw the output as
request_session_idnum_locks
64180
611
651
561
531
521
661
671
581
I tried to kill the Session, But that stops the procedure to Run.
Could Some one Look at this and let me know if I am missing Anything else.
Thanks
Please Help People When they need..!!