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
See 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
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 }}
ptoth
SQL
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
SQL
Public
forked from
mmessano/SQL
Notifications
You must be signed in to change notification settings
Fork
0
(
0
)
Star
0
(
0
)
You must be signed in to star a repository
About
Useful SQL snippets. Mostly for MSSQL
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
11 Commits
11 Commits
Folders and files
Name
Name
Last commit message
Last commit date
CreateIndices.sql
CreateIndices.sql
DBDocumentation_ext_properties.sql
DBDocumentation_ext_properties.sql
DBLevelUserPermissions.sql
DBLevelUserPermissions.sql
DBLevelUserPermissions2.sql
DBLevelUserPermissions2.sql
DMartComponenetExecutionTimes.sql
DMartComponenetExecutionTimes.sql
DMartComponentLoggingPivots.sql
DMartComponentLoggingPivots.sql
DailyStats.sql
DailyStats.sql
DexmaSitesQueries.sql
DexmaSitesQueries.sql
DriveSpace.sql
DriveSpace.sql
Generate_Weekly_Perfmon.sql
Generate_Weekly_Perfmon.sql
IPMonVerificationMaster.sql
IPMonVerificationMaster.sql
IndexMaintenance.sql
IndexMaintenance.sql
IndexMissingNotes.sql
IndexMissingNotes.sql
IndexUsage.sql
IndexUsage.sql
LogShippingTesting.sql
LogShippingTesting.sql
MaintenanceSolution.sql
MaintenanceSolution.sql
OrphanedUserCleanup_bits.sql
OrphanedUserCleanup_bits.sql
ProgressQueries.sql
ProgressQueries.sql
RealECOrdersBy30days.sql
RealECOrdersBy30days.sql
RegExExamples.sql
RegExExamples.sql
ReplicationMonitor_enumeratequery.sql
ReplicationMonitor_enumeratequery.sql
ReplicationMonitor_job.sql
ReplicationMonitor_job.sql
SMCIndexCheck.sql
SMCIndexCheck.sql
SQLErrorLogs_queries.sql
SQLErrorLogs_queries.sql
SQLFilesAudit.sql
SQLFilesAudit.sql
SQLQuery23.sql
SQLQuery23.sql
SQLSpaceStats_bits.sql
SQLSpaceStats_bits.sql
SQLStatsQueries.sql
SQLStatsQueries.sql
SQL_Overview_package.sql
SQL_Overview_package.sql
SSISErrorsEmail.sql
SSISErrorsEmail.sql
ServerDefaultLocations.sql
ServerDefaultLocations.sql
ServerInfo.sql
ServerInfo.sql
ServerInfo_html.sql
ServerInfo_html.sql
TempMigrationTablesToDelete.sql
TempMigrationTablesToDelete.sql
UsefullRegEx.sql
UsefullRegEx.sql
VerifyDBFiles.sql
VerifyDBFiles.sql
VerifyFiles.sql
VerifyFiles.sql
VerifyRRD.sql
VerifyRRD.sql
add_mmessano_db_operator.sql
add_mmessano_db_operator.sql
alter_db_logicalnames.sql
alter_db_logicalnames.sql
attach_db_script.sql
attach_db_script.sql
backupset_queries.sql
backupset_queries.sql
blat.sql
blat.sql
buffer_pool_usage_by_db.sql
buffer_pool_usage_by_db.sql
compare_db_powershell.sql
compare_db_powershell.sql
compare_sprocs.sql
compare_sprocs.sql
compare_tables.sql
compare_tables.sql
create_ScriptTableData.sql
create_ScriptTableData.sql
create_columnlist.sql
create_columnlist.sql
create_db_changeowner.sql
create_db_changeowner.sql
create_db_changeowner_All.sql
create_db_changeowner_All.sql
create_db_dropuser_All.sql
create_db_dropuser_All.sql
cur_sync_users_logins.sql
cur_sync_users_logins.sql
database_execute_permissions.sql
database_execute_permissions.sql
date_manipulation.sql
date_manipulation.sql
daysCTE.sql
daysCTE.sql
dbamaint_create.sql
dbamaint_create.sql
dbm_BackupTranLogs.sql
dbm_BackupTranLogs.sql
dbm_Find.sql
dbm_Find.sql
dbm_ForEachDB.sql
dbm_ForEachDB.sql
dbm_LockTree.sql
dbm_LockTree.sql
dbm_SSAJ_SQL_Server_System_Report.sql
dbm_SSAJ_SQL_Server_System_Report.sql
dbm_get_waitstats_2005.sql
dbm_get_waitstats_2005.sql
dbownertosa.sql
dbownertosa.sql
default_directories.sql
default_directories.sql
dmart_bits.sql
dmart_bits.sql
dmart_bits_IAPPBO510.sql
dmart_bits_IAPPBO510.sql
dmart_bits_PSQLRPT10.sql
dmart_bits_PSQLRPT10.sql
dmart_bits_PSQLRPT24.sql
dmart_bits_PSQLRPT24.sql
dmart_bits_STGSQLDOC710.sql
dmart_bits_STGSQLDOC710.sql
dmart_bits_STGSQLMET620.sql
dmart_bits_STGSQLMET620.sql
drop_SQLErrorLogs_duplicates.sql
drop_SQLErrorLogs_duplicates.sql
drop_dbs_in_norestore.sql
drop_dbs_in_norestore.sql
drop_user.sql
drop_user.sql
enable_DBMail_modified.sql
enable_DBMail_modified.sql
enum_indexes.sql
enum_indexes.sql
enum_permissions.sql
enum_permissions.sql
ex_CTEExample.sql
ex_CTEExample.sql
ex_GROUPBY.sql
ex_GROUPBY.sql
ex_SUMbyColumn.sql
ex_SUMbyColumn.sql
expressmaint.sql
expressmaint.sql
filegroup_location_per_object.sql
filegroup_location_per_object.sql
fix_filenames.sql
fix_filenames.sql
generate_drop_user.sql
generate_drop_user.sql
generate_drop_users.sql
generate_drop_users.sql
index_bits.sql
index_bits.sql
ipmonitor_notes.sql
ipmonitor_notes.sql
jobalertstoDMemail.sql
jobalertstoDMemail.sql
jobownertosa.sql
jobownertosa.sql
ldf_virtuallogfilescount.sql
ldf_virtuallogfilescount.sql
linkedserver_bits.sql
linkedserver_bits.sql
log_statistics.sql
log_statistics.sql
mandelbrot.sql
mandelbrot.sql
perfmon_bits.sql
perfmon_bits.sql
perfmon_bits2.sql
perfmon_bits2.sql
permissions_db.sql
permissions_db.sql
pivot_examples.sql
pivot_examples.sql
pop_perfmon_new.sql
pop_perfmon_new.sql
pr_RebuildIndexes.sql
pr_RebuildIndexes.sql
proc_controller.sql
proc_controller.sql
View all files
About
Useful SQL snippets. Mostly for MSSQL
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.