Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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.

Clean out all bad characters from a string.

I have a customer who is having a problem with a load. He is getting a fair number of bad characters including some unicode characters. The unicode characters in particular are making it so those values won’t go into a varchar column. This isn’t an uncommon problem so when he… Read more

1 comments, 85 reads

Posted in SQLStudies on 25 March 2015

0 to Speaker

Recently the last day to submit a session for the 2015 Pass Summit rolled around. I mention this because I actually submitted a session. This is the first time I’ve ever submitted something for the summit and only the third time I’ve submitted a session anywhere. And no, in neither… Read more

10 comments, 99 reads

Posted in SQLStudies on 23 March 2015

Why not NOLOCK?

Most senior DBAs I’ve met shudder when they hear NOLOCK. Ever wonder why? For the same reason they shudder at shrink, MAXDOP of 1 and even occasionally at UDFs (user defined functions). Because frequently we see cargo cults develop around these technologies. Cases where a group of IT professionals (developers… Read more

4 comments, 173 reads

Posted in SQLStudies on 18 March 2015

There are #temp tables and then there are ##temp tables.

Temporary tables are a common enough thing in T-SQL that most of us have probably used them on a fairly regular basis. What I don’t think a lot of people know is that there are two types of temporary tables.

  • Local Temporary Tables
    SELECT * INTO #LocalTempTable FROM sys.databases
  • Global…

Read more

0 comments, 114 reads

Posted in SQLStudies on 16 March 2015

Using Solutions in SSMS

There are a handful of scripts I use on a regular basis. Adam Mechanic’s (b/t) sp_WhoIsActive, My sp_DBPermissions and sp_SrvPermissions, my script for finding where backups are taken, Paul Brewer’s sp_RestoreGene to name a few. It gets tiresome at best to constantly be looking… Read more

3 comments, 209 reads

Posted in SQLStudies on 11 March 2015

Who’s using that database?

A common problem when trying to alter a database (take it offline, add a filegroup, whatever) is that someone else is in the database and you need to find them and kick them out before you can proceed. Historically I would use sp_who and scroll down the list looking for… Read more

0 comments, 5,700 reads

Posted in SQLStudies on 9 March 2015

I want to blog but …

I don’t know how to get started.

Pretty simple. There are a number of free blogging sites out there. Personally I use WordPress. All you need to do is go to http://www.wordpress.com and sign up for a free space.

I have a blog but setting it up seems like a…

Read more

0 comments, 149 reads

Posted in SQLStudies on 4 March 2015

SQL Judo’s Monthly Challenge – March 2014 – Powershell something

Every month SQL Judo (Russ Thomas) (b/t) challenges us to do his Monthly DBA Challenge. I’ve decided it would be fun (and good practice) to do them. Another major benefit is that it will force me to move out of my normal comfort zone. For… Read more

0 comments, 137 reads

Posted in SQLStudies on 2 March 2015

Using sp_DBPermissions and sp_SrvPermissions v6.0

It’s been a while since I posted an updated to usp_DBPermissions and usp_SrvPermissions. Sorry. I got lazy with my posting.

Changes

sp_SrvPermissions
— V5.5
— 7/22/2014 – Changed strings to unicode
— V6.0
— 10/19/2014 – Add @UserLikeSearch and @IncludeMSShipped parameters.

sp_DBPermissions
— V5.5
— 7/15/2014 – Bunch of changes… Read more

1 comments, 127 reads

Posted in SQLStudies on 25 February 2015

Tales of a DBA fed up with NOLOCK. Part 2

Feb 16, 2015
Dear Diary,
A few weeks back I introduced HAL002 to a database managed by some annoying devs. They were not just putting NOLOCK on almost every query but they had SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED at the beginning of the stored procedures. HAL’s done his job… Read more

6 comments, 6,010 reads

Posted in SQLStudies on 23 February 2015

Test your UPDATEs and DELETEs before you run them

This isn’t so much of a best practice, it comes more under the heading of being careful. Let’s say you have a DELETE statement (or UPDATE) that you need to run. You can certainly put it in a transaction. Run it, test it, then if you’ve made a mistake roll… Read more

10 comments, 1,491 reads

Posted in SQLStudies on 18 February 2015

Tales of a DBA fed up with NOLOCK. Part 1

Nov 12, 2014
Dear Diary,
They asked for help again. Every now and again everything slows down and they see a lot of timeouts. They have tried rebooting the SQL instance and that fixes the problem but it’s only a temporary solution. Of course last time they asked for my… Read more

10 comments, 7,810 reads

Posted in SQLStudies on 16 February 2015

TSQL Tuesday #63 – How do you manage security: Rollup

When I decided on security as my topic for February’s T-SQL Tuesday blog party my thought was that security was a topic everyone would have something to say about as it’s something that touches the lives of every DBA at some level or another. Well it turns out I was… Read more

1 comments, 234 reads

Posted in SQLStudies on 12 February 2015

TSQL Tuesday #63: – DBA Myths: You can’t deny something to a member of db_owner database role

So I’m hosting T-SQL Tuesday this month and decided that since security is something everyone has to deal with it would make a fun topic for this month. I’d actually written this post before I wrote my hosting post for T-SQL Tuesday but it fit so well I couldn’t bring… Read more

7 comments, 6,491 reads

Posted in SQLStudies on 10 February 2015

Dealing with layered function calls

T-SQL is not the best language in the world for formatting strings. It can be done, but typically you are going to end up with lots of function calls. Let’s say I want to output the Rate as a string 5 characters wide padded with 0’s on the left. So… Read more

5 comments, 5,681 reads

Posted in SQLStudies on 5 February 2015

TSQL Tuesday #63 – How do you manage security?

Come on down! You’re the next contestant on T-SQL Tuesday! I’m your host Kenneth Fisher and this month I’d thought we might talk about security. Security is one of those subjects that most DBAs have to deal with regardless of specialty. So as something we all have to work with… Read more

10 comments, 320 reads

Posted in SQLStudies on 3 February 2015

A quick email interview of Pass President Thomas LaRock

Back in December I had the thought that it would be fun to do an email interview with someone. As I thought about it Thomas LaRock (b/t) sounded like a good choice since he has been working in the community for quite a while and is… Read more

2 comments, 5,576 reads

Posted in SQLStudies on 28 January 2015

SQL Judo’s Monthly Challenge – February 2014 – KILL with the DAC

Every month SQL Judo (Russ Thomas) (b/t) challenges us to do his Monthly DBA Challenge. I’ve decided it would be fun (and good practice) to do them. Another major benefit is that it will force me to move out of my normal comfort zone. For… Read more

1 comments, 5,517 reads

Posted in SQLStudies on 26 January 2015

Constraint names, Say NO to the default

Have you ever seen a constraint with a name like PK__TableNam__EA185FBF8FF1529D? It’s kind of funny looking right? I mean it makes no difference in terms of how things run but it does make it a bit of a pain when you need to code with it. Say dropping the… Read more

10 comments, 1,240 reads

Posted in SQLStudies on 21 January 2015

Except and Intersect

EXCEPT and INTERSECT are two uncommon commands. Not that they do anything odd but they aren’t exactly well known in any detail or used very often. I’ve been using them myself a bit recently and thought I would explore.

Per BOL:

EXCEPT returns any distinct values from the left query…

Read more

5 comments, 6,631 reads

Posted in SQLStudies on 19 January 2015

Older posts