Tuesday, 3 July 2012

SQL server versions , packs ,Builds and new patches release dates.

 
SQL Server 2012
11.0.2316
12 Apr 2012
11.0.2100.6
7 Mar 2012
SQL Server 2008 R2
10.50.2811
16 Apr 2012
10.50.2806
22 Feb 2012
10.50.2796
9 Jan 2012
10.50.2789.0
17 Oct 2011
10.50.2772.0
16 Aug 2011
10.50.2769.0
16 Sep 2011
10.50.2500.0
11 Jul 2011
10.50.1815
17 Apr 2012
10.50.1810
21 Feb 2012
10.50.1809
9 Jan 2012
10.50.1807.0
19 Oct 2011
10.50.1804.0
23 Aug 2011
10.50.1797.0
16 Sep 2011
10.50.1777.0
16 Jun 2011
10.50.1765.0
21 Feb 2011
10.50.1753.0
20 Dec 2010
10.50.1746.0
18 Oct 2010
10.50.1734.0
17 Aug 2010
10.50.1720.0
25 Jun 2010
10.50.1702.0
18 May 2010
10.50.1600.1
SQL Server 2008 R2 RTM
12 Apr 2010
SQL Server 2008
10.00.5775
20 Mar 2012
10.00.5770
16 Jan 2012
10.00.5768
22 Nov 2011
10.00.5766
18 Oct 2011
10.00.5500
6 Oct 2011
10.00.4330
19 Mar 2012
10.00.4326
30 Jan 2012
10.00.4323
21 Nov 2011
10.00.4321
20 Sep 2011
10.00.4316
18 Jul 2011
10.00.4285
16 May 2011
10.00.4279
21 Mar 2011
10.00.4272
17 Jan 2011
10.00.4266
15 Nov 2010
10.00.4000
29 Sep 2010
10.00.2850
19 Sep 2011
10.00.2847
18 Jul 2011
10.00.2816
22 Mar 2011
10.00.2812
16 May 2011
10.00.2808
17 Jan 2011
10.00.2804
15 Nov 2010
10.00.2799
21 Sep 2010
10.00.2789
19 Jul 2010
10.00.2775
17 May 2010
10.00.2766
15 Mar 2010
10.00.2757
18 Jan 2010
10.00.2746
24 Nov 2009
10.00.2734
22 Sep 2009
10.00.2723
21 Jul 2009
10.00.2714
18 May 2009
10.00.2710
16 Apr 2009
10.00.2531
7 Apr 2009
10.00.1835
15 Mar 2010
10.00.1828
18 Jan 2009
10.00.1823
16 Nov 2009
10.00.1818
21 Sep 2009
10.00.1812
21 Jul 2009
10.00.1806
18 May 2009
10.00.1798
17 Mar 2009
10.00.1787
19 Jan 2009
10.00.1779
17 Nov 2008
10.00.1763
22 Sep 2008
10.00.1600
SQL Server 2008 RTM
6 Aug 2008
SQL Server 2005
9.00.5266
21 Mar 2011
9.00.5259
22 Feb 2011
9.00.5254
20 Dec 2010
9.00.5000
17 Dec 2010
9.00.4325
21 Mar 2011
9.00.4317
21 Feb 2011
9.00.4315
20 Dec 2010
9.00.4311
18 Oct 2010
9.00.4309
17 Aug 2010
9.00.4305
23 Jun 2010
9.00.4294
19 Apr 2010
9.00.4285
16 Feb 2010
9.00.4273
21 Dec 2009
9.00.4266
19 Oct 2009
9.00.4230
17 Aug 2009
9.00.4226
16 Jun 2009
9.00.4220
21 Apr 2009
9.00.4211
17 Feb 2009
9.00.4207
20 Dec 2008
9.00.4053
13 Oct 2009
9.00.4035
16 Dec 2008
9.00.3356
21 Dec 2009
9.00.3355
19 Oct 2009
9.00.3330
18 Aug 2009
9.00.3328
16 Jun 2009
9.00.3325
21 Apr 2009
9.00.3315
17 Feb 2009
9.00.3310
10 Feb 2009
9.00.3301
SQL Server 2005 SP2 CU11
15 Dec 2008
9.00.3294
20 Oct 2008
9.00.3282
18 Aug 2008
9.00.3257
16 Jun 2008
9.00.3239
14 Apr 2008
9.00.3233
SQL Server 2005 QFE Security Hotfix
8 Jul 2008
9.00.3228
18 Feb 2008
9.00.3215
17 Dec 2007
9.00.3200
15 Oct 2007
9.00.3186
20 Aug 2007
9.00.3175
28 Jun 2007
9.00.3161
SQL Server 2005 SP2 CU1
15 Apr 2007
9.00.3152
7 Mar 2007
9.00.3077
10 Feb 2009
9.00.3054
5 Apr 2007
9.00.3042.01
5 Mar 2007
9.00.3042
SQL Server 2005 SP2
1 Feb 2007
9.00.2047
SQL Server 2005 SP1
9.00.1399
SQL Server 2005 RTM
1 Nov 2005


Wednesday, 16 May 2012

Configuring Deadlock Alert

/* Configuring Deadlock Alert on PRD servers.*/.

 

/* Step 1  -- Enable Trace Flag 1222 to 1 to capture deadlock information  in log files
Note: Trace flag will be reset after every SQL server reset so we need to enable flag after every SQL services restart or configure at startup parameter
*/
/* Step 2 --  Creating an Deadlock Alert and Trigger the Deadlock Job
USE [msdb]
GO

/****** Object:  Alert [DeadLock Alert]    Script Date: 05/16/2012 23:28:16 ******/
EXEC msdb.dbo.sp_add_alert @name=N'DeadLock Alert',
@message_id=0,
@severity=0,
@enabled=1,
@delay_between_responses=0,
@include_event_description_in=1,
@category_name=N'[Uncategorized]',
@performance_condition=N'SQLServer:Locks|Number of Deadlocks/sec|_Total|>|0',
@job_id=N'8a31ce05-3880-4fa4-a020-0263135d0129'
--Job ID needs to be replaced
GO


*/

/* -- Step 3.Create an new job and place an below Query in Job Step*/

/*--Create an temporary table  to capture the data from the log file */
IF OBJECT_ID('tempdb.dbo.ErrorLog') IS Not Null
BEGIN
DROP TABLE tempdb.dbo.ErrorLog
END
CREATE TABLE tempdb.dbo.ErrorLog
(Id int IDENTITY (1, 1) NOT NULL,
logdate DATETIME, procInfo VARCHAR(10),
ERRORLOG VARCHAR(MAX))
/*--Insert the data into errorlog table  from logs using SP_readerrorlog.*/
INSERT INTO tempdb.dbo.ErrorLog
EXEC master.dbo.sp_readerrorlog
/*--Query to execute the alert using DB mail */
BEGIN
DECLARE @servername nvarchar(150)
SET @servername = @@servername
DECLARE @mysubject nvarchar(200)
SET @mysubject = 'Deadlock event notification on server '+@servername+'.'
/* --Use this query in SQl 2000
--IF EXISTS(select logdate, procInfo, ERRORLOG from tempdb.dbo.ErrorLog
where Id >=(select TOP 1 Id from tempdb.dbo.ErrorLog WHERE ERRORLOG Like '%Deadlock encountered%' 
order by Id DESC))
--BEGIN
-- EXEC msdb.dbo.sp_send_dbmail
-- @profile_name ='DB Mail Profile',
-- @recipients='Deadlock@Gmail.com;Perfteam@Gmail.com ',
-- @subject = @mysubject,
-- @body = 'Deadlock has occurred. View attachment to see the deadlock info',
-- @query = 'select logdate, procInfo, ERRORLOG from tempdb.dbo.ErrorLog where Id >= (select TOP 1 Id from tempdb.dbo.ErrorLog WHERE ERRORLOG Like ''%Deadlock encountered%''  order by Id DESC)
  --   and convert(varchar,logdate,112)=convert(varchar,getutcdate(),112)',
-- @query_result_width = 600,
-- @attach_query_result_as_file = 1,
-- @importance='HIGH'

*/

/* Below query is applicable for SQL 2005 higher versions*/
IF EXISTS(
SELECT TOP 1 B.PROCINFO FROM TEMPDB.DBO.ERRORLOG B ,
(SELECT TOP 1 A.LOGDATE, A.PROCINFO FROM TEMPDB.DBO.ERRORLOG A
WHERE A.ERRORLOG LIKE '%Deadlock%' and A.ERRORLOG not like '%EXEC dbo.proc_MSS%'
--AND CONVERT(VARCHAR,A.LOGDATE,112)=CONVERT(VARCHAR,GETUTCDATE(),112)
ORDER BY A.PROCINFO DESC
)A  WHERE B.LOGDATE=A.LOGDATE AND B.PROCINFO=A.PROCINFO
)

/* Above query is used to find the deadlock in the Errolog table if deadlock exists then below DB Mail Script will be execute with captured deadlock information and will send the mail*/
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name ='DB Mail Profile',
@recipients='Deadlock@Gmail.com',
@copy_recipients='Perfteam@slk-soft.com',
@subject = @mysubject,
@body = 'Deadlock has occurred. View attachment to see the deadlock info',
/*Actual Query to get the deadlock information and send the information via mail*/
@query = 'SELECT B.* FROM TEMPDB.DBO.ERRORLOG B ,
(SELECT TOP 1 A.LOGDATE, A.PROCINFO FROM TEMPDB.DBO.ERRORLOG A
WHERE A.ERRORLOG LIKE ''%Deadlock%''
--AND CONVERT(VARCHAR,A.LOGDATE,112)=CONVERT(VARCHAR,GETUTCDATE(),112)
ORDER BY A.PROCINFO DESC
)A
WHERE B.LOGDATE=A.LOGDATE AND B.PROCINFO=A.PROCINFO ORDER BY 1',
@query_result_width = 600,
@attach_query_result_as_file = 1,
@importance='HIGH'

END
END
DROP TABLE tempdb.dbo.ErrorLog