Click here to monitor SSC
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.

Certificates, Proxies and Jobs! Oh My!

Oh Noes! I have a job that requires me to run an SSIS package, cmdshell script, etc. And I need them to have specific file level permissions! What do I do! I know I need to run my job/job step as a specific AD/Windows user but I don’t see how… Read more

0 comments, 278 reads

Posted in SQLStudies on 27 April 2016

Get your SQL Server MCSA without taking the BI exam.

I’m a big fan of certifications as a training exercise. However not everyone has the same interests. With the new MCSA (well new 6-8 years ago) we were required to take the data exam (70-461), the admin exam (70-462) AND the BI exam (70-463). I know a number… Read more

2 comments, 151 reads

Posted in SQLStudies on 25 April 2016

Why my primary test environment is case sensitive.

Me: I think I’m going create a new playground instance.
Myself: Make sure you use a case sensitive (CS) collation when you install it!
I: You mean a collation that forces us to pay attention to the case of the variable names (for example)? So that something like this returns… Read more

0 comments, 120 reads

Posted in SQLStudies on 20 April 2016

How do I rename a column?

Everyone makes mistakes right? And sometimes you create an object and decide later that you messed up and need to rename it.

EXEC sp_rename 'OldName','NewName'

This works for tables, stored procedures, views etc, but there are a few things to be careful about. It doesn’t change the code behind code… Read more

2 comments, 130 reads

Posted in SQLStudies on 18 April 2016

Modulo!

I love this somewhat obscure mathematical operator. All it does is return the remainder of a division statement but even though it’s pretty basic most people I talk to have never heard of it. The format is

dividend % divisor = remainder

DECLARE @remainder INT
DECLARE @dividend INT = 10…

Read more

5 comments, 116 reads

Posted in SQLStudies on 14 April 2016

The risks of Delayed Durability

It’s T-SQL Tuesday again and this month we are hosted by Jens Vestergaard (b/t) who want’s us to talk about our favorite SQL Server feature. Great topic, but a really difficult choice. There are so many great features of SQL Server.
Some of my favorites include: Read more

0 comments, 793 reads

Posted in SQLStudies on 12 April 2016

Name the schema when you create an object (or else)

This is one of those frequently ignored best practices.

When you create an object, specify the schema where it will be created.

I should also point out

When you reference an object (in a query for example), specify it’s schema.

I know I have a tendency to forget this myself.… Read more

1 comments, 132 reads

Posted in SQLStudies on 6 April 2016

Complex/Conditional ORDER BYs

Typically it’s considered best to run your queries without an ORDER BY and let the application do any sorting needed. Sometimes though it’s faster and easier to let SQL handle the sorting for you. And that’s fine. SQL is very good at sorting.

Simple sorts are pretty easy. In the… Read more

1 comments, 161 reads

Posted in SQLStudies on 4 April 2016

Hidden code in AdventureWorks

I’ve playing around with AdventureWorks and managed to found some hidden code! Truly odd stuff. I’m so shocked I couldn’t wait until the time I usually post.

So if you take the x character of the first character column of each table (where x is object_id % len(column) ), merge… Read more

4 comments, 169 reads

Posted in SQLStudies on 1 April 2016

When should I test?

To test or not to test. That is the question. Or is it? Shouldn’t we always test? That was the question posted here. It’s a big question so let’s break it down a bit.

Upgrades

You have a system and are about to upgrade some or all of it.… Read more

1 comments, 136 reads

Posted in SQLStudies on 30 March 2016

Why you shouldn’t use SELECT *

I answered an interesting question on SE today (ever notice how many posts come from stuff I read on forums?) and I was pleased with how the answer turned out. In particular one piece (expanded a bit) seemed like it would make a good blog post.

To start with here… Read more

1 comments, 129 reads

Posted in SQLStudies on 28 March 2016

I’m presenting for the Pass Security Virtual Chapter!

Tomorrow (3/24/2016) at noon CT I’ll be presenting my SQL Server Security Basics session for the Pass Security Virtual Chapter. If you are interested in SQL Server database security and have little to no experience with it then this is the session for you! Heck even if you do… Read more

1 comments, 130 reads

Posted in SQLStudies on 23 March 2016

TOP 1 killed my performance; Rob Farley helped me resurrect it.

tl;dr; There is no short version of this. It’s LONG. It’s interesting but you might want to skip it if you are in a hurry. If you have the time however, it’s a great walk through of tuning a query.

I had a great time today. I was handed a… Read more

10 comments, 3,510 reads

Posted in SQLStudies on 21 March 2016

What permissions do I need?

Ever wondered how to tell what permissions are required to run a statement or perform a task? Well, sometimes it can be a little confusing to be honest. Most of the time though it’s all there in front of you in black and white.

Where you might ask? Books on… Read more

0 comments, 153 reads

Posted in SQLStudies on 16 March 2016

Pulling data from a non-clustered index

This is one of those things that I found very interesting but figured I’d probably never really use. Of course then I needed it recently and it came in quite handy.

A while back Steve Stedman (b/t) started the database corruption challange. In the very… Read more

1 comments, 137 reads

Posted in SQLStudies on 14 March 2016

You don’t need to be a sysadmin

Hey, I need sysadmin access to ServerA.

Ok. Why do you need sysadmin?

Well I need to be able to read and write to all of the tables on DatabaseA.

No problem. I’m going to add you to the db_datareader and db_datawriter roles on DatabaseA. Done.
So, why do you… Read more

10 comments, 1,767 reads

Posted in SQLStudies on 10 March 2016

Ever wonder what that goofy query in the header means?

It’s T-SQL Tuesday time again (Number 76!) and this month we are hosted by Bob Pusateri (b/t) who has invited us to talk about Text. Text. What an interesting subject. So much of our jobs is all about searching for and manipulating text.

When I… Read more

4 comments, 795 reads

Posted in SQLStudies on 8 March 2016

How do I grant someone the ability to create a stored procedure?

The question of How to grant the ability to create/alter stored procedures and views came up today on dba.stackexchange.com. It’s actually a question I’ve pondered in the past. There are two major methods to do this.

The Scalpel

If you’ve looked at the permissions available in SQL Server you’ll have… Read more

1 comments, 1,741 reads

Posted in SQLStudies on 2 March 2016

Blogger questions: How often should I blog?

What with the #sqlnewblogger effort we’ve been seeing a lot of new bloggers (and some old ones starting up again) and there is one thing that seems to come up over and over again.

How often should I blog?

Let’s start with how often I blog. I post twice a… Read more

9 comments, 515 reads

Posted in SQLStudies on 29 February 2016

Powershell script to create multiple SQL Server Connections

As with most of these types of things, I had a need. I want to show how using sys.dm_exec_[requests/sessions/connections] is better than sp_who. Particularly when you have a large number of connections. Well in order to do that I need a large number of… Read more

1 comments, 247 reads

Posted in SQLStudies on 24 February 2016

Older posts