Skip to content

Commit 7d292e1

Browse files
feat: launch production-ready DBA toolkit
1 parent 63d5734 commit 7d292e1

137 files changed

Lines changed: 4817 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.md]
10+
trim_trailing_whitespace = false
11+
12+
[*.sql]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[*.{yml,yaml,json}]
17+
indent_style = space
18+
indent_size = 2

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto eol=lf
2+
*.sql text eol=lf
3+
*.ps1 text eol=lf
4+
*.svg text eol=lf

.github/issue_template.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Bug report or feature request
3+
about: Report a reproducible problem or propose an operational improvement
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
## Type
10+
11+
- [ ] Bug
12+
- [ ] Feature request
13+
- [ ] Documentation
14+
- [ ] Compatibility report
15+
16+
## Summary
17+
18+
Describe the operational problem clearly.
19+
20+
## Environment
21+
22+
- SQL Server or Azure SQL product:
23+
- Exact version and edition:
24+
- Client tool and version:
25+
- Script path and revision:
26+
- Database compatibility level:
27+
28+
## Reproduction or use case
29+
30+
Provide minimal, sanitized steps and input parameters.
31+
32+
## Expected and actual behavior
33+
34+
Explain what you expected and what occurred. Include sanitized errors or representative output.
35+
36+
## Permissions and impact
37+
38+
List the execution identity's relevant permissions and any observed CPU, duration, blocking, or I/O impact.
39+
40+
## Additional context
41+
42+
Add plans, screenshots, or references with secrets and production data removed.
43+
44+
## Checklist
45+
46+
- [ ] I searched existing issues.
47+
- [ ] I removed credentials, hostnames, customer data, and other sensitive information.
48+
- [ ] I tested the latest version.

.github/pull_request_template.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Summary
2+
3+
Describe the problem and the focused change.
4+
5+
## Validation
6+
7+
- SQL Server/Azure SQL versions tested:
8+
- Required permissions:
9+
- Commands or checks run:
10+
- Representative result:
11+
12+
## Safety
13+
14+
- [ ] The script is read-only, or mutations are opt-in and preview-first.
15+
- [ ] Dynamic SQL uses safe identifier quoting and parameterization where applicable.
16+
- [ ] No credentials, personal data, server names, or customer data are included.
17+
- [ ] DMV reset semantics, units, limitations, and compatibility are documented.
18+
- [ ] Documentation and changelog entries are updated when needed.
19+
20+
## Related issue
21+
22+
Closes #

.github/workflows/lint.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: quality-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
markdown:
19+
name: Markdown lint
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: DavidAnson/markdownlint-cli2-action@v20
24+
with:
25+
globs: |
26+
**/*.md
27+
28+
sql:
29+
name: SQL lint
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.13"
36+
- run: python -m pip install sqlfluff==3.4.2
37+
- run: sqlfluff lint scripts dashboards --dialect tsql
38+
39+
links:
40+
name: Link check
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: lycheeverse/lychee-action@v2
45+
with:
46+
args: >-
47+
--verbose
48+
--no-progress
49+
--accept 200,429
50+
--exclude-mail
51+
"**/*.md"
52+
fail: true
53+
54+
pull-request:
55+
name: Pull request policy
56+
if: github.event_name == 'pull_request'
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Validate pull request metadata
60+
env:
61+
TITLE: ${{ github.event.pull_request.title }}
62+
BODY: ${{ github.event.pull_request.body }}
63+
shell: bash
64+
run: |
65+
test ${#TITLE} -ge 10
66+
test ${#BODY} -ge 40
67+
echo "$TITLE" | grep -Eq '^(feat|fix|docs|refactor|test|ci|chore)(\([a-z0-9-]+\))?: .+'

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
release:
14+
name: Publish release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Build release archive
21+
shell: bash
22+
run: |
23+
version="${GITHUB_REF_NAME:-manual}"
24+
git archive --format=zip --output="sqlserver-dba-toolkit-${version}.zip" HEAD
25+
sha256sum "sqlserver-dba-toolkit-${version}.zip" > checksums.txt
26+
- name: Create GitHub release
27+
if: startsWith(github.ref, 'refs/tags/')
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
generate_release_notes: true
31+
files: |
32+
sqlserver-dba-toolkit-*.zip
33+
checksums.txt

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.DS_Store
2+
Thumbs.db
3+
*.log
4+
*.bak
5+
*.trn
6+
*.sqlaudit
7+
.idea/
8+
.vscode/
9+
.venv/
10+
__pycache__/
11+
.sqlfluffcache

.markdownlint.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD024": {
5+
"siblings_only": true
6+
},
7+
"MD033": {
8+
"allowed_elements": [
9+
"a",
10+
"img",
11+
"p"
12+
]
13+
},
14+
"MD041": false
15+
}

.sqlfluff

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[sqlfluff]
2+
dialect = tsql
3+
templater = raw
4+
max_line_length = 120
5+
large_file_skip_byte_limit = 0
6+
exclude_rules = layout.select_targets, layout.long_lines, layout.indent, layout.cte_newline, layout.keyword_newline, ambiguous.column_count, ambiguous.order_by, structure.column_order, structure.join_condition_order, structure.subquery, convention.casting_style, aliasing.expression, aliasing.unused, aliasing.unique.column, references.qualification, references.keywords
7+
8+
[sqlfluff:indentation]
9+
tab_space_size = 4
10+
11+
[sqlfluff:rules:capitalisation.keywords]
12+
capitalisation_policy = upper
13+
ignore_words = max
14+
15+
[sqlfluff:rules:capitalisation.identifiers]
16+
extended_capitalisation_policy = consistent

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
### Added
10+
11+
- Initial documentation, contribution standards, and community health files.
12+
- Diagnostic and operational T-SQL catalog across performance, monitoring, backup, maintenance, security, availability, and Azure SQL.
13+
- Power BI and Grafana query datasets and implementation guides.
14+
- Markdown, SQL, link, pull request, and release automation.
15+
16+
## [1.0.0] - 2026-07-28
17+
18+
### Added
19+
20+
- First public release of SQL Server DBA Toolkit.
21+
22+
[Unreleased]: https://github.com/viperconsultoria-hub/sqlserver-dba-toolkit/compare/v1.0.0...HEAD
23+
[1.0.0]: https://github.com/viperconsultoria-hub/sqlserver-dba-toolkit/releases/tag/v1.0.0

0 commit comments

Comments
 (0)