Skip to content

Commit dff4e28

Browse files
committed
Commence adding a standard header
1 parent 27deeca commit dff4e28

3 files changed

+11
-3
lines changed

Age Calculation/Calculating Age in Years.sql

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
-- The following is a simple way to calculate someone’s current age, or age as at a particular date
1+
-- Calculating Age in Years
2+
-- Part of the SQL Server DBA Toolbox at https://github.com/DavidSchanzer/Sql-Server-DBA-Toolbox
3+
-- This script demonstrates a simple way to calculate someone’s current age, or age as at a particular date.
24
-- It formats each date as YYYYMMDD and converts this to an integer, then subtracts one integer from the other, and divides the result by 10,000.
35
-- It’s 10,000 because you’re trying to truncate the difference month and day components, leaving only the years.
46

Agent Jobs/Change the SQL Agent job history purge period from 30 days to 90 days in the Ola Hallengren sp_purge_jobhistory job.sql

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
-- Change the SQL Agent job history purge period from 30 days to 90 days in the Ola Hallengren sp_purge_jobhistory job
2+
-- Part of the SQL Server DBA Toolbox at https://github.com/DavidSchanzer/Sql-Server-DBA-Toolbox
3+
-- This script locates the 'sp_purge_jobhistory' job and edits it to change the default job history purge period from 30 days to 90 days instead.
4+
15
SET NOCOUNT ON;
26

37
DECLARE @print_only BIT = 1,
@@ -6,7 +10,6 @@ DECLARE @print_only BIT = 1,
610
@command NVARCHAR(MAX),
711
@message VARCHAR(1000);
812

9-
-- Change the SQL Agent job history purge period from 30 days to 90 days in the Ola Hallengren sp_purge_jobhistory job
1013
DECLARE @test TABLE
1114
(
1215
[step_id] INT NULL,

Agent Jobs/Remove the @StatisticsSample parameter for all Ola Hallengren IndexOptimize - USER_DATABASES jobs.sql

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
-- Remove the @StatisticsSample parameter for all Ola Hallengren IndexOptimize - USER_DATABASES jobs
2+
-- Part of the SQL Server DBA Toolbox at https://github.com/DavidSchanzer/Sql-Server-DBA-Toolbox
3+
-- This script locates the 'IndexOptimize - USER_DATABASES' job and edits it to remove the '@StatisticsSample = 100' parameter.
4+
15
SET NOCOUNT ON;
26

37
DECLARE @print_only BIT = 1,
@@ -6,7 +10,6 @@ DECLARE @print_only BIT = 1,
610
@command NVARCHAR(MAX),
711
@message VARCHAR(1000);
812

9-
-- Remove the @StatisticsSample parameter for all Ola Hallengren "IndexOptimize - USER_DATABASES" jobs
1013
DECLARE @test TABLE
1114
(
1215
[step_id] INT NULL,

0 commit comments

Comments
 (0)