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

T-SQL Tuesday #110 – Automate All the Things

Automate All the Things

I had a strange thing happen to me this week. My IFTTT applet that sends me an email notification of a new T-SQL Tuesday announcement post didn’t send that email until yesterday. That applet is just one example of things that I use to “Automate All… Read more

5 comments, 94 reads

Posted in A Discussion of SQL Server-Related Topics on 8 January 2019

TSQL-Tuesday #109 – Influence Somebody

Influence Somebody

Ahh, December. What a wonderful time. Snow all around (many along the eastern seaboard of the United States were hit Sunday by a snowstorm… I had 7″ of that wonderful white flakey stuff myself). There’s a holiday for everyone, whether it’s Christmas, Hanukkah, Kwanzaa, Boxing Day, or… Read more

0 comments, 117 reads

Posted in A Discussion of SQL Server-Related Topics on 12 December 2018

Advent of Code 2018 – Day 6 (Chronal Coordinates)

Next,  Advent of Code 2018 – Day 6

As I explained in a recent post, I’m participating in this year’s Advent of Code challenge, with the twist of doing the challenges in T-SQL. In case you don’t know what “Advent of Code” is, Eric Wastl (t) created it… Read more

0 comments, 185 reads

Posted in A Discussion of SQL Server-Related Topics on 7 December 2018

Advent of Code 2018 – Day 3 (Slicing)

Advent of Code 2018 – Day 3

As I explained in a recent post, I’m participating in this year’s Advent of Code challenge, with the twist of doing the challenges in T-SQL. In case you don’t know what “Advent of Code” is, Eric Wastl (t) created it for… Read more

0 comments, 168 reads

Posted in A Discussion of SQL Server-Related Topics on 6 December 2018

Advent of Code 2018 – Day 5 (Alchemical Reduction)

Advent of Code 2018 – Day 5

As I explained in a recent post, I’m participating in this year’s Advent of Code challenge, with the twist of doing the challenges in T-SQL. In case you don’t know what “Advent of Code” is, Eric Wastl (t) created it for… Read more

0 comments, 790 reads

Posted in A Discussion of SQL Server-Related Topics on 5 December 2018

Advent of Code 2018 – Day 4 (Repose Record)

Advent of Code 2018 – Day 4

As I explained in a recent post, I’m participating in this year’s Advent of Code challenge, with the twist of doing the challenges in T-SQL. In case you don’t know what “Advent of Code” is, Eric Wastl (t) created it for… Read more

0 comments, 2,319 reads

Posted in A Discussion of SQL Server-Related Topics on 5 December 2018

Advent of Code 2018 – Day 2 (Inventory Management)

Advent of Code 2018 – Day 2

As I explained in yesterday’s post, I’m participating in this year’s Advent of Code challenge, with the twist of doing the challenges in T-SQL. In case you don’t know what “Advent of Code” is, Eric Wastl (t) created it for the… Read more

0 comments, 1,742 reads

Posted in A Discussion of SQL Server-Related Topics on 4 December 2018

Advent of Code 2018 – Day 1 (Chronal Calibration)

Advent of Code

This guy by the name of Eric Wastl (t) created this neat web site called “Advent of Code“. It’s a… well, let’s let Eric describe it:

Advent of Code is a series of small programming puzzles for a variety of skill levels. They…

Read more

0 comments, 237 reads

Posted in A Discussion of SQL Server-Related Topics on 3 December 2018

What were you thinking (hidden relationship)???

What were you thinking?

Have you ever been working on some code from another person, and you end up scratching your head wondering “What were you thinking”? Maybe even thinking this with some “#$%^&*” thrown in? I recently ran into a hidden relationship that made me do exactly this.

Hidden…

Read more

5 comments, 2,128 reads

Posted in A Discussion of SQL Server-Related Topics on 20 November 2018

Speakers wanted for Richmond (VA) SQL Server Users Group – 2019

The Richmond SQL Server User Group, located in Richmond, VA, is looking for speakers for the 2019 calendar year. Due to limited bandwidth at our venue, we prefer in-person presenters.

We currently have openings for the following dates (meetings start at 6:30pm):

January 10, 2019
February 14, 2019
May 9,… Read more

0 comments, 594 reads

Posted in A Discussion of SQL Server-Related Topics on 8 November 2018

TSQL Tuesday #105: WrapUp

When I hosted this past TSQL-Tuesday, I fully expected to have the wrap-up done a few days later. Lots of personal things interfered, and I’m just getting to it now. Sorry for the delay.

I asked for the topic to be on:

Tell me about a time when you…

Read more

1 comments, 178 reads

Posted in A Discussion of SQL Server-Related Topics on 28 August 2018

T-SQL Tuesday #105 Invitation: Brick Wall

It’s time for another T-SQL Tuesday. The brainchild of Adam Machanic (b|l|t), and designed to strengthen the SQL Server blogging community, T-SQL Tuesday gets a lot of bloggers posting about a specific theme, chosen by the host blogger (today, that’s me).

I signed up… Read more

10 comments, 304 reads

Posted in A Discussion of SQL Server-Related Topics on 7 August 2018

Does a Primary Key always have stats_id 1?

Back to the SQL Server Basics with Wayne

The Myth

I recently was attending a presentation where the presenter stated that the statistic with stats_id = 1 is always for the primary key (PK). The presenter made this statement based on the behavior that he has seen. However, is it… Read more

2 comments, 2,292 reads

Posted in A Discussion of SQL Server-Related Topics on 28 June 2018

SSMS reset window layout (Day 37)

SSMS is a wonderful tool. You can drag Windows around, grouped with others, split, docked, undocked, hidden… it seems endless what you can do with them. You can even change what columns you see. Invariably, with all of this customization, things go wonky. I’ve even seen windows opened up… Read more

0 comments, 2,522 reads

Posted in A Discussion of SQL Server-Related Topics on 20 June 2018

New blogger: Jamie Wick

New SQL blogger

Jamie at the 45th Parallel (South) – New Zealand

This post is just a quick shout-out. My friend and co-leader of the Richmond SQL Server User Group, Jamie Wick, has started blogging. You can catch all of the action at his blog. He has some… Read more

0 comments, 280 reads

Posted in A Discussion of SQL Server-Related Topics on 15 June 2018

Removing the time element from a datetime

Killing Time – or removing the time element from a datetime

Over the course of time, we all collect scripts and routines for helping us do our job. Recently, I ran across two routines that are removing the time element from a datetime data type that I hadn’t seen before.… Read more

3 comments, 1,743 reads

Posted in A Discussion of SQL Server-Related Topics on 7 June 2018

Removing servers from the SSMS connection dialog (Day 36)

One of the things that you will no doubt end up experiencing as a DBA is that you will see new SQL Server instances come into existence. Going right along with this is that you will see old instances die off. However, they don’t just disappear from the SSMS connection… Read more

1 comments, 598 reads

Posted in A Discussion of SQL Server-Related Topics on 16 May 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, 955 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

5 comments, 1,757 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

4 comments, 449 reads

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

Older posts