Rebuild SQL Server index with Powershell

let continue to explore what we can achieve with powershell for SQL Server management. The goal of this post is to rebuild fragmented index with power shell. To achieve that we need to use the invoke-sqlcmd cmdlet. try to use this command, if it doesn’t work, be sure to have all the system module loaded,…


Usefull DMV Query

What are DMV : (Dynamic Management View) View of internals informations. DMV are basically SQL Views on some pretty important internal memory structures. DMV informations include metrics about : indexes query execution operating system Transaction Databases and much more What are DMF : (Dynamic Management Function) As an example sys.dm_exec_query_stats records details of the SQL…