Programming

Here is a situation I just came across (boiled down and simplified).  An end user was having to manually find a user id, navigate to an image folder, and then search through hundreds of images to find the one corresponding with that user.  Sure, they were in numerical order, but still,...

More
  • 2016-08-04

This is perhaps my most commonly used query when troubleshooting. From SQL Server DMV’s in action ebook. The output shows the spid (process identifier), the ecid (this is similar to a thread within the same spid and is useful for identifying queries running in parallel), the database name, the user...

More
  • 2016-08-04

This is a PowerShell script that puts out the XML required to update your Red Gate MultiScript servers.  Manually entering the SQL instances from within the application can be a daunting task if you have a large number to do.  This script will have you up and running in seconds....

More
  • 2016-07-14

When using AlwaysOn, you must connect using your listener name, not your node name.  If you connect with the node name, it will only work until there is a failover, which would defeat the purpose of your High Availability setup, right?

More
  • 2016-05-25

This script will return all SQL instances running on a server or list of servers. cls Import-Module -Name SQLPS -DisableNameChecking $servers = “SERVER_NAME”, “SERVER_NAME_2”, “ETC”; foreach($server in $servers) { $path = “SQLServer:\SQL\” + $server; $instances = Get-ChildItem -Path $path; $instances; }

More
  • 2016-04-27