Use this version instead: https://gist.github.com/tcartwright/c27a45a4a211f7cc79466140fb80a56d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT [jobs].[name], | |
| [jobs].[step_name], | |
| [jobs].[run_status], | |
| [jobs].[run_status_desc], | |
| [jobs].[run_date], | |
| [jobs].[run_time], | |
| [jobs].[run_duration] | |
| FROM ( | |
| SELECT [RowNbr] = ROW_NUMBER() OVER (PARTITION BY sj.[name] ORDER BY fn.[run_date] DESC, fn.[run_time] DESC), | |
| sj.name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF OBJECT_ID (N'dbo.fnBetterQuoteName') IS NOT NULL | |
| DROP FUNCTION dbo.fnBetterQuoteName | |
| GO | |
| CREATE FUNCTION dbo.fnBetterQuoteName( | |
| @NameSet NVARCHAR(MAX) | |
| ) | |
| RETURNS nvarchar(max) | |
| AS | |
| BEGIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Author: Tim Cartwright | |
| Purpose: Allows you to check the server, and client SET options | |
| https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-user-options-server-configuration-option | |
| 1 DISABLE_DEF_CNST_CHK Controls interim or deferred constraint checking. | |
| 2 IMPLICIT_TRANSACTIONS For dblib network library connections, controls whether a transaction is started implicitly when a statement is executed. The IMPLICIT_TRANSACTIONS setting has no effect on ODBC or OLEDB connections. | |
| 4 CURSOR_CLOSE_ON_COMMIT Controls behavior of cursors after a commit operation has been performed. | |
| 8 ANSI_WARNINGS Controls truncation and NULL in aggregate warnings. | |
| 16 ANSI_PADDING Controls padding of fixed-length variables. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /***************************************************************************/ | |
| /******************************TEST FOR ARITHABORT ON***********************/ | |
| /***************************************************************************/ | |
| DECLARE @options TABLE ([name] nvarchar(35), [minimum] int, [maximum] int, [config_value] int, [run_value] int); | |
| INSERT INTO @options ([name], [minimum], [maximum], [config_value], [run_value]) | |
| EXEC sp_configure 'user_options'; | |
| SELECT 'ARITHABORT ' + CASE WHEN ([config_value] & 64) = 64 THEN 'ON' ELSE 'OFF' END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %windir%\System32\inetsrv\appcmd.exe list apppool /xml | %windir%\System32\inetsrv\appcmd.exe recycle apppool /in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @setlocal enabledelayedexpansion | |
| @echo off | |
| @set path=%~dp0 | |
| @set folders= | |
| @for /f "tokens=*" %%G in ('dir /b /a:d "%path%"') do @set folders=!folders! .\%%G | |
| @REM @echo %folders% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <UserSettings> | |
| <ApplicationIdentity version="10.0"/> | |
| <ToolsOptions> | |
| <ToolsOptionsCategory name="Environment" RegisteredName="Environment"/> | |
| </ToolsOptions> | |
| <Category name="Environment_Group" RegisteredName="Environment_Group"> | |
| <Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package"> | |
| <PropertyValue name="Version">2</PropertyValue> | |
| <FontsAndColors Version="2.0"> | |
| <Categories> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <UserSettings> | |
| <ApplicationIdentity version="10.0"/> | |
| <ToolsOptions> | |
| <ToolsOptionsCategory name="Environment" RegisteredName="Environment"/> | |
| </ToolsOptions> | |
| <Category name="Environment_Group" RegisteredName="Environment_Group"> | |
| <Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package"> | |
| <PropertyValue name="Version">2</PropertyValue> | |
| <FontsAndColors Version="2.0"> | |
| <Categories> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <UserSettings> | |
| <ApplicationIdentity version="10.0"/> | |
| <ToolsOptions> | |
| <ToolsOptionsCategory name="Environment" RegisteredName="Environment"/> | |
| </ToolsOptions> | |
| <Category name="Environment_Group" RegisteredName="Environment_Group"> | |
| <Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package"> | |
| <PropertyValue name="Version">2</PropertyValue> | |
| <FontsAndColors Version="2.0"> | |
| <Categories> |