We started collecting a count of all VLF across the enterprise and yes there were few with high counts. I know there are no SET guidelines how many is too low or too high. After chatting with MVP Allen Kinsel (Blog|Twitter) and Kevin Conan (Twitter) I decided to fix using this threshold. You will be able adjust these threshold in my script to whatever you deem reasonable.
WHERE ( (vlfcount > 50 AND tLogSizeMB <= 8 * 1024) OR (vlfcount > 200 AND tLogSizeMB BETWEEN 8 * 1024 + 1 AND 36 * 1024)…
While troubleshooting unplanned SQL cluster failover few questions are asked commonly.
All these questions can be answered by this query. You output will depend how frequently you recycle error log and retention of error log.
You can also use this query to look for other items in your error log.
IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'#ERROR') AND TYPE IN (N'U')) BEGIN CREATE TABLE #ERROR ( LogDate DATETIME, ProcessInfo NVARCHAR(255), LogText NVARCHAR(MAX) ) END GO IF NOT EXISTS (SELECT…
Database backup is one of the regular tasks DBA’s perform but few explore all the options that are built in the product. Instead of exploring and using built in switches I noticed DBA’s try writing custom scripts or buying third party tools.
I explored some of the options and was able to do a full backup of 8TB size database under 2.5 hours. I obtained a 30% performance improvement with using non default values for 3 of the switches that come with Backup command.
This will be a quick post about a script to find replication metadata in details. You need to run this in your distributor (where distribution database reside) server and filter in various ways depending on your need. Also modify order by based on what you are looking for.
USE distribution; GO SELECT DISTINCT p.publication , p.publisher_db , SUBSTRING(da.name, 0, CHARINDEX('-', da.name)) AS Source_Server , a.article , a.source_object , s.subscriber_db , REVERSE(SUBSTRING(REVERSE(da.name), CHARINDEX('-', REVERSE(da.name)) + 1, ( ( CHARINDEX('-', REVERSE(da.name), CHARINDEX('-', REVERSE(da.name)) + 1) ) - ( CHARINDEX('-', REVERSE(da.name)) ) - 1 ))) AS Destination_Server ,…
This post will give a practical solution with complete code to monitor SQL server transactional replication latency in real time. My solution assumes you are using common distribution agent. With minor change you can also implement this for independent distribution agent.
This solution is a implementation of Kendra Little’s blog post.
Concept is to create a table with a single row storing current date-time (updated via a sql job every minute). Replicate that data to your subscriber and measure the difference between current time and time-stamp in subscriber table.
Before you run any of these code make sure you read …