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

SQLStudies

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.

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

0 comments, 83 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, 120 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

2 comments, 136 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, 115 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, 110 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, 1,900 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, 428 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, 190 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, 398 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

0 comments, 225 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,208 reads

Posted in SQLStudies on 12 December 2017

Restrict the usage of a SQL Server Authenticated Application Id

SQL Server login ids may not be the most secure thing in the world but they are likely to be around for quite a while and one of the more common uses of them is as an application id. An application uses a SQL Server id to connect to SQL… Read more

1 comments, 1,263 reads

Posted in SQLStudies on 6 December 2017

SQL Homework – December 2017 – View the log

Last homework of the year. Last month was to create a view. This month it’s time to take a look in the log! No, not the transaction log. The SQL Server Log. Where error events, backup events, startup events etc, etc get stored. If something goes wrong on your… Read more

0 comments, 154 reads

Posted in SQLStudies on 4 December 2017

SQL Puzzle – Word Scrambler

I’ve been writing crosswords for the last few months and to change things up I thought I would do a word scramble. Well, step one was to create a function that would scramble the words for me. Below is my attempt at creating a word scrambler. Your task (should you… Read more

2 comments, 215 reads

Posted in SQLStudies on 29 November 2017

Closing all of the connections to a database

Doing a database restore may not be the most common task a database professional will ever do, but it’s a lot more frequent than you might think. Operational restores are not exactly uncommon for example. Now, when you are doing a recovery like this, what is common is that there… Read more

3 comments, 1,984 reads

Posted in SQLStudies on 27 November 2017

Why shouldn’t I shrink my database data file?

A while back I did a post about why you shouldn’t shrink your data file. This one is going to be similar in some ways, different in others.

TL;DR: It’s pretty pointless and will almost certainly cause performance issues.

Let’s start by asking why you might want to shrink… Read more

2 comments, 208 reads

Posted in SQLStudies on 20 November 2017

Variables in Dynamic SQL

I had someone ask me about this the other day. Specifically getting variable data out of a dynamic SQL statement. I should point out here that I really enjoy dynamic SQL. I find it fairly intuitive and always enjoy the challenge, so I’ve gotten pretty good at it. So I… Read more

0 comments, 930 reads

Posted in SQLStudies on 16 November 2017

It takes a village

Ewald Cress (b/t) is our host this month for Adam Machanic’s (b/t) monthly blog party T-SQL Tuesday. Having just gotten back from the exaustion of PASS Summit he felt that a less technical subject but one more community related was in… Read more

1 comments, 145 reads

Posted in SQLStudies on 14 November 2017

More Collation Confusion. (tempdb)

I’ve talked about Collation Confusion before. We had the dev and test instances at one collation and the production instance was another collation. Wow, was that a headache.

Well, we had a similar issue recently. This time we had a vendor reporting the following error:

Msg 207, Level 16, State… Read more

1 comments, 191 reads

Posted in SQLStudies on 8 November 2017

DBA Definitions: FILLFACTOR

It was recently brought to my attention that not everyone knows everything. This was a shock. Everyone is born knowing the basics though right? Right??

I was sure everyone at least knew what FILLFACTOR is. But based on some rumors I’ve been hearing, it seems not.

What exactly is FILLFACTOR?… Read more

1 comments, 283 reads

Posted in SQLStudies on 6 November 2017

Older posts