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


My name is Kenneth Fisher and I am Senior DBA for a large (multi-national) insurance company. I have been working with databases for over 20 years starting with Clarion and Foxpro. I’ve been working with SQL Server for 12 years but have only really started “studying” the subject for the last 3. I don’t have any real "specialities" but I enjoy trouble shooting and teaching. Thus far I’ve earned by MCITP Database Administrator 2008, MCTS Database Administrator 2005, and MCTS Database Developer 2008. I’m currently studying for my MCITP Database Developer 2008 and should start in on the 2012 exams next year. My blog is at www.sqlstudies.com.

Windowing without a partition by or an order by

If you’ve never worked with windowing functions they look something like this:

SELECT name, max(create_date) OVER 
		-- No this isn't meant to make sense
		(PARTITION BY lower(left(name,1)) ORDER BY owner_sid)
FROM sys.databases;

The other day someone mentioned that you could use ROW_NUMBER which requires the OVER clause without either the… Read more

0 comments, 93 reads

Posted in SQLStudies on 21 February 2018

The default filegroup, and why you should care.

You know you can have multiple filegroups right? You might have a separate filegroup for the data (the clustered index & heaps) and another for the indexes (non-clustered indexes). Or maybe you want to separate your data tables from the system tables. There are any number of reasons why you… Read more

1 comments, 122 reads

Posted in SQLStudies on 19 February 2018

Synonyms, how and why.

Did you know SQL Server has a thing called a synonym? It’s not something you see used very often even though it’s been around for >10 years (SQL 2005). In fact, I’d be willing to bet that a good chunk of the people reading this have never (or just… Read more

4 comments, 1,047 reads

Posted in SQLStudies on 15 February 2018

Hobbies, stress relief, and meeting management: T-SQL Tuesday #99

It’s T-SQL Tuesday again! And in fact it’s the 99th one! Given that T-SQL Tuesday runs once a month that means that Adam Machanic’s (b/t) brainchild has been running for over 8 years! This month is hosted by none other than Aaron Bertrand (b/ Read more

2 comments, 1,491 reads

Posted in SQLStudies on 13 February 2018

Backups of backups or How long is my backup really available?

I’ve said before that backups are at once one of the easiest things DBAs do, one of the most important, and one of the most complicated. Take a full backup, restore it. Pretty simple right? And yet it’s vital when accident or corruption require recovering data. And as simple as… Read more

1 comments, 1,569 reads

Posted in SQLStudies on 7 February 2018

SQL Homework – February 2018 – Work with security

This month let’s create some security!

  • Create logins: GUI 5 pts/Script 5 pts
    Create a SQL login and a Windows authenticated login. Make sure you can connect to the instance with each. It’s best if you understand the difference.
  • Create users: GUI 5 pts/Script 5 pts
    In a user database…

Read more

0 comments, 145 reads

Posted in SQLStudies on 5 February 2018

The difference between blogging about something you know, and something you are learning (Love blogging! Live!)

Challenge accepted!

The first thing…

Read more

4 comments, 187 reads

Posted in SQLStudies on 31 January 2018

How To: Install SQL Server on an Azure VM

Last month I demonstrated creating an Azure VM with SQL installed using one of the default templates. While this is a very easy way to stand up a SQL Server very quickly there are some downsides. Specifically, you have very few install options. For the most part, you can… Read more

0 comments, 276 reads

Posted in SQLStudies on 29 January 2018

Help it takes forever to open the SQL Server Log!

Just to be very clear, I’m talking about the SQL Server Log, not database logs. Sometimes this is called the Error Log (and in fact the text files containing the data are named ERRORLOG, ERRORLOG.1, etc) although it contains a lot more information than just errors. And just to make… Read more

0 comments, 141 reads

Posted in SQLStudies on 24 January 2018

What’s dbo?

Don’t you hate it how certain words (well, acronyms in this case) get reused to mean multiple things? dbo seems to cause a great deal of confusion because of this.

First, dbo is an acronym standing for DataBase Owner. And there are three common usages for… Read more

2 comments, 1,668 reads

Posted in SQLStudies on 22 January 2018

How to read a technical blog

There are thousands, tens of thousands, probably hundreds of thousands of blogs out there on all sorts of topics. If you do a search on a subject you are likely to get back multiple (if not large multiples) of responses and it can be hard to know what advice is… Read more

4 comments, 156 reads

Posted in SQLStudies on 17 January 2018

Who should own the database?

TL;DR; SA, or if you are really paranoid then you can create a disabled SQL login with minimal permissions and use that.

The database has to be owned by someone, doesn’t it? (FYI, yes it does) So who? How about Bob in accounting. It’s the accounting database. That makes sense… Read more

6 comments, 2,148 reads

Posted in SQLStudies on 15 January 2018

Fun with sp_rename

Currently the only way to rename objects in SQL Server is to use sp_rename. Although that may be changing in the near future. There is a new command RENAME that is specifically for Azure SQL Data Warehouse and Parallel Data Warehouse. With any luck they will migrate that… Read more

0 comments, 139 reads

Posted in SQLStudies on 11 January 2018

A Solution for Squirrely SQL Server Security: TSQL Tuesday #98

It’s the first T-SQL Tuesday of the year! Arun Sirpal (b/t) is our host this month. Thanks, Arun! The subject he has selected is Your Technical Challenges Conquered. This is a particularly hard subject for me. Generally, when I have a problem and come up… Read more

0 comments, 147 reads

Posted in SQLStudies on 9 January 2018

SQL Homework – January 2017 – Inspect an Execution Plan

It’s a new year and yet education never ends. So this month let’s take a look at an important part of performance tuning. The Execution Plan. When a query is run, the optimizer goes through and selects what it feels will be the good enough plan to plan that query.… Read more

6 comments, 2,018 reads

Posted in SQLStudies on 3 January 2018

What is impersonation for?

I was doing some research on impersonation the other day, and among other things, I ran across a forum question Use of IMPERSONATE permissions in SQL Server? I started reading the answer, and it seemed like a pretty good answer, well laid out, decent formatting etc. I was honestly shocked… Read more

2 comments, 473 reads

Posted in SQLStudies on 27 December 2017

Making music with Powershell

Happy holidays everyone! Ok, this isn’t even remotely related to SQL Server but it sounded fun. I found someone playing music using Powershell (I lost the link, sorry) and thought Christmas Music! (Yes, I’m Jewish and I probably should have done The Dreidel Song or something but I didn’t think… Read more

3 comments, 239 reads

Posted in SQLStudies on 20 December 2017

When do usernames and passwords belong in connection strings

tl;dr: When using a windows or active directory authenticated id you do not put the username or password into your connection string.

Quite possibly the most common question I get is “Why won’t my login connect to the database?”. And the most common response? You’re using it wrong.

In… Read more

0 comments, 436 reads

Posted in SQLStudies on 18 December 2017

How to: Create an Azure VM with SQL Server using a default template

One of the really cool things about the cloud is how quickly you can spin up a new machine to work with. In the case of SQL Server professionals we want SQL Server installed on that machine, and the easiest way to get it is to one of the default… Read more

1 comments, 251 reads

Posted in SQLStudies on 14 December 2017

T-SQL Tuesday #97 – Setting learning goals for 2018

T-SQL Tuesday. Each month a different blogger hosts Adam Machanic’s (b/t) blog party. The host comes up with a topic on the first Tuesday of the month, and everyone who want’s to participate blogs on that subject, posting on the second Tuesday of the month. This… Read more

3 comments, 1,274 reads

Posted in SQLStudies on 12 December 2017

Older posts