Pages

Wednesday, 21 March 2012

SQL AND POWERSHELL

Capture Performance Counter Data and Write to SQL Server
http://blogs.technet.com/b/heyscriptingguy/archive/2011/07/27/capture-performance-counter-data-and-write-to-sql-server.aspx
http://blogs.technet.com/b/heyscriptingguy/archive/2011/07/25/use-powershell-to-monitor-your-sql-server-performance.aspx

Learn About Scripting for SQL Server
http://technet.microsoft.com/en-us/scriptcenter/dd742422

Four Easy Ways to Import CSV Files to SQL Server with PowerShell BATCHman Uses PowerShell to Import a CSV File into His SQL Server Capture Performance Counter Data and Write to SQL Server Use PowerShell to Monitor Your SQL Server Performance SQL Server Policy-Based Management and PowerShell Use PowerShell to Search SQL Server Logs for Errors Use PowerShell to Get the SQL Server Error Log Use PowerShell to Work with Analysis Service Database Backups
http://msdn.microsoft.com/en-us/library/cc281954.aspx
http://technet.microsoft.com/en-us/library/cc281954.aspx

SQL Server PowerShell Overview Windows PowerShell
http://technet.microsoft.com/en-us/library/bb978526.aspx

 Tool box --
Learn http://technet.microsoft.com/en-us/scriptcenter/ee861518.aspx
http://technet.microsoft.com/en-us/scriptcenter/dd823314

Scripting with Windows PowerShell/Scripting Guides /Wiki Articles/books/Videos Power Shell Variables Powershell Scripts and the Command Line Power Shell and WMI Creating Output with PowerShell Windows PowerShell Scriptomatic VBScript Language Reference WSH Language Reference WMI SDK ADSI SD Active Directory Databases Desktop Exchange HTML Applications (HTA) Office Windows PowerShell WMI Group Policy Microsoft Operations Manager (MOM) Remote Desktop Services Security SQL Server Systems Management Server 2003 Windows HPC
http://technet.microsoft.com/en-us/scriptcenter
http://technet.microsoft.com/en-us/scriptcenter/dd793612
http://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx

MS Script center

Create Inventory of SQL Server in Network as Html
http://gallery.technet.microsoft.com/scriptcenter/Create-Inventory-of-SQL-19d61963

Various SQL Server IO Statistics
http://gallery.technet.microsoft.com/scriptcenter/Various-SQL-Server-IO-3f9002f7   
http://gallery.technet.microsoft.com/scriptcenter/Current-IO-and-CPU-Workload-8d946ed4
http://gallery.technet.microsoft.com/scriptcenter/List-expensive-queries-f6d63ac6
http://gallery.technet.microsoft.com/scriptcenter/Get-SQL-Server-and-Agent-e9cae96b
http://gallery.technet.microsoft.com/scriptcenter/List-all-Locks-of-the-2a751879
http://gallery.technet.microsoft.com/scriptcenter/Get-all-SQL-Statements-0622af19
http://gallery.technet.microsoft.com/scriptcenter/Pending-IO-Requests-9b93c077
http://gallery.technet.microsoft.com/scriptcenter/Utilization-History-afe03282
http://gallery.technet.microsoft.com/scriptcenter/Get-all-SQL-Statements-9af68abc
Retrieve Waiter List Information
http://gallery.technet.microsoft.com/scriptcenter/3dc86138-3abd-4b7f-9c50-d92ef1b0d1c3
http://gallery.technet.microsoft.com/scriptcenter/SQL-Script-to-list-VLF-e6315249
http://gallery.technet.microsoft.com/scriptcenter/86886b7f-8f75-4052-99d1-ef8ebd910a88
http://gallery.technet.microsoft.com/scriptcenter/Types-of-plans-stored-on-e759f133
Backup Statu
http://gallery.technet.microsoft.com/scriptcenter/0a7abd8d-9bdf-4dba-b766-7f7ffe0db515
Retrieve a SQL Statement with a Specified .SQL_Handl
http://gallery.technet.microsoft.com/scriptcenter/4df31ad5-227c-495d-9c6c-d91d047e89ee

Retrieve Waitstat Snapshots
http://gallery.technet.microsoft.com/scriptcenter/8c90bd2e-9def-4f44-bce4-e5dae4d86f71



Retrieves the status of the last SQL Server job run on a set of database
http://gallery.technet.microsoft.com/scriptcenter/d629c567-315e-4111-85e0-94bdd341dcc6

http://gallery.technet.microsoft.com/scriptcenter/Pivot-with-out-using-b3fe3b71

http://gallery.technet.microsoft.com/scriptcenter/CXPacket-Wait-Type-Count-500ca0dd

List Statements With the Highest Average CPU Time
http://gallery.technet.microsoft.com/scriptcenter/7

http://gallery.technet.microsoft.com/scriptcenter/c95fa3b0-c707-4074-9ecc-bd8f755b1999
Report Blocker and Waiter SQL Statements
http://gallery.technet.microsoft.com/scriptcenter/62e9f21f-8da5-4701-920a-08016271a048




List Currently-Executing Parallel Plans
http://gallery.technet.microsoft.com/scriptcenter/a5c905ec-a857-4918-8f9f-75f0ff59eb76
Compare Single-Use and Re-Used Plan
http://gallery.technet.microsoft.com/scriptcenter/c27cc874-ed3a-4020-927e-73d22ef11c34

Retrieve Parallel Statements With the Highest Worker Time
http://gallery.technet.microsoft.com/scriptcenter/ff23793e-5702-4bbc-ad5d-a5d73724d7d8

Compare Locking and Repeatable Reads
http://gallery.technet.microsoft.com/scriptcenter/398f7df6-3cf4-4a86-922b-7c98eca6e242

List Locks and Reads
http://gallery.technet.microsoft.com/scriptcenter/cb83795f-e8ea-4a0e-8fd2-5f41b2e1bfe0


List Statements from a Specified Waiter Listhttp://gallery.technet.microsoft.com/scriptcenter/94836d5d-a79d-46a0-815a-ac4e87140338


List Real-Time Blocker and Waiter Statements
http://gallery.technet.microsoft.com/scriptcenter/48977041-38b2-4d79-bc29-7bcb970656cf

List Statements With the Highest Average CPU Time
http://gallery.technet.microsoft.com/scriptcenter/7a29856b-747d-44aa-b639-3f15310de69d