sql-server

Update SSMS With PS1

1 minute read

Installing and Updating SSMS with a simple PowerShell script can be a nice little timesaver…

Automate Windows Updates for Development

less than 1 minute read

I’ve run into the case where I wanted updates continually applied, while the machine still was part of the GPO that didn’t automatically install updates. For...

Red Gate SQL Clone (#1) - Initial Setup

less than 1 minute read

Note this was during earlier beta usage, so some of the UI and other features will have been updated more. I plan on writing more on this promising tool as ...

Track Creation of Databases

1 minute read

Sys.Databases has some create information, but I was looking for a way to track aging, last access, and if databases got dropped. In a development environmen...

SSMS 2016 - Object Explorer Read Uncommitted

less than 1 minute read

I ran through some directions from others, including the very helpful post from SqlVariant, but I had issues locating the correct keys. For my Windows 10 mac...

Attaching Database Using SMO & Powershell

less than 1 minute read

Steve Jones wrote a great article on using this automation here titled The Demo Setup-Attaching Databases with Powershell. I threw together a completed scrip...

Parallel Powershell for Running SQL

1 minute read

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 mo...

Get Backup History for All Databases in Server

less than 1 minute read

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 ...

Data Compare on Temporal Tables

3 minute read

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...

Centralized Management Server 101

4 minute read

I’ve used Central Management Server registered servers in SSMS for primarily one purpose, saving connections. :-) This is definitely not the intended usage....

Remote Desktop Workflow Improvements

5 minute read

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 pro...

Regex With SQL Server - SQLSharp

2 minute read

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 tabl...

Improvements with SSMS 2016

1 minute read

Improves to SSMS (Sql Server Management Studio) continue. Use the latest version instead of using the version bundled in older versions of SQL Server Install...

SQL Compare 12: Initial Look

1 minute read

I know there have been a few other folks going into more detail on SQL Compare 12 (beta), but I thought I’d share just a few looks at the new design. Looks p...

Cool Tools: Powershell ISE-Steroids

2 minute read

Disclaimer: I have been provided with a free license because I am reviewing. This doesn’t impact my assessment of the tool. I have a passion for finding tool...

TFS Work-Item Fancy Filtering

less than 1 minute read

If you want to create a TFS query that would identify work items that have changed, but were not changed by the person working it, there is a nifty way to do...

Previewing the new SSRS 2016 portal

less than 1 minute read

Ran into an issue with the “Preview New Reporting Portal” link on a fresh install of 2016 giving me a not found error.

Failover all databases to other server

less than 1 minute read

Quick snippet I threw together to help with failing over synchronized databases to the other server in bulk. No way I want to click that darn Fail-over butto...

Calculating Some Max Mirror Stats

less than 1 minute read

This turned out to be quite a challenge. I couldn’t find anything that made this very clean and straight forward to calculate, and in my case I was trying to...

Transaction Logging & Recovery (part 3)

5 minute read

Continuation of some notes regarding the excellent content by Paul Randal in Pluralsight: SQL Server: Logging, Recovery, and the Transaction Log.

Verifying Instant File Initialization

1 minute read

Ran into a few issues verifying instant file initialization. I was trying to ensure that file initialization was enabled, but found out that running the xp_c...

Transaction Logging & Recovery (part 2)

3 minute read

… Continuation of some notes regarding the excellent content by Paul Randal in Pluralsight: SQL Server: Logging, Recovery, and the Transaction Log. Please co...

Model needs exclusive lock

less than 1 minute read

Ran into an issue where a developer was trying to create a database and was denied due to no ability to obtain exclusive lock on model. After verifying with ...

Documenting Your Database with Diagrams

6 minute read

Don’t get too excited. I know you love documentation, and just can’t wait to spend some time digging in to document your database thoroughly. I imagine you p...

Some simple examples of querying xml with sql

less than 1 minute read

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 ...

Enabling Instant File Initialization

less than 1 minute read

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 ...

Restoring a database that doesn’t exist

less than 1 minute read

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 t...

Statistics Parsing

less than 1 minute read

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 frien...

Get Information on Current Traces Running

less than 1 minute read

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...

Generate Random Date With Starting Point

less than 1 minute read

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...

Finding Groups - Consecutive Months

less than 1 minute read

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 ...

Eliminate Overlapping Dates

less than 1 minute read

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...

Scalar functions can be the hidden boogie man

less than 1 minute read

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’...

View computed columns in database

less than 1 minute read

Snippet to quickly view computed column information. You can also view this by doing a “create table” script. This however, was a little cleaner to read and ...

Installing SSMS 2012 all by it’s lonesome

less than 1 minute read

SQL Server Management Studio (SSMS) is not offered as a standalone download on MSDN. Installation requires the user to download the sql server installation p...

dynamic sql and a char crash

1 minute read

Dynamic SQL can be helpful, but a pain to debug. I spent hours today working on figuring out why my simple date comparison in dynamic SQL wasn’t working. Fou...