I'm running the following statement, it is working locally with SQL Server 2008, however, there is SQL Server 2008 Express on the development server, and after the sql statement runs, I am unable to do SELECT statements on the table in which I deleted the开发者_C百科 record. Both databases were created with the same table creation scripts.
"DELETE FROM [dbo].[tblMiddayMover] WITH (ROWLOCK) WHERE [idMiddayMover] = @IdMiddayMover"
What reasons would this statement ever cause the database to hang.
After executing that statement, the following SELECT statement causes an error.
"SELECT * FROM [dbo].[tblMiddayMover] WHERE [fldActive] = 1"
I get the following error:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
I can do select statements on any other table with no issues.
I ran the command that was suggested, here is the output. alt text http://softwaredesignexcellence.com/capture.PNG
It's likely that you have created a transaction around your statement which is still open and has not been committed or rolled back.
I suggest opening another window before the second query times out and execute the procedure "sp_who2". This has a column which will definitively tell you if a query is being blocked by another query (it's called "BlkBy") which is running concurrently.
It was solved. Actually, I was using a code generator to do the stored procs and Data Layer, which created a transaction layer around all the database calls. However, the issue was that it targeted .NET 3.5 and the server was set up to use .NET 2.0. It wasn't a database issue as much as it was an incompatibly issue with the version of .NET on the server.
精彩评论