-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Archives: April 2018

SSMS: Batch Separator (Day 35)

SSMS (and other SQL Server utilities) utilize a batch separator to, well, separate batches of T-SQL statements. Before we go jump into batch separators, let’s first talk about what a batch is.

Batch

Microsoft explains exactly what a batch is at this link:

A batch is a group of…

Read more

0 comments, 241 reads

Posted in A Discussion of SQL Server-Related Topics on 18 April 2018

Checking for temporary table existence

Database Code Smells

I was recently reviewing a newly created T-SQL stored procedure. This procedure was verifying temporary table existence with the following code:

IF exists (select * from tempdb..sysobjects where name like '#fg%')
DROP TABLE #fg

Seeing this takes me back to one of my favorite presentations, where I… Read more

3 comments, 1,423 reads

Posted in A Discussion of SQL Server-Related Topics on 11 April 2018

Primary Replica Jobs

This post talks about having primary replica jobs. That is, jobs that will only run on the primary replica of an availability group.

Overview

An Availability Group (AG) takes one or more databases, and copies all changes to those databases from the primary replica to all the secondary replicas. However,… Read more

0 comments, 206 reads

Posted in A Discussion of SQL Server-Related Topics on 2 April 2018