• [Script of Mar. 10] How to detect system health extended event session incorrect event specification

    Script Download: CheckIncorrectEventSpecification.zip 
    http://gallery.technet.microsoft.com/How-to-detect-system-40857284

    This T-SQL script will demo how to detect system health extended event session incorrect event specification in SQL Server 2012. 

    Every instance of SQL Server has a default extended event session created that has the name system_health. This session captures information about the wait_info and wait_info_external events. The definition of the system_health session in SQL Server 2012 contains incorrect map_key specified for the wait_types of interest. The script will help check system health extended event session incorrect event specification in SQL Server 2012.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of Mar. 11] How to check SQL Server stale statistics (T-SQL)

    Script Download: CheckStaleStatics.zip
    http://gallery.technet.microsoft.com/How-to-check-SQL-Server-4fefea34

    This T-SQL script will check SQL Server stale statistics that may cause performance issues.

    Some people asked how to find stale statistics for these statistics may cause performance issues. This T-SQL script will demo how to check stale statistics which have been updated for more than 1000 times in SQL Server 2008 R2 starting with Service Package 2 or SQL Server 2012 starting with Service Package 1.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of Mar. 12] How to change the time synchronization interval in Windows (VBScript)

    Script Download: 26816.zip
    http://gallery.technet.microsoft.com/How-to-change-the-time-83ea0f17

    This VBScript sample shows how to change the Internet Time Synchronization interval.

    Windows includes internet time synchronization scheduler to synchronize your clock automatically. But the default synchronization interval for this process is one week. There is no way to change this interval through the user interface. It has to be done using the registry editor. So this script sample can easily help user to do it.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of Mar. 13] How to delete user profiles older than a specified number of days in Windows

    Script Download: 26699.zip
    http://gallery.technet.microsoft.com/How-to-delete-user-d86ffd3c

    This PowerShell script sample shows how to delete user profiles older than a specified number of days.

    The computer usually used by more than one person, this often produces a large number of unique user profiles. Some of profiles are needless. (Profiles that have not been accessed in the past 60 days), users would like to clean up these legacy profiles. If we can provide a script that can help user to delete user profiles that is older than a specified number of days, it would be very helpful.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script of Mar. 14] How to calculate the increasing percentage of sales each month (T-SQL)

    Script Download: SalesPercentage.zip
    http://gallery.technet.microsoft.com/How-to-calculate-the-de16efde

    This T-SQL script will demo how to calculate the increasing percentage of sales each month in a year.

    As some people asked how to calculate the increasing percentage of sales each month in a year. Sometimes there are several products in a table, we need find out the increasing percentage of a specified product in two nearby month.

    image image
     image

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery