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

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, 160 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, 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,422 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

Working with tabs and spaces in SSMS (Day 34)

There are several different options available for working with tabs and spaces in SSMS. In fact, there are enough that I could make several tips out of them. I decided to just keep all the tips together.

Tabs and Spaces options

The first thing that I want to go over… Read more

0 comments, 2,561 reads

Posted in A Discussion of SQL Server-Related Topics on 21 March 2018

Using the Full Screen Mode in SSMS (Day 33)

Do you ever find yourself working on a query and realize that you need just a bit more real estate in the SSMS window? Or perhaps you find that all the toolbars, menus, etc. are cluttering things up? To solve these issues, you can toggle the full screen mode in… Read more

0 comments, 201 reads

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

Using a gMSA with SQL Server

As you already know, SQL Server runs as a service. And services require a service account to run under. While this service account is likely to be a domain service account, it could be an account on the local machine. To follow good security practices you would need to specify… Read more

8 comments, 2,099 reads

Posted in A Discussion of SQL Server-Related Topics on 19 February 2018

Connecting to a SQL Server instance – Back to Basics

Back to the SQL Server Basics with Wayne

Connecting to a SQL Server instance is one of the first things that you will do after installing SQL Server. There are different ways of connecting to the instance. Certain High Availability features offer other ways to connect. In this Back to… Read more

2 comments, 2,466 reads

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

Controlling what appears in the status bar and query tabs (Day 32)

When you run a query in SSMS, you are probably aware that the status bar contains many pieces of information about it. Things like the instance name that you are connected to, the login name used, and a few others. You can see them here:

Likewise, the tab that you… Read more

0 comments, 228 reads

Posted in A Discussion of SQL Server-Related Topics on 1 February 2018

SSMS Activity Monitor (Day 31)

SSMS provides an Activity Monitor, a process that displays various information about what all is going on with the instance. This is available by right-clicking on the server and selecting Activity Monitor, or by selecting the toolbar icon for it.

Either of these options will bring up the Activity Monitor… Read more

1 comments, 313 reads

Posted in A Discussion of SQL Server-Related Topics on 31 January 2018

Reports in SSMS (Day 30)

SSMS has a lot of reports available for you to use. Most of the reports in SSMS are off of either the server node, or the database nodes. Simply right-click the node, and select reports. The server level reports are:

And the database level reports are:

Each of these reports… Read more

0 comments, 223 reads

Posted in A Discussion of SQL Server-Related Topics on 30 January 2018

Presenting with SSMS (Day 29)

If you are presenting with SSMS, then there are some extra steps that you need to take. These steps are all for the purpose of ensuring that everyone (especially those in the back of the room) can clearly see your demo in SSMS. The fonts used in SSMS and a… Read more

1 comments, 222 reads

Posted in A Discussion of SQL Server-Related Topics on 29 January 2018

Saving SSMS Settings (Day 28)

Over the last several weeks, we have been making several changes to various settings in SSMS. Now that you have SSMS configured exactly to your liking, you need to save all of these configuration settings. You know, in case you have to start over with a fresh install. Thankfully, saving… Read more

0 comments, 200 reads

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

Comparing Query Plans (Day 27)

When you are performance tuning code, you will frequently examine the execution plans to see what is happening. As you change the code, you will look at the execution plan again. However, comparing all the changes is troublesome. Fortunately, comparing query plans has become easy in SSMS (starting in 2016).… Read more

1 comments, 247 reads

Posted in A Discussion of SQL Server-Related Topics on 27 January 2018

A month of SSMS

Wayne’s Tips and Tricks for SSMS

SQL Server Management Studio (SSMS ) is a program that many just launch daily (or only when they restart their computer), and they use it to navigate to various SQL Servers to manage them, either through the GUI or through a query. I’ve found… Read more

6 comments, 398 reads

Posted in A Discussion of SQL Server-Related Topics on 26 January 2018

Working with Comments (Day 26)

We all know that we should liberally document our code with comments, so that others (and even yourself) will know what the code is doing down the road. I like to start all of my code off with my classic remark block:

/******************************************************************************
$SELECTIONSTART$Description of code$SELECTIONEND$
*******************************************************************************
                               MODIFICATION LOG
*******************************************************************************…

Read more

5 comments, 231 reads

Posted in A Discussion of SQL Server-Related Topics on 26 January 2018

Using the SSMS Web Browser (Day 25)

One of the things that I do with my code is to include reference links to what I was doing where applicable. SSMS provides us with a way to navigate directly to these web links, instead of having to copy the link and paste it into your browser. All that… Read more

1 comments, 187 reads

Posted in A Discussion of SQL Server-Related Topics on 25 January 2018

Using the SSMS Web Browser (Day 25)

One of the things that I do with my code is to include reference links to what I was doing where applicable. SSMS provides us with a way to navigate directly to these web links, instead of having to copy the link and paste it into your browser. All that… Read more

1 comments, 196 reads

Posted in A Discussion of SQL Server-Related Topics on 25 January 2018

Using Bookmarks to navigate code in SSMS (Day 24)

Bookmarks are used in SSMS to have SSMS remember selected line positions, and to quickly move between the bookmarks. All of the Bookmark functionality is in the Bookmarks submenu, off of the Edit menu:

A bookmark is toggled with the Ctrl+K, Ctrl+K keyboard shortcut, or by using the menu option… Read more

1 comments, 239 reads

Posted in A Discussion of SQL Server-Related Topics on 24 January 2018

Using Bookmarks to navigate code in SSMS (Day 24)

Bookmarks are used in SSMS to have SSMS remember selected line positions, and to quickly move between the bookmarks. All of the Bookmark functionality is in the Bookmarks submenu, off of the Edit menu:

A bookmark is toggled with the Ctrl+K, Ctrl+K keyboard shortcut, or by using the menu option… Read more

1 comments, 219 reads

Posted in A Discussion of SQL Server-Related Topics on 24 January 2018

Older posts