PowerSQL – Identify a Head of the Database Blocks and Generate Automated Alert across all listed SQL Instances
0 view | +0 today
Follow
PowerSQL – Identify a Head of the Database Blocks and Generate Automated Alert across all listed SQL Instances
This is going to be a simplest way of capturing and sending some useful information via an email of ‘N’ number of servers. With a little modification, you can implement various database related automation and capture very useful information. To Identify the SPID (Session ID) of a head of the blocking chain using SMO server object using method named EnumProcesses which lists all running processes in an instance. Once the SMO server object is instantiated, all you need to invoke is the EnumProcesses method. Please refer by earlier post to load SMO’s, if it’s not loaded. http://www.sqlservercentral.com/blogs/powersql-by-prashanth-jayaram/2013/05/01/powersql-list-sql-server-instance-configuration-details-and-sending-an-automated-email/ I’ve also used global variables for email sending option. First lets create a text file List.txt in which all instance names are stored and Change the MailServer, EmLst Parameters as per your configuration. Schedule a sql job to run it periodically so that an auto-generated alerts will be sent an intended administrators. For more information http://sqlpowershell.wordpress.com/2013/05/06/powersql-identify-a-head-of-the-database-blocks-and-generate-automated-alert-across-all-listed-sql-instances/?preview=true&preview_id=339&preview_nonce=f57572c7e5
No scoops have been published yet. Suggest content to its curator!