Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

SQL Barbarian

After working in the mortgage industry for 7 years, I transitioned into Business Intelligence and began learning SQL and .NET. My goal is to integrate my business knowledge into my development to intelligently analyze and find solutions to problems. Blogging offers me an option to share what I've learned as well as receive feedback on better practices and solutions.

Download SSMS 2015 as a standalone download.... finally!

I'm excited to see the future of Sql server management studio with release of SQL Management Studio 2015 Preview.

Two of the points made on the website look very promising:

New SSMS Installer - SSMS can now be installed with a light weight stand-alone web installer.

SSMS Updates -…

Read more

0 comments, 126 reads

Posted in SQL Barbarian on 30 June 2015

Some simple examples of querying xml with sql

XML is a beast if you've never tackled it. Here are some simple examples of what I discovered as I experimented and walked through obtaining values out of a XML column.

Read more

0 comments, 2,033 reads

Posted in SQL Barbarian on 24 June 2015

Enabling Instant File Initialization

Found a couple good walkthroughs on enabling instant file initialization. However, I'm becoming more familar with the nuances of various setups and found it confusing in trying to map the correct user/group to enable this option.

In my case, I had the SQL Service running under NT SERVICE/MSSSQLSERVER and as… Read more

0 comments, 134 reads

Posted in SQL Barbarian on 1 June 2015

Upgrade from SQL 2014 Evaluation to Developer Edition

Couldn't find documentation showing that upgrade from SQL 2014 evaluation version was possible to developer edition. I just successfully converted an evaluation version to developer edition.

  1. Obtain the key for the developer edition (in my case I had to download the .ISO from MSDN downloads, and go through the installation…

Read more

0 comments, 161 reads

Posted in SQL Barbarian on 4 May 2015

Utilizing the power of table parameters to reduce IO, improve performance, decrease pollution, and achieve world peace...

I was dealing with a challenging dynamic sql procedure that allowed a .NET app to pass in a list of columns and a view name, and it would generate a select statement from this view. Due to requirements at the time, I needed the flexibility of the "MAIN" proc which… Read more

0 comments, 499 reads

Posted in SQL Barbarian on 30 April 2015

Restoring a database that doesn't exist

When restoring a database that doesn't exist, say for instance when a client sends a database to you, you can't use the option to restore database, because there is no database matching to restore. To get around this you need to use the Restore Files and Filegroups option and then… Read more

0 comments, 138 reads

Posted in SQL Barbarian on 28 April 2015

SQL Sentry Pro Explorer is worth it...

UPDATE: 2015-04-28 15:49
- I created a few autohotkey scripts and solved the problem of collapsing panes and a few other annoyances. This has improved my experince a little. - Also noted one major improvement that would help with tuning is aggregating the total IO, and stats, rather than only… Read more

0 comments, 225 reads

Posted in SQL Barbarian on 22 April 2015

Statistics Parsing

Never really enjoyed reading through the statistics IO results, as it makes it hard to easily guage total impact when you have a long list of tables.

A friend referred me to:

This site is great! However, I really don't like manually copying and pasting the results each time.… Read more

0 comments, 6,264 reads

Posted in SQL Barbarian on 21 January 2015

Dev Tools: FARR2 Launching groups of files or apps at once

There are probably a common number of apps you pull up when you pull up your system. For example, I pull up my Trello board, outlook, XYplorer, Sublime text 3, Sql server management studio, and ketarin (app updater).

Found that you can easily setup a simply alias and launch a… Read more

0 comments, 311 reads

Posted in SQL Barbarian on 16 January 2015

Dev Tools: The File Searcher/Launcher to rule them all

Why does this not have more recognition? In the experimentation of various file management and launching apps, I've tried several (Launchy, Listary, etc), but none have offered the speed and customization of Find and Run Robot. This app is a life saver for the power user!

Here is an example… Read more

0 comments, 226 reads

Posted in SQL Barbarian on 13 January 2015

"OR" pattern causing indexing scans in parameter based queries

#Tl;dr article (time constraints prevented me from reworking significantly)

An article on SQL-Server-pro was forwarded over to me to research by a friend who indicated that using a variable with an or pattern had historically caused table scans. This was a suprise to me as all previous queries with optional… Read more

0 comments, 7,109 reads

Posted in SQL Barbarian on 5 January 2015

Case of the Mondays... causing me to randomly redefine the Scope of Global temp tables

Today, I was reminded that global temp tables scope lasts for the session, and doesn't last beyond that. The difference is the scope of the global temp allows access by other users and sessions while it exists, and is not limited in scope to just the calling session.

For some… Read more

0 comments, 427 reads

Posted in SQL Barbarian on 5 January 2015

Dev Tools: XYplorer (review #1) - Catalog.1

currently on version 14.60

I'm a big fan of finding tools that help automate and streamline things that should are routine actions.

Suprisingly, I've found it incredibly challenging to move away from the default Windows Explorer for file management, as the familarity it offers makes it somewhat tough to be… Read more

0 comments, 600 reads

Posted in SQL Barbarian on 24 December 2014

Get Information on Current Traces Running

This is just a quick informational query to save as a snippet to get some quick information on running traces, and provide the stop and close snippet quickly if you want to stop a server side trace you created.

Read more

0 comments, 643 reads

Posted in SQL Barbarian on 2 December 2014

Eliminate Overlapping Dates

I was looking for an efficient way to eliminate overlapping days when provided with a historical table that provided events that could overlap. In my case, I had dates show the range of a process. However, the multiple start and end dates could overlap, and even run concurrently. To eliminate… Read more

0 comments, 315 reads

Posted in SQL Barbarian on 16 October 2014

Snippet Alert: Useful dates (eom, bom, etc)

Common date values you may need to reference that you may not want to write from scratch each time.

Hope this helps someone else! Read more

0 comments, 353 reads

Posted in SQL Barbarian on 12 August 2014

Generate Random Date With Starting Point

If you want to create sample random samples when dealing with date calculations to test your results, you can easily create a start and end point of randomly created dates.

This is a snippet I've saved for reuse:


DATEADD(day, (ABS(CHECKSUM(NEWID())) % $Days Seed Value$), '$MinDate$')  

This should let you… Read more

0 comments, 204 reads

Posted in SQL Barbarian on 12 August 2014

Finding Groups - Consecutive Months

A step by step explanation on one way to get a consecutive period of months, which could easily be adapted to days, years, or other values.

I'll continue on this track and post a tutorial on eliminating overlapping dates soon.

Read more

0 comments, 253 reads

Posted in SQL Barbarian on 19 May 2014

Scalar functions can be the hidden boogie man

Ran across a comment the other day that scalar functions prohibit parallelism for a query when included. I thought it would be worth taking a look, but didn’t take it 100% seriously.

Came across the same indication today when reviewing MVP deep dives, so I put it to the test.… Read more

0 comments, 283 reads

Posted in SQL Barbarian on 11 February 2014

Renaming all references inside stored procedures and functions can be migraine worthy without a little help…

If you run across migrating or copying a database structure for some purpose, yet need to change the database references or some other string value inside all the procedures and functions to point to the newly named object, you are in for a lot of work!

I built this procedure… Read more

0 comments, 653 reads

Posted in SQL Barbarian on 13 August 2013

Older posts