Click here to monitor SSC
SQLServerCentral is supported by Redgate
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.

Bad Idea Jeans: Query Optimization Through Minification

SQL is pretty verbose compared to some languages. It's a pretty big disappointment that I have to type out select customer from dbo.customers where id = 2 instead of a much simpler syntax like dbo.Customers | Customer like Powershell might offer. As I considered the disappointing verbosity of sql server,… Read more

0 comments, 93 reads

Posted in SQL Barbarian on 23 January 2017

Parallel Powershell for Running SQL

This is just a quick look. I plan on diving into this in the future more, as I'm still working through some of the changes being made in the main parallel modules I utilize for SQL server. In the meantime, if you are looking for a quick way to leverage… Read more

0 comments, 129 reads

Posted in SQL Barbarian on 16 November 2016

Get Backup History for All Databases in Server

Here's a quick snippet to get a listing of the database backups that last occurred on a server. Most solutions provided a single backup listing, but not the brief summary of the last backup details I was looking for.

Read more

0 comments, 164 reads

Posted in SQL Barbarian on 31 October 2016

Data Compare on Temporal Tables

I hadn't seen much talk on doing data comparisons on temporal tables, as they are a new feature. I went through the exercise to compare current to historical to see how Red Gate & Devart handled this. I'm a part of the Friends of Red Gate program, so love checking… Read more

0 comments, 1,253 reads

Posted in SQL Barbarian on 28 October 2016

Fixing Untrusted Foreign Key or Check Constraint

Untrusted constraints can be found when you alter/drop foreign key relationships and then add them back without the proper syntax.

If you are deploying data through several tables, you might want to disable foreign keys on those tables during the deployment to ensure that all the required relationships have a… Read more

0 comments, 170 reads

Posted in SQL Barbarian on 22 October 2016

Easy SQL Maintenance with Minionware

Here's my personal tweaked settings for deploying Minionware's fantastic Reindex & Backup jobs. In the development environment, I wanted to have some scheduled jobs running to provide a safety net, as well ensure updated statistics, but there were a few default settings I wanted to adjust. In particular, I tweaked… Read more

0 comments, 258 reads

Posted in SQL Barbarian on 18 October 2016

Centralized Management Server 101

Registered Servers

I've used Central Management Server registered servers in SSMS for primarily one purpose, saving connections. :-) This is definitely not the intended usage. As I've explored the benefits of using this a little more, I put a few notes together to help share the concepts I came across.… Read more

0 comments, 1,588 reads

Posted in SQL Barbarian on 16 October 2016

Diff All Files - Reviewing Changesets Quickly

If you need to do code comparison on a lot of files in Visual Studio, I ran across an extension Diff All Files that is really helpful for merging down the individual file changes into more consumable format.

Diff all files

In the changeset view you can select diff all… Read more

0 comments, 122 reads

Posted in SQL Barbarian on 12 October 2016

Migrating Database Collation - The Red Gate Way

I had some cross database comparisons that I wanted to simplify, but ensuring the collation matched. The amount of objects that I would have had to drop and recreate was a bit daunting, so I looked for a way to migrate the database to a different collation.

Using the Red… Read more

0 comments, 138 reads

Posted in SQL Barbarian on 10 October 2016

Fixing non-deterministic error when creating indexed view

I discovered a bit of info on working with float values, while creating a hash value that contained a float value, and a date value.

create unique clustered index ix_clustered_ViewK_Catfood_K  
Msg 1901, Level 16, State 1, Line 1517  
Cannot create index or statistics 'ix_clustered_ViewK_Catfood_K' on view 'compareCatfood' because key column…

Read more

0 comments, 227 reads

Posted in SQL Barbarian on 8 October 2016

SQL 2016 - Configuration Manager Not Showing in Start Menu

Didn't see SQL 2016 Configuration manager in the start menu. Ran a quick search to see if this was a common issue and found an article: Quick Trick Where is SQL Server for SQL 2012

I looked and found the SQL Configuration Manager for 2016 in the same location: C:\Windows\System32\SQLServerManager13.msc Read more

0 comments, 1,084 reads

Posted in SQL Barbarian on 21 September 2016

Setting DBCC 1222 on startup

The following command is run to gain details on deadlocks.

 DBCC TRACEON (1222,-1)

However, once the SQL instance is restarted this flag is set back to disabled.

To enable it on the instance upon startup:

  1. Open SQL Configuration Manager
  2. Services > Sql Service Instance > Properties > Startup Parameters
  3. Add…

Read more

0 comments, 1,250 reads

Posted in SQL Barbarian on 19 September 2016

Remote Desktop Workflow Improvements

Remote server management is a fact of life for folks involved with sql server. Since we work so often with remote machines I looked into a few tools that provided a better workflow than the default Microsoft tools. This one came out as the winner by far.

A better remote…

Read more

0 comments, 235 reads

Posted in SQL Barbarian on 29 August 2016

SSMS - Connection Color with SQL Prompt & SSMSBoost

If you haven't explored the visual color coding of tabs based on pattern matches with SQL Prompt, I'd suggest you check this out.

Earlier iterations of Red Gate's SQL Prompt did not change tab color immediately when the connection was changed.

Red Gate's tab color could get out of sync… Read more

0 comments, 287 reads

Posted in SQL Barbarian on 23 August 2016

SQL 2016 - Brief Overview on some new features

SQL 2016 - New Functionality

These are notes taken from the Houston SQL Pass User group from July. This presentation was given by John Cook, (Data Platform Solution Architect Microsoft) who did a great job with limited time on providing some great details on the new functionality with SQL… Read more

0 comments, 550 reads

Posted in SQL Barbarian on 19 August 2016

Install ReadyRoll via Command Line

command line install options

ReadyRoll has some great features, including the ability to use without cost on a build server. If you want to ease setup on multiple build servers you could create a simple command line install step against the EXE.

future changes

ReadyRoll was recently acquired by Redgate,… Read more

0 comments, 788 reads

Posted in SQL Barbarian on 18 August 2016

Does sp_rename on a column preserve the ms_description?

Did some checking as couldn't find help in the MSDN documentation. My test on SQL 2016 shows that since the column_id isn't changing, the existing mapping of the description for the column is preserved.

I know it's probably pretty obvious, but I had someone ask me, so figured proving the… Read more

0 comments, 168 reads

Posted in SQL Barbarian on 15 August 2016

Regex With SQL Server - SQLSharp

In the context of my developer machine, I had log files I wanted to parse through. I setup a log library to output the results on a test server to a sql table instead of text files. However, this meant that my "log viewers" that handled regex parsing weren't in… Read more

0 comments, 1,891 reads

Posted in SQL Barbarian on 11 August 2016

Improvements with SSMS 2016

The staple of every SQL Server developer's world, SSMS has been impossible to usurp for the majority of us. However, it's also been behind the development cycle of visual studio, and didn't have continual updates. That changed recently, as I've previously posted on. SSMS (Sql Server Management Studio) now being… Read more

0 comments, 2,800 reads

Posted in SQL Barbarian on 11 July 2016

Glasswire: (Giveaway Included) Networking Monitoring even a caveman could use

Giveaway details at the bottom for those interested

Dealing with development & sql servers, I like to know what type of network traffic is happening on my machine. What is the overhead of monitoring on network bandwidth, what is communicating across servers or even externally?

What is phoning home?

You… Read more

0 comments, 337 reads

Posted in SQL Barbarian on 1 July 2016

Older posts