"so it will rollback my transaction right, according to my SP example above? or not?"I think there is a chance that it may not. My thinking isASP ask SQL to run the SProcThe SProc runs, but takes a long timeASP aborts and gives user "Timeout message"Now, depending on the connection to SQL (synchronous or asycnchronous) SQL may have no means of easily knowing that the connection is dead.I think it it tries to return a recordset to the client it will discover the connection is gone. Maybe when it sends a RETURN value. But if it doesn't have a need to send a recordset then maybe it won't discover, and will NOT rollback the transaction.best way would be to try it:-- DROP TABLE dbo.TEMP_LogRunningQueryIF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[TEMP_SP_LogRunningQuery]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)BEGIN DROP PROCEDURE dbo.TEMP_SP_LogRunningQueryENDGOCREATE PROCEDURE dbo.TEMP_SP_LogRunningQueryASIF NOT EXISTS (SELECT * from dbo.sysobjects WHERE id = object_id(N'[dbo].[TEMP_LogRunningQuery]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)BEGIN CREATE TABLE dbo.TEMP_LogRunningQuery ( PK_ID int identity(1,1) NOT NULL, StartTime datetime NOT NULL, EndTime datetime NULL, PRIMARY KEY ( PK_ID ) )ENDSET NOCOUNT ONDECLARE @PK_ID int -- Store IDENTITY from INSERTINSERT INTO dbo.TEMP_LogRunningQuery( StartTime)SELECT [StartTime] = GetDate()SELECT @PK_ID = scope_identity()WAITFOR DELAY '000:00:05' -- '001:02:03' is 1h 2m 3sUPDATE USET EndTime = GetDate()FROM dbo.TEMP_LogRunningQuery UWHERE PK_ID = @PK_IDGO-- Test rig:exec TEMP_SP_LogRunningQueryGOSELECT * FROM dbo.TEMP_LogRunningQuery ORDER BY PK_ID
Kristen