Merge Statement to perform insert , update and delete in one statement

This example, demonstrate how to perform insert, update and delete on single statement using MERGE. If you are a Database Developer/BI expert, you would need to refresh the target table to match the source tables periodically. Prior to SQL Server 2008, you would need to perform this task by writing separate T-SQL logic for insert, deleteContinue reading “Merge Statement to perform insert , update and delete in one statement”

Tempdb Enhancements in SQL Server 2016

Tempdb Trace Flags 1117 and 1118 are no longer needed in SQL Server 2016. 1117 flag is controlled by the AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES option of ALTER DATABASE and 1118 flag is controlled by the SET MIXED_PAGE_ALLOCATION option of ALTER DATABASE. What are these Trace Flags TRACE FLAG 1117 – GROW ALL FILES IN A FILE GROUPContinue reading “Tempdb Enhancements in SQL Server 2016”

Powershell Script to Backup the file system folders/files to Azure blob storage

One of the requirement from the customer was backup the important application files to azure blob storage and delete the backups older than 7 days. I have written a below script to automate the task.   Hope you enjoyed the post! Cheers Ramasankar Molleti LinkedIn: LinkedIn Profile Twitter: Twitter

Fix – Availability Group Listener Failed with the message WSFC could not bring the network name resource

One of the common issue I and my team have encountered several times when we setup availability group listener in SQL Server as below Msg 19471, Level 16, State 0, Line 2 The WSFC cluster could not bring the Network Name resource with DNS name ‘<DNS name>’ online. The DNS name may have been takenContinue reading “Fix – Availability Group Listener Failed with the message WSFC could not bring the network name resource”

How To Change SQL Server Instance Collation After Installation

Last week one of the support team member contacted me for help how to change the collation without re-installing sql server. Team has installed and configured sql server but forgot to change the collation as per the customer application needs. Good thing about this , it was a brand new install Here is how we canContinue reading “How To Change SQL Server Instance Collation After Installation”