Pages

Showing posts with label Monitoring. Show all posts
Showing posts with label Monitoring. Show all posts

PowerShell and Performance Monitor (Perfmon) Counter

I previously blogged about how to evaluate SQL server performance by using performance monitor (Perfmon) or logman to capture performance counters. Recently I discover that PowerShell could be utilize to capture the performance counters as well as a better tool to automate process. This post consist of the PowerShell Script I developed and how the perfmon data are imported into the database.

SQL Server Trace Not Inherit Permission - Solution

If you stumble upon this post because you are trying to find out what went wrong on your SQL Server trace permission created using sp_trace_create and it is not inheriting NTFS permission from the parent folder, this post may provide you a solution. This is actually a known issue for Microsoft. You can find the ticket submitted here.

Faster Wait Statistics for SQL Server 2012

Since SQL Server 2005, waits and queues statistics have been implemented in SQL Server to provide important information and effective analysis to identify the root cause and for performance tuning. Here is some script to aggregate this information for performance tuning and analysis.

SQL Server Last Start Date

There are multiple ways of finding out when was the last time SQL Server restarted. There are a couple of dynamic management views and DBCC command that you can use to get this information.

Performance Monitoring with Logman

Microsoft Windows provides a free built-in utility called Logman that monitor performance counter through command line. If you are upset about the user unfriendly perfmon (check out this post to automate perfmon scheduling), or like to have ease with command line to monitor multiple servers, Logman probably is what you need.

Performance Monitor (Perfmon) - Schedule and Stop Condition

I use performance monitor (perfmon) to collect different set of counters for my server. I tried to automate the process to run on certain schedule. However, I found the interface of perfmon not that user friendly, and sometimes confusing. Here I try to clarify a little more on the schedule and stop condition.

SQL Detect Fragmentation With DMV

Dynamic management view (DMV) sys.dm_db_index_physical_stats return size and fragmentation information for data and indexes for table and view. Here is some of the details about the DMV and the script I use to identify fragmentation.

SQL sp_spaceused Database Disk Space Usage

In my previous post, I showed how to use several DBCC commands to look up how much space has been used in the log file. Today I have a quick post of finding the disk space reserved and used for database, table and indexed view.