![]() How to Post Performance Problems - by Gail Shaw.Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden.Forum Etiquette: How to post Reporting Services problems.doesn´t happen again when re-trying (reprocessing)ĭoes anyone could give us a clue or tip to find a proper way to reproduce it. Unfortunatelly cannot start a sql profiler: 1. ExecuteScalar()Ĭannot run SELECT with sqlTransaction.Connection AFTER = 97 with "copy" AFTER. ExecuteScalar() - case happens, sqlTransaction.Connection = Nothing, also "copy" Nothing and "copy.State" = OpenĬannot run SELECT with sqlTransaction.Connection AFTER = 0 (ZERO) with "copy" AFTER. So running "SELECT and "SELECT give this = 1 with sqlTransaction.Connection BEFORE = 1 with "copy" BEFORE = 97 with sqlTransaction.Connection BEFORE = 97 with "copy" BEFORE. ExecuteScalar() when this event happens and found that the copy REMAINS (not "Nothing") and also its State = Open Last thing we try was running "SELECT and "SELECT but as we already know we will lost the Connection I make a "copy" of the Connection poperty of sqlTransaction before invoking the. NET Exception, even I just add a "custom logger" class when this event happens and give us all detail I did try some test doing our first SP to return high severity errors but in developer environment this high severity errors DID cause events in SQL server log, also ADO. We CAN "reprocess" the SAME input, in the same environment, with the same code involved and IT WORKS. The "rare" of this case is that ~99.97% of the time its working as expected: of the 5 diferent SPs, 2 of them are over other Database (SQL Server 2008 R2 either) in same server, but when this rare case happens this sps are not executed. NET " property has not been initialized".this is how we noticed we got a problem, but we haven´t found why it was lost. The Connection property of sqlTransaction instance its turned to nothing (tran.Connection=Nothing) so the next attempt to using it causes a. NET exceptions neither SQL errors occur, can see persisted data with the returned Identity value in two tables When this rare event happens we know first SP has been executed because: we got the Identity value in our "custom logs", no. The Identity value first SP returns (not with RETURN clause, with SELECT) we use it as an "ID" parameter for the other 4 SPs ROLLBACK TRAN - RAISERROR- RETURN clauses. ![]() The rare case happens ocassionally when executing the first Stored Procedure through an sqlCommand.ExecuteScalar(), this SP returns an IDENTITY value, internally uses a T-SQL transaction: BEGIN TRAN. Through our code (.NET) we open a connection (sqlConnection instance), begin a transaction ( initialize an sqlTransaction instance through "conn.BeginTransaction" where was already open "conn.Open()" ) and use this sqlTransaction instance and its Connection property to execute 5 SPs No errors have been found in SQL Server logs, we did turn on deadlock events to be written to log but no deadlock events where found NET Rollback() is executed (also this Rollback() doesn't throw a. NET code (sqlConnection, sqlTransaction, sqlCommand involved) COMMITS itself, data is persisted even though. ![]() I'l' try to focus this post as an SQL Server 2008 R2 issue as I already post this case in Microsoft ADO NET Forum (without a usuable response or tip to solve it.or reproduce it), if forum admin don't mind all detail is here:Ī transaction started with ADO. We've got this environment running just fine for many time (years) with no drastic changes after migration. NET Framework 3.5., our database was a SQL Server 2000 migrated to SQL SERVER 2008 R2 If(approveUserId.equals(link.We've got a production environment with SQL Server 2008 R2 using VB. List linkList=taskService.getIdentityLinksForTask(taskId) Throw new TimeException("this task has been finished") TaskEntity task = (TaskEntity) taskService.createTaskQuery().taskId(taskId).singleResult() I have changed the db2 locktimeout to 60 sec according to the comment on Deadlock in DB2 ,but it does't work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |