duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
DECLARE @FileName NVARCHAR(4000) | |
SELECT @FileName = | |
LEFT(target_data.value('(EventFileTarget/File/@name)[1]','nvarchar(4000)') , | |
CHARINDEX('system_health',target_data.value('(EventFileTarget/File/@name)[1]','nvarchar(4000)') )-1) + 'system_health*.xel' | |
FROM ( | |
SELECT | |
CAST(target_data AS XML) target_data |
CREATE PROCEDURE sp_server_diag_event_parser | |
as | |
--SP_SERVER_DIAGNOSTICS Dynamic Parser for "events", v1.23 | |
--You may use this at will, you may share it provided this header remains. | |
-- Copyright 2012 Michael Bourgon | |
-- Commercial use or sale prohibited without permission. Personal, Internal Company, or Private use is fine. | |
-- If you're just running this as your job as a DBA, enjoy. | |
-- Please feel free to share, and feel free to send corrections or enhancements - thebakingdba.blogspot.com | |
-- Thanks to Marc_S on Stackoverflow for the help on parsing XML. | |
-- Thanks to Stack Overflow for forcing me to come up with a good question - so I found the flawed derived table slowdown. |
Write-Warning "This code is not meant to be run sequentially, run it in sections following comment instructions" | |
exit | |
<############################################################################## | |
create transfer file | |
##############################################################################> | |
$FilePath = "C:\temp\transfer_file.txt" | |
$DesiredFileSizeKB = 1024 * 7 # 7 MB |
CREATE VIEW dbo.MyPatchLevel | |
AS | |
WITH MostRecentBuild AS | |
( | |
SELECT | |
SRC.Build | |
, SRC.[Release Date] | |
, SRC.SimpleVersion | |
, SRC.[KB / Description] | |
FROM |
------------------------------------------------------------------- | |
-- Script Name: ColumnstoreReorg.sql | |
-- | |
-- Desc: Run this to get a list of columnstore index partitions | |
-- to determine which should be reorganized. The script also | |
-- generates index reorg statements which could be run. | |
-- | |
-- Notes: SQL Server 2016 is REQUIRED. SQL Server 2016 changed | |
-- what index reorganization does to columnstore indexes, | |
-- and this script takes advantage of those changes. |
-- See http://dba.stackexchange.com/questions/136235/group-daily-schedule-into-start-date-end-date-intervals-with-the-list-of-week/136571?noredirect=1#comment257069_136571 | |
/***************************************************************** | |
DATA: Create sample data | |
*****************************************************************/ | |
IF OBJECT_ID('tempdb..#src') IS NOT NULL | |
DROP TABLE #src | |
CREATE TABLE #src (ID int PRIMARY KEY, ContractID int, dt date, dowChar char(3), dowInt int); |
<# | |
.SYNOPSIS | |
Get-SqlErrorLog is designed to quickly retrieve data from SQL Server error logs, negating the slowness of SSMS and awkwardness of manually crawling files. | |
.DESCRIPTION | |
Get-SqlErrorLog is designed to quickly retrieve data from SQL Server error logs, negating the slowness of SSMS and awkwardness of manually crawling files. | |
It is designed to be quite light in it's process, and should be quick (loading SQLPLS being the exception. |
SELECT db_name(database_id ), database_id as di, | |
datediff(minute, last_sent_time, last_received_time) AS SendRec, | |
datediff(minute, last_received_time, last_redone_time) AS RecRedo, | |
--datediff(minute, last_sent_time, last_redone_time) as MinsRedo, | |
case when redo_queue_size = 0 then 0 | |
when redo_rate = 0 then 0 | |
else cast(redo_queue_size / (redo_rate*1.0) as numeric(12,3)) end as MinToRedo, | |
case when log_send_queue_size = 0 then 0 | |
when log_send_rate = 0 then 0 | |
else cast(log_send_queue_size / (log_send_rate*1.0) as numeric(12,3)) |
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="PrepareStaticContent" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<!-- Passed in Parameters --> | |
<configuration></configuration> | |
<workingDir></workingDir> | |
<buildNumber></buildNumber> | |
<buildViews>false</buildViews> | |
<minifyJs>true</minifyJs> | |
<TargetsDirectory></TargetsDirectory> |