Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Nickiade
/
DBA-Scripts
Public
forked from
saxdba/DBA-Scripts
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
develop
Breadcrumbs
DBA-Scripts
/
Healthy SQL
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
develop
Breadcrumbs
DBA-Scripts
/
Healthy SQL
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
ActiveXESessions_SystemHealthInfo_Ch06_ExpandingTheToolset.sql
ActiveXESessions_SystemHealthInfo_Ch06_ExpandingTheToolset.sql
AllDeadLockScripts_Ch08_Deadlocks.sql
AllDeadLockScripts_Ch08_Deadlocks.sql
CDCScripts_Ch10_ChangeDataCapture.sql
CDCScripts_Ch10_ChangeDataCapture.sql
CalculateAllSQLServerPerformanceCounterValues_Ch05_sys.dm_os_performance_countersHowtoReadCalculate .sql
CalculateAllSQLServerPerformanceCounterValues_Ch05_sys.dm_os_performance_countersHowtoReadCalculate .sql
CalculateCumulativeWaitTimesByWaitType_Chap03_SlowPerformance.sql
CalculateCumulativeWaitTimesByWaitType_Chap03_SlowPerformance.sql
CaptureCfgChangesUsingDefaultTrace_Ch10_DefaultTrace.sql
CaptureCfgChangesUsingDefaultTrace_Ch10_DefaultTrace.sql
CompareResourceWaitsVsSignalWaits_Chap03_SignalWaits.sql
CompareResourceWaitsVsSignalWaits_Chap03_SignalWaits.sql
CreateAgentAlerts_Ch08_CreateANewAlert.sql
CreateAgentAlerts_Ch08_CreateANewAlert.sql
CreateCustomDataCollectionScriptForQueryStats_Ch07_DefiningCustomDataCollection.sql
CreateCustomDataCollectionScriptForQueryStats_Ch07_DefiningCustomDataCollection.sql
CreateCustomIndexUsageCollector_Ch07_DefiningCustomDataCollection.sql
CreateCustomIndexUsageCollector_Ch07_DefiningCustomDataCollection.sql
CreateDDLTriggerForServerDatabaseEvent_Ch10_DDLTriggers.sql
CreateDDLTriggerForServerDatabaseEvent_Ch10_DDLTriggers.sql
CreateDECODE_TLOGScripts_Ch10_ReadingTheTransactionLog.sql
CreateDECODE_TLOGScripts_Ch10_ReadingTheTransactionLog.sql
CreateHistoricalWaitStatsTable_Ch07_RollingYourOwn.sql
CreateHistoricalWaitStatsTable_Ch07_RollingYourOwn.sql
CreateMonitoredWaitTypesTable_Ch07_RollingYourOwn.sql
CreateMonitoredWaitTypesTable_Ch07_RollingYourOwn.sql
CreateSQLAuditsAndServerDatabaseSpecifications_Ch10_SQLAudit.sql
CreateSQLAuditsAndServerDatabaseSpecifications_Ch10_SQLAudit.sql
CreateStoredProc_usp_DailyWaitStats_Ch07_RollingYourOwn.sql
CreateStoredProc_usp_DailyWaitStats_Ch07_RollingYourOwn.sql
DataCollectorCounterDataDetailsQuery_Ch05_DataCollector.sql
DataCollectorCounterDataDetailsQuery_Ch05_DataCollector.sql
DefaultTraceQueries&Activity_Ch05_DefaultTrace.sql
DefaultTraceQueries&Activity_Ch05_DefaultTrace.sql
DesignQueryForCustomReportWaitStats_Ch08_CreateTheDataSets.sql
DesignQueryForCustomReportWaitStats_Ch08_CreateTheDataSets.sql
DumpTopWaitsToHistoryWaitsTable_Chap03_SlowPerformance.sql
DumpTopWaitsToHistoryWaitsTable_Chap03_SlowPerformance.sql
FindDupIdx_Ch04_DuplicateIndexes.sql
FindDupIdx_Ch04_DuplicateIndexes.sql
FormatXMLoutput_sp_diagnostics_Ch06_The_sp_diagnostics_procedure_XQuery.sql
FormatXMLoutput_sp_diagnostics_Ch06_The_sp_diagnostics_procedure_XQuery.sql
GetAvgTaskCountsTotal_Chap03_RunnableTaskCount.sql
GetAvgTaskCountsTotal_Chap03_RunnableTaskCount.sql
GetBufferHitCacheRatio_Ch05_sys.dm_os_performance_countersHowtoReadCalculate .sql
GetBufferHitCacheRatio_Ch05_sys.dm_os_performance_countersHowtoReadCalculate .sql
GetFillFactorForAllIndexesOnDatabase_Chap04_FillFactor.sql
GetFillFactorForAllIndexesOnDatabase_Chap04_FillFactor.sql
GetHistoricalCPUUtilizationSQLvsOtherProcesses_Chap03_CPUBlameGame.sql
GetHistoricalCPUUtilizationSQLvsOtherProcesses_Chap03_CPUBlameGame.sql
GetIODiskLatenciesReadWrite_PaulRandal_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIODiskLatenciesReadWrite_PaulRandal_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIODiskLatencyPercentageByIOStallsByDatabase_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIODiskLatencyPercentageByIOStallsByDatabase_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIODiskUsagePercentageByDatabase_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIODiskUsagePercentageByDatabase_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIODiskUsagePercentageByDriveLetter_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIODiskUsagePercentageByDriveLetter_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetIdealMemUsagePercentTotalAndTargetMemory_Chap03_FindAllCurrentlyBlockedRequests.sql
GetIdealMemUsagePercentTotalAndTargetMemory_Chap03_FindAllCurrentlyBlockedRequests.sql
GetIdealMemUsagePercentTotalAndTargetMemory_Chap03_MemoryPressure.sql
GetIdealMemUsagePercentTotalAndTargetMemory_Chap03_MemoryPressure.sql
GetIndexUsageSimple_Chap04_CommonIndexIssues_IndexUsage.sql
GetIndexUsageSimple_Chap04_CommonIndexIssues_IndexUsage.sql
GetMissingIdxCreate_Chap04_MissingIndexes.sql
GetMissingIdxCreate_Chap04_MissingIndexes.sql
GetPendingIORequests_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetPendingIORequests_Chap03_IOMayBeWhyYourServerIsSlow.sql
GetPendingMemoryGrantsWithQueries_Chap03_MemoryPressure.sql
GetPendingMemoryGrantsWithQueries_Chap03_MemoryPressure.sql
GetRawPerfCounterValuesTotalAndTargetMemory_Chap03_MemoryPressure.sql
GetRawPerfCounterValuesTotalAndTargetMemory_Chap03_MemoryPressure.sql
GetSQLServerEngineProperties_Inventories_Chap02.sql
GetSQLServerEngineProperties_Inventories_Chap02.sql
GetSingletonLookupCount_Chap04_CommonIndexIssues_IndexUsage.sql
GetSingletonLookupCount_Chap04_CommonIndexIssues_IndexUsage.sql
GetTop20TotalQueryResponseTimeForIndividualQueries_Chap03_SlowPerformance.sql
GetTop20TotalQueryResponseTimeForIndividualQueries_Chap03_SlowPerformance.sql
GetTopSQLServerWaits_Chap03_ObservingWaitStatistics.sql
GetTopSQLServerWaits_Chap03_ObservingWaitStatistics.sql
GetTotalServerQueryResponseTime_Chap03_SlowPerformance.sql
GetTotalServerQueryResponseTime_Chap03_SlowPerformance.sql
GetTtlPlanCacheReUse_Chap03_AnatomyCPUMetadataQuery .sql
GetTtlPlanCacheReUse_Chap03_AnatomyCPUMetadataQuery .sql
GetWhatSQLServerIsWtgOnNow_Chap03_AnatomyCPUMetadataQuery.sql
GetWhatSQLServerIsWtgOnNow_Chap03_AnatomyCPUMetadataQuery.sql
Get_sys.dm_os_performance_counters_DMV_Chap03_IntroWaits&Queues.sql
Get_sys.dm_os_performance_counters_DMV_Chap03_IntroWaits&Queues.sql
IdentifyQueriesCausingCPUPressure_Chap03_AnatomyCPUMetadataQuery .sql
IdentifyQueriesCausingCPUPressure_Chap03_AnatomyCPUMetadataQuery .sql
Index_Usage_Stats_Ch07_DefiningCustomDataCollection.sql
Index_Usage_Stats_Ch07_DefiningCustomDataCollection.sql
ListAvailableDMOs_Ch05_PowerOfDynamicManagementViews&Functions.sql
ListAvailableDMOs_Ch05_PowerOfDynamicManagementViews&Functions.sql
MonitorBlockingScript_Ch08_BlockingAndLocking.sql
MonitorBlockingScript_Ch08_BlockingAndLocking.sql
PBMViewEnabledPoliciesScript_Ch10_PolicyBasedManagement.sql
PBMViewEnabledPoliciesScript_Ch10_PolicyBasedManagement.sql
PITWaitTypeScript_Ch07_RollingYourOwn.sql
PITWaitTypeScript_Ch07_RollingYourOwn.sql
PageSplitTrackingRelatedQueries_Ch04_PageSplitTracking.sql
PageSplitTrackingRelatedQueries_Ch04_PageSplitTracking.sql
QuerySystemHeathSessionForErrors_Ch08_MonitoringErrorsWithExtendedEvents.sql
QuerySystemHeathSessionForErrors_Ch08_MonitoringErrorsWithExtendedEvents.sql
QuickIdxFrag_Chap04_IndexFragmentation.sql
QuickIdxFrag_Chap04_IndexFragmentation.sql
RingBufferXEevents_Ch08_MonitoringWithExtendedEvents.sql
RingBufferXEevents_Ch08_MonitoringWithExtendedEvents.sql
SQLLoginSecurityScript_Ch10_ LoginAndPasswordPolicyEnforcement.sql
SQLLoginSecurityScript_Ch10_ LoginAndPasswordPolicyEnforcement.sql
SQLServerBackupReport_Ch09_DatabaseBackupsAndRecoveryModels.sql
SQLServerBackupReport_Ch09_DatabaseBackupsAndRecoveryModels.sql
UpdateMonitoredWaitTypes_SetWaitsToIgnore_Ch07_RollingYourOwn.sql
UpdateMonitoredWaitTypes_SetWaitsToIgnore_Ch07_RollingYourOwn.sql
ViewSuspectPages_BadChecksum_TornPageErrors_Ch09_ Database CorruptionDetectionRecoveryRepair .sql
ViewSuspectPages_BadChecksum_TornPageErrors_Ch09_ Database CorruptionDetectionRecoveryRepair .sql
View all files
You can’t perform that action at this time.