Not sure about ways to find processes that may have failed in the past if you weren't running profiler / trace at the time. Maybe there is a database report? Not too familiar with 2008.As to finding out what's happening now:EXEC sp_who2 still works on SQL SERVER 2008If you want to see the sql texts there a ton of scripts / stored procs out there. Here's the one that I cobbled together. This was written for 2005 but it still works on 2008 though there may be better ways using system views: If you run the stored proc with no paramaters you'll get all activity on the server. If you pass it a database name you'll only get activity for that database. Ignore the targetTable field -- it probably won't be useful for you./****** Object: StoredProcedure [dbo].[CG_spWho] Script Date: 01/28/2010 09:16:35 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[CG_spWho] @dbName VARCHAR(255) = NULL , @targetTable VARCHAR(512) = NULLAS BEGIN SET NOCOUNT ON IF OBJECT_ID('tempdb..#spwho') IS NOT NULL DROP TABLE #spwho CREATE TABLE #spWho ( [SPID] INT NOT NULL , [Status] VARCHAR (255) NOT NULL , [Login] VARCHAR (255) NOT NULL , [HostName] VARCHAR (255) NOT NULL , [BlkBy] VARCHAR(10) NOT NULL , [DBName] VARCHAR (255) NULL , [Command] VARCHAR (255) NOT NULL , [CPUTime] INT NOT NULL , [DiskIO] INT NOT NULL , [LastBatch] VARCHAR (255) NOT NULL , [ProgramName] VARCHAR (255) NOT NULL , [SPID2] INT NOT NULL , [REQUESTID] INT NOT NULL DEFAULT 0 ) INSERT INTO #spWho EXEC sp_who2 IF @targetTable IS NULL SELECT sw.[dbname] , sw.[spid] , sw.[status] , sw.[login] , sw.[blkBy] , sw.[command] , sw.[CPUTime] , sw.[diskIO] , sw.[lastBatch] , sw.[programName] , t.[text] AS [Sql Text] FROM #spWho sw JOIN master.dbo.sysprocesses sp ON sp.[spid] = sw.[spid] CROSS APPLY fn_get_sql(sp.[sql_handle]) t WHERE ( [DBName] LIKE @dbName OR @dbName IS NULL ) ORDER BY sw.[blkBy] DESC , sw.[dbName] ASC ELSE BEGIN DECLARE @sql NVARCHAR(MAX) SET @sql = N' INSERT INTO ' + @targetTable + ' SELECT sw.[dbname] , sw.[spid] , sw.[status] , sw.[login] , sw.[blkBy] , sw.[command] , sw.[CPUTime] , sw.[diskIO] , sw.[lastBatch] , sw.[programName] , t.[text] AS [Sql Text] FROM #spWho sw JOIN master.dbo.sysprocesses sp ON sp.[spid] = sw.[spid] CROSS APPLY fn_get_sql(sp.[sql_handle]) t WHERE ( [DBName] LIKE @dbName OR @dbName IS NULL )' EXEC sp_executeSql @sql, N'@dbName VARCHAR(255)', @dbName END IF OBJECT_ID('tempdb..#spwho') IS NOT NULL DROP TABLE #spwhoEND
Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION