Use this index to start from a task instead of a filename. Safety labels describe the script's default behavior; always read the header before execution.
| Label | Meaning |
|---|---|
| Read-only | Observes metadata, runtime state, or data. |
| Generates | Produces commands or a change plan for review. |
| Changes state | Creates, alters, updates, or administers database state. |
| Field note | Purpose | Safety |
|---|---|---|
| DatabaseHealthCheck.sql | Compact snapshot of size, index activity, missing-index signals, foreign-key trust, and fragmentation. | Read-only |
| ActiveRequestsAndBlocking.sql | Active statements, waits, plans, and blocking relationships. | Read-only |
| GetDatabaseInventory.sql | Server-level database status, files, recovery model, and size. | Read-only |
| GetTableSpaceUsage.sql | Per-table rows, reserved space, index space, and unused space. | Read-only |
| GetRecentObjectChanges.sql | Metadata signals for recently changed objects. | Read-only |
| GetDatabaseMailConfiguration.sql | Current Database Mail accounts, profiles, and configuration. | Read-only |
| ListDatabaseObjects.sql | Tables, procedures, and functions in the current database. | Read-only |
| FindObjectDependencies.sql | Objects that reference a selected table or view. | Read-only |
| Field note | Purpose | Safety |
|---|---|---|
| IndexUsageAndCandidates.sql | Compare nonclustered-index reads, writes, and size. | Read-only |
| ForeignKeysWithoutSupportingIndexes.sql | Find foreign keys without an index sharing their leading columns. | Read-only |
| IndexFragmentationReport.sql | Review fragmentation only for indexes above a useful size. | Read-only |
| PartitionedTableExample.sql | Self-contained integer partitioning example. | Changes state |
| CreatePartitionFunctionFromMetadata.sql | Build a partition function from helper metadata. | Changes state |
| UpdatePartitionFunctionFromMetadata.sql | Compare configured values and extend a partition function. | Changes state |
| SwitchStagingTableIntoPartition.sql | Build a staging-to-partition switch with execution off by default. | Generates |
| Field note | Purpose | Safety |
|---|---|---|
| BuildNormalizedAddress.sql | Compose an address while ignoring empty parts. | Read-only |
| ConcatenateRowsWithDelimiter.sql | Aggregate multiple values into one delimited string. | Read-only |
| DateFunctions.sql | Common day, month, quarter, and year boundaries. | Read-only |
| FindMissingNumbers.sql | Find gaps in a numeric key range. | Read-only |
| GenerateIntegerRanges.sql | Group numeric keys into fixed-width batches. | Read-only |
| GeneratePaddedSequentialNumbers.sql | Assign stable zero-padded values with rollback by default. | Changes state |
| GenerateRandomCoordinatesWithinRadius.sql | Generate randomized coordinate samples near a center point. | Read-only |
| CamelCase.sql | Scalar string-capitalization helper. | Changes state |
| TitleCase.sql | Table-valued title-case helper. | Changes state |
| ReplaceCharacters.sql | Reusable character replacement function. | Changes state |
| SearchAndReplaceText.sql | Locate text columns and build cross-table replacements. | Changes state |
| GenerateTableFromView.sql | Generate a table definition from view metadata. | Generates |
| Field note | Purpose | Safety |
|---|---|---|
| Geocode.sql | Call an external geocoding service from a procedure. | Changes state / external call |
| ValidateAddress.sql | Address-validation procedure for modern SQL Server. | Changes state / external call |
| ValidateAddressSqlServer2012.sql | SQL Server 2012-compatible address validation. | Changes state / external call |
| UpdateMissingCoordinates.sql | Apply previously validated coordinates with rollback by default. | Changes state |
| Field note | Purpose | Safety |
|---|---|---|
| AliasLinkedServer.md | Checklist for creating a friendly linked-server alias. | Procedure |
| FindSleepingSessions.sql | Inspect idle sessions and their open-transaction count. | Read-only |
| GenerateKillSleepingSessionCommands.sql | Generate termination commands for conservatively filtered sessions. | Generates |
| ReleaseSQLServerMemory.sql | Temporarily adjust max server memory. | Changes server state |
| BlockLoginsByIPAddress.sql | Server-level logon trigger backed by a block list. | Changes server state |
| RestrictAccessPerApplication.sql | Reject logins from a selected client application and host. | Changes server state |
| RestrictSQLLoginBasedonHostName.sql | Reject logins from selected host names. | Changes server state |
| Field note | Purpose | Safety |
|---|---|---|
| ListTablesAcrossSchemas.sql | List base tables and descriptions across schemas. | Read-only |
| FindMissingNumbers.sql | Find gaps with generate_series. |
Read-only |
| PlanMissingNumberReassignment.sql | Pair high-numbered surplus rows with key gaps without updating. | Read-only |
| DblinkExample.sql | Query a remote source through dblink using placeholders. |
Read-only / external connection |
| GrantReadOnlyRole.sql | Configure reporting roles and default privileges. | Changes state |
| Field note | Purpose | Safety |
|---|---|---|
| CreateReadOnlyUser.sql | Database-scoped reporting account with SSL and no global privilege. | Changes state |
| FindMissingIndexes.sql | Generate expected CREATE INDEX statements. |
Generates |
| GenerateTableRebuildCommands.sql | Generate size-ranked table rebuild commands for review. | Generates |
| Field note | Purpose | Safety |
|---|---|---|
| CreateApplicationUser.sql | Create a schema owner with explicit minimal privileges. | Changes state |
| DescribeTableColumns.sql | Show column comments for one table. | Read-only |
| FindTablesByColumnName.sql | Find tables containing a column-name pattern. | Read-only |
| GetServerName.sql | Return the host serving the current session. | Read-only |
| Field note | Purpose | Safety |
|---|---|---|
| commands.txt | Connection, catalog, object, backup, and restore command notes. | Mixed; review each command |