View token
e84fdb8f7ea293023754c9ef12a01914ea6cfc06 |
View Send-S3Files.ps1
function Send-S3Files { | |
<# | |
.SYNOPSIS | |
Send the files from a local path to AWS S3 | |
.DESCRIPTION | |
The function will copy all files from a specific path to AWS S3 | |
.EXAMPLE | |
Send-S3Files -BucketName 'backups' -Region 'sa-east-1' -AKey '####' -SKey '####' -LocalSource 'c:\temp' , 'd:\backups' | |
#> | |
[CmdletBinding()] |
View waits.sql
-- Clear Wait Stats | |
-- DBCC SQLPERF('sys.dm_os_wait_stats', CLEAR); | |
-- Isolate top waits for server instance since last restart or statistics clear (Query 32) (Top Waits) | |
-- New SQL Server 2012-2014 specific version | |
-- QDS_PERSIST_TASK_MAIN_LOOP_SLEEP is new for SQL Server 2014 | |
-- QDS_CLEANUP_STALE_QUERIES_TASK_MAIN_LOOP_SLEEP is new for SQL Server 2014 | |
-- WAIT_XTP_HOST_WAIT is new for SQL Server 2014 | |
-- WAIT_XTP_OFFLINE_CKPT_NEW_LOG is new for SQL Server 2014 |
View buffer_descriptors.sql
SELECT | |
OBJECT_NAME ([p].[object_id]) AS [ObjectName], | |
[p].[index_id], | |
[i].[name], | |
[i].[type_desc], | |
[au].[type_desc], | |
[DirtyPageCount], | |
[CleanPageCount], | |
[DirtyPageCount] * 8 / 1024 AS [DirtyPageMB], | |
[CleanPageCount] * 8 / 1024 AS [CleanPageMB] |
View sp_AllocationMetadata.sql
/*============================================================================ | |
File: sp_AllocationMetadata.sql | |
Summary: This script cracks the system tables to provide top-level | |
metadata about a table or index | |
SQL Server Versions: 2005 onwards | |
------------------------------------------------------------------------------ | |
Written by Paul S. Randal, SQLskills.com | |
View job_history.sql
SELECT | |
name, | |
steps.step_name, | |
command, | |
steps.server, | |
database_name, | |
hist.run_date, | |
hist.run_time, | |
hist.run_duration, | |
hist.run_status, |
View alerts.sql
-- Get SQL Server Agent Alert Information (Query 5) (SQL Server Agent Alerts) | |
SELECT name | |
, event_source | |
, message_id | |
, severity | |
, [enabled] | |
, has_notification | |
, delay_between_responses | |
, occurrence_count |