Our app is, under certain conditions, not allowing an insert or update on a table. We must fix this someway, somehow. Here is our scenario.
BTW: We are using ASP Classic, ADO and SQL Server
1. We have a report query running. The recordset returned (in asp classic) in less than a second BUT the app may take a while to iterate through (1-2 minutes). During this time, no inserts or updates can happen.
2. We have tried using many different stored procedures to identify what kind of locking is happening. Obviously, when you see this kind of situation, you think "table lock". However, sp_lock and many other lock identifying stored procedures are not showing table locks. They may show page locks, but not table locks. We cannot confirm that locking is the issue here.
3. The app uses an account with DBO priviliges.
4. I have tried altering the query in the following ways:
-o- I have set the cursor type of the recordset to adOpenForwardOnly
-o- I have set the LockType of the recordset to adLockOptimistic
-o- I have set the table hint NONLOCK (equivalent to READUNCOMMITTED) on the table(s) that are being queried
At this point, I am tempted to say that this issue could be in the application simply because I cannot confirm that it is a DB locking issue. I have searched for any and all information that I can find on locking and it tells me that I am doing the right things but clearly I haven't gone far enough or I am down a rat hole. Dunno....
Can anyone give me a suggestion or investigative path?
Thank you VERY much.
BTW: We are using ASP Classic, ADO and SQL Server
1. We have a report query running. The recordset returned (in asp classic) in less than a second BUT the app may take a while to iterate through (1-2 minutes). During this time, no inserts or updates can happen.
2. We have tried using many different stored procedures to identify what kind of locking is happening. Obviously, when you see this kind of situation, you think "table lock". However, sp_lock and many other lock identifying stored procedures are not showing table locks. They may show page locks, but not table locks. We cannot confirm that locking is the issue here.
3. The app uses an account with DBO priviliges.
4. I have tried altering the query in the following ways:
-o- I have set the cursor type of the recordset to adOpenForwardOnly
-o- I have set the LockType of the recordset to adLockOptimistic
-o- I have set the table hint NONLOCK (equivalent to READUNCOMMITTED) on the table(s) that are being queried
At this point, I am tempted to say that this issue could be in the application simply because I cannot confirm that it is a DB locking issue. I have searched for any and all information that I can find on locking and it tells me that I am doing the right things but clearly I haven't gone far enough or I am down a rat hole. Dunno....
Can anyone give me a suggestion or investigative path?
Thank you VERY much.