One irritating problem with the Operating System (CmdExec) SQL Job Type is that you can only run a single command. Most people get around this […]
Continue readingCategory: Windows
Windows
Query Database Size and Unallocated Space from SQL Database
I created the he following stored procedure to give me a more clear look at the unallocated and unused space used by my databases. The […]
Continue readingTerminate Connections to an SQL Database
Have you ever tried to restore a database to an SQL server with existing connections? Unless the connections are terminated, the database restore will fail […]
Continue readingList all Connections to an SQL Database
A simple, but useful command, this script will show all connections to an SQL server. Replace Database Name with the name of the database and […]
Continue readingSearch for Orphaned Users After a Database Restore
After a database has been restored, users may become orphaned, or disconnected, from the database. You will see an entry for the user in the […]
Continue readingQuery Table Sizes from a SQL Database
I pulled apart a few stored procedures and ended up with this code. Very nice way to query the row count and size for each […]
Continue readingVBScript and WMI to stop and restart a running service
Option Explicit Dim objWMIService, objItem, objService Dim colListOfServices, strComputer, strService, intSleep strComputer = “.” intSleep = 15000 WScript.Echo “Click OK to begin” ‘On Error Resume […]
Continue readingQuery a List of Servers from Active Directory
I needed a list of all servers listed in AD. There are many scripts out there that do this, but they didn’t quite fit my […]
Continue readingSQL Server CPU Utilization
Some helpful SQL stats from this article. — From the SQL Server Performance Dashboard (sys.dm_os_ring_buffers) — Query CPU utilization for each four minute intervals declare […]
Continue readingList all Documents in SharePoint
I’ve used these queries for years, they come in handy when planning growth or a migration. A quick Google search will find many more queries […]
Continue reading