Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Jul 25, 2024
2 parents 8bce0df + d7359a0 commit 72a7a40
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
7 changes: 6 additions & 1 deletion bin/dbatools-buildref-index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"LastUpdated": "2024-07-10T00:00:00",
"LastUpdated": "2024-07-24T00:00:00",
"Data": [
{
"Version": "8.0.47",
Expand Down Expand Up @@ -4725,6 +4725,11 @@
{
"Version": "16.0.4131",
"KBList": "5040939"
},
{
"CU": "CU14",
"Version": "16.0.4135",
"KBList": "5038325"
}
]
}
Binary file modified bin/dbatools-index.json
Binary file not shown.
3 changes: 2 additions & 1 deletion bin/diagnosticquery/SQLServerDiagnosticQueries_2022.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

-- SQL Server 2022 Diagnostic Information Queries
-- Glenn Berry
-- Last Modified: July 10, 2024
-- Last Modified: July 24, 2024
-- https://glennsqlperformance.com/
-- https://sqlserverperformance.wordpress.com/
-- YouTube: https://bit.ly/2PkoAM1
Expand Down Expand Up @@ -81,6 +81,7 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
-- 16.0.4120.1 CU12 + GDR 4/9/2024 https://support.microsoft.com/en-us/topic/kb5036343-description-of-the-security-update-for-sql-server-2022-cu12-april-9-2024-e11a0715-435f-42be-89ff-4b3d8f9734fc
-- 16.0.4125.3 CU13 5/16/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate13
-- 16.0.4131.2 CU13 + GDR 7/9/2024 https://support.microsoft.com/en-us/topic/kb5040939-description-of-the-security-update-for-sql-server-2022-cu13-july-9-2024-16a61a81-926c-46a5-b6c0-edbca541f2f6
-- 16.0.4135.4 CU14 7/23/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate14

-- What's new in SQL Server 2022 (16.x)
-- https://bit.ly/3MJEjR1
Expand Down
2 changes: 1 addition & 1 deletion dbatools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'dbatools.psm1'

# Version number of this module.
ModuleVersion = '2.1.20'
ModuleVersion = '2.1.22'

# ID used to uniquely identify this module
GUID = '9d139310-ce45-41ce-8e8b-d76335aa1789'
Expand Down
8 changes: 4 additions & 4 deletions public/Get-DbaDbccHelp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ function Get-DbaDbccHelp {
.EXAMPLE
PS C:\> Get-DbaDbccHelp -SqlInstance SQLInstance -Statement FREESYSTEMCACHE -Verbose | Format-List
Runs the command DBCC HELP(FREESYSTEMCACHE) WITH NO_INFOMSGS against the SQL Server instance SQLInstance
Runs the command DBCC HELP(FREESYSTEMCACHE) WITH NO_INFOMSGS against the SQLInstance SQL Server instance.
.EXAMPLE
PS C:\> Get-DbaDbccHelp -SqlInstance LensmanSB -Statement WritePage -IncludeUndocumented | Format-List
PS C:\> Get-DbaDbccHelp -SqlInstance SQLInstance -Statement WritePage -IncludeUndocumented | Format-List
Sets TraeFlag 2588 on for session and then runs the command DBCC HELP(WritePage) WITH NO_INFOMSGS against the SQL Server instance SQLInstance
Sets Trace Flag 2588 on for the session and then runs the command DBCC HELP(WritePage) WITH NO_INFOMSGS against the SQLInstance SQL Server instance.
#>
[CmdletBinding()]
Expand Down Expand Up @@ -105,4 +105,4 @@ function Get-DbaDbccHelp {

}
}
}
}
4 changes: 2 additions & 2 deletions public/Get-DbaLatchStatistic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function Get-DbaLatchStatistic {
[latch_class],
[wait_time_ms] / 1000.0 AS [WaitS],
[waiting_requests_count] AS [WaitCount],
Case WHEN SUM ([wait_time_ms]) OVER() = 0 THEN NULL ELSE 100.0 * [wait_time_ms] / SUM ([wait_time_ms]) OVER() END AS [Percentage],
CASE WHEN SUM([wait_time_ms]) OVER() > 0 THEN 100.0 * [wait_time_ms] / SUM([wait_time_ms]) OVER() END AS [Percentage],
ROW_NUMBER() OVER(ORDER BY [wait_time_ms] DESC) AS [RowNum]
FROM sys.dm_os_latch_stats
WHERE [latch_class] NOT IN (N'BUFFER')
Expand All @@ -105,7 +105,7 @@ function Get-DbaLatchStatistic {
CAST (MAX ([W1].[WaitS]) AS DECIMAL(14, 2)) AS [WaitSeconds],
MAX ([W1].[WaitCount]) AS [WaitCount],
CAST (MAX ([W1].[Percentage]) AS DECIMAL(14, 2)) AS [Percentage],
CAST ((MAX ([W1].[WaitS]) / MAX ([W1].[WaitCount])) AS DECIMAL (14, 4)) AS [AvgWaitSeconds],
CAST (CASE WHEN MAX([W1].[WaitCount]) > 0 THEN MAX([W1].[WaitS]) / MAX([W1].[WaitCount]) END AS DECIMAL (14, 4)) AS [AvgWaitSeconds],
CAST ('https://www.sqlskills.com/help/latches/' + MAX ([W1].[latch_class]) as XML) AS [URL]
FROM [Latches] AS [W1]
INNER JOIN [Latches] AS [W2]
Expand Down
6 changes: 3 additions & 3 deletions public/Test-DbaDbRecoveryModel.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ function Test-DbaDbRecoveryModel {
WHEN d.recovery_model = 1 AND drs.last_log_backup_lsn IS NOT NULL THEN 1
ELSE 0
END AS IsReallyInFullRecoveryModel
FROM sys.databases AS D
FROM sys.databases AS d
INNER JOIN sys.database_recovery_status AS drs
ON D.database_id = drs.database_id
ON d.database_id = drs.database_id
WHERE d.recovery_model = $recoveryCode"

if ($Database) {
Expand Down Expand Up @@ -152,4 +152,4 @@ function Test-DbaDbRecoveryModel {
}
}
}
}
}

0 comments on commit 72a7a40

Please sign in to comment.