SQL Server – Find Missing Indexes With Script In Output Writer #1, 2016-03-18 Source: http://sqlserverplanet.com/dmvs/missing-indexes-dmv SELECT mid.statement ,migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * (migs.user_seeks + migs.user_scans) AS improvement_measure… Continue Reading
SQL Server – Download all RDL files from Report Server Writer #1, 2016-03-18 —- Allow advanced options to be changed. –EXEC sp_configure ‘show advanced options’, 1 –GO —-… Continue Reading
PowerShell – Query Database Remotely Writer #1, 2016-03-18 The basic syntax for sending a query to SQL Server using PowerShell. sqlcmd -S SERVER_NAME… Continue Reading
PowerShell – Get Boot Time of Computer Writer #1, 2016-03-18 Show Date/Time Of Last Boot Get-WmiObject -class Win32_OperatingSystem | Select-Object __SERVER,@{label='LastBootUpTime';expression={$_.ConvertToDateTime($_.LastBootUpTime)}} Continue Reading
PowerShell – Scripts Not Allowed To Run Writer #1, 2016-03-18 If PowerShell is not allowing you to run scripts then you might need to set… Continue Reading
PowerShell – Get All SQL Server Instances In Environment Writer #1, 2016-03-18 cls import-module failoverclusters Import-Module -Name SQLPS -DisableNameChecking $servers = “comma”,”separated”,”server”,”list” foreach($server in $servers) { try… Continue Reading
PowerShell – Fast Ping Writer #1, 2016-03-18 Source: https://gist.github.com/mbrownnycnyc/9913361 This is a very fast way to ping a server using PowerShell. #… Continue Reading
PowerShell – Get SQL Server Info Writer #1, 2016-03-18 $assemblylist = “Microsoft.SqlServer.Management.Common”, “Microsoft.SqlServer.Smo”, “Microsoft.SqlServer.Dmf “, “Microsoft.SqlServer.Instapi “, “Microsoft.SqlServer.SqlWmiManagement “, “Microsoft.SqlServer.ConnectionInfo “, “Microsoft.SqlServer.SmoExtended “, “Microsoft.SqlServer.SqlTDiagM… Continue Reading
PowerShell – Replace All Instances Of Something In All Files In Directory Writer #1, 2016-03-18 This script searches every file in a directory for a particular string and replaces it… Continue Reading