This file contains 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
/***************************************************************************** | |
MIT License, http://www.opensource.org/licenses/mit-license.php | |
Contact: help@sqlworkbooks.com | |
Copyright (c) 2018 SQL Workbooks LLC | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or | |
sell copies of the Software, and to permit persons to whom |
This file contains 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
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install chocolatey -y | |
choco install sql-server-2017 -y #developer edition | |
choco install sql-server-management-studio -y | |
choco install azure-data-studio -y | |
choco install azuredatastudio-powershell -y | |
choco install git.install -y | |
choco install poshgit -y |
This file contains 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
/*********************************************************************** | |
Copyright 2016, Kendra Little - LittleKendra.com | |
MIT License, http://www.opensource.org/licenses/mit-license.php | |
***********************************************************************/ | |
/*********************************************************************** | |
COLLECT DEADLOCK GRAPHS WITH EXTENDED EVENTS | |
This script contains TSQL to: | |
* Create an Extended Events Trace collecting sqlserver.xml_deadlock_report |
This file contains 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
/* Note: don't run this all at once. There are prompts to run some queries in another session, etc. */ | |
WHILE @@trancount > 0 | |
ROLLBACK | |
GO | |
USE master; | |
GO | |
IF DB_ID('lockingtest') IS NOT NULL |
This file contains 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
/*********************************************************** | |
TSQL to do a quick and dirty look at single-use plans in | |
the execution plan cache of a SQL Server. | |
************************************************************/ | |
/* Size of single use adhoc plans in execution plan cache */ | |
SELECT | |
objtype, | |
cacheobjtype, | |
SUM(size_in_bytes)/1024./1024. as [MB] |
This file contains 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
/*********************************************************************** | |
Copyright 2016, Kendra Little - littlekendra.com | |
MIT License, http://www.opensource.org/licenses/mit-license.php | |
***********************************************************************/ | |
/*********************************************************************** | |
FIRST, TELL SQL SERVER TO ISSUE THE BLOCKED PROCESS REPORT | |
***********************************************************************/ | |
/* Check if there are any pending configuration items before you start */ |
This file contains 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
/*********************************************************************** | |
Copyright 2016, Kendra Little - LittleKendra.com | |
MIT License, http://www.opensource.org/licenses/mit-license.php | |
***********************************************************************/ | |
USE WideWorldImporters; | |
GO | |
IF (select count(*) from sys.schemas where name='ddl')=0 | |
exec ('CREATE SCHEMA ddl AUTHORIZATION dbo;'); |
This file contains 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
<xml version="1.0" encoding="utf-8" standalone="yes"?> | |
<!-- | |
RedGate.SQLCompare.UI | |
RedGate.SQLCompare.UI | |
Version:14.5.2.18630--> | |
<NamedFilter version="1" type="SQLCompareFilter"> | |
<!--This filter can be loaded using the SQL Compare UI or used with a SQL Compare command line session using the /filter switch--> | |
<FilterName>SQLCompareFilterExcludingUsers</FilterName> | |
<Filter version="1" type="DifferenceFilter"> | |
<FilterCaseSensitive>False</FilterCaseSensitive> |
This file contains 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 TOP 20 | |
(SELECT CAST(SUBSTRING(st.text, (qs.statement_start_offset/2)+1, | |
((CASE qs.statement_end_offset | |
WHEN -1 THEN DATALENGTH(st.text) | |
ELSE qs.statement_end_offset | |
END | |
- qs.statement_start_offset)/2) + 1) AS NVARCHAR(MAX)) FOR XML PATH(''),TYPE) AS [TSQL], | |
qs.execution_count AS [#], | |
qs.total_physical_reads as [physical reads], | |
CASE WHEN execution_count = 0 THEN 0 ELSE |
This file contains 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
[ | |
{ | |
"caption": "Reg Replace: Format VTT", | |
"command": "reg_replace", | |
"args": {"replacements": ["remove_timestamps", "remove_numbered_lines","remove_empty_lines","remove_line_endings","remove_WEBVTT_literal","remove_v_tags"] | |
} | |
}, | |
] |
NewerOlder