Author Archives: Ishtiaq Ahmed

Update the statistics to all tables in a database WITH FULLSCAN


DECLARE @SQL NVARCHAR (MAX) DECLARE C1 CURSOR FOR SELECT DISTINCT ‘UPDATE STATISTICS [dbo].[‘+o.name +’] WITH FULLSCAN ‘ FROM sys.objects AS o WITH (NOLOCK) INNER JOIN sys.indexes AS i WITH (NOLOCK) ON o.[object_id] = i.[object_id] INNER JOIN sys.stats AS s WITH … Continue reading

Posted in Uncategorized | Leave a comment

Disable All SQL Server Agent Jobs


USE MSDB;GOUPDATE MSDB.dbo.sysjobsSET Enabled = 0WHERE Enabled = 1;GO

Posted in Uncategorized | Leave a comment

SQL SERVER 2014 CTP 1 Installation


Today Microsoft announced the release of SQL SERVER 2014 CTP 1 http://blogs.technet.com/b/dataplatforminsider/archive/2013/06/25/sql-server-2014-public-ctp-now-available.aspx Below is the installation of SQL Server 2014 CTP 1 on windows 2012 standard edition          Note : The SQL 2014 CTP version number : … Continue reading

Posted in SQL SERVER 2014 | Leave a comment

Performance Reads ‘Not Enabled’


When looking at the performance monitor under the column ‘Performance’, the message ‘Not Enabled’ is indicated instead of the typical message of ‘Excellent’, ‘Poor’, or ‘Critical’.  This simply means that the threshold for this agent is not enabled and needs … Continue reading

Posted in Replication | Leave a comment

The process could not connect to Subscriber ‘ServerName’


When the message displays that it cannot connect to the subscriber, it is commonly because of the following reasons: The subscribing server is busy The subscribing server is down The authentication is failing Before correcting the problem, verify if the … Continue reading

Posted in Replication | Leave a comment

Transaction was deadlocked on lock resources : Transaction (Process ID #) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction


It is uncertain how the deadlocks occur, but it may be application related or due to too many processes running concurrently.  To avoid this, all the lookup tables are scheduled to execute every hour.  The specific deadlock error message that … Continue reading

Posted in Replication | 1 Comment

Inactive Subscription: The subscription(s) have been marked inactive and must be reinitialized. NoSync subscriptions will need to be dropped and recreated


When looking at the replication monitor, a message may appear under the ‘status’ column of the subscription watch tab that displays the message ‘not running/ inactive subscription’ “The subscription(s) have been marked inactive and must be reinitialized. NoSync subscriptions will … Continue reading

Posted in Replication | Leave a comment