Repository navigation
SQL-Skripte dokumentieren und Beispiele überarbeiten - #2
Merged
Merged
Conversation
Co-authored-by: Rauchendraser <29091752+Rauchendraser@users.noreply.github.com>
Co-authored-by: Rauchendraser <29091752+Rauchendraser@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Rauchendraser
October 3, 2026 09:23
View session
Rauchendraser
marked this pull request as ready for review
October 3, 2026 09:24
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Both snapshot restore examples use invalid DATABASE_SNAPSHOT syntax, and one session query is duplicated.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds documentation headers and improves the readability and safety guidance of the SQL Server training scripts.
Changes:
- Documents each script’s purpose, prerequisites, and operational risks.
- Reformats examples covering backups, snapshots, locking, monitoring, and configuration.
- Preserves upstream attribution and licensing notices.
| File | Description |
|---|---|
Spieltabelle.sql |
Formats the customer revenue view. |
Modul12Locks/0012_Momentaufnahmenisolation.sql |
Documents snapshot isolation. |
Modul12Locks/0012_Locks setzen.sql |
Clarifies locking examples. |
Modul11IndizesStatistiken/51_forward_record_Count.sql |
Documents forwarded-record analysis. |
Modul11IndizesStatistiken/50_Indizes.sql |
Adds index-design guidance. |
Modul11IndizesStatistiken/07_Statistiken.sql |
Documents statistics concepts. |
Modul11IndizesStatistiken/07 Fehlende Indizes.sql |
Clarifies missing-index recommendations. |
Modul10Monitoring/Z_SQL Server 2022 Diagnostic Information Queries.sql |
Adds an upstream-script header. |
Modul10Monitoring/z_Perfmon_Indikatoren.sql |
Documents performance counters. |
Modul10Monitoring/40_Monitoring.sql |
Introduces monitoring guidance. |
Modul10Monitoring/10_Werkzeuge.sql |
Documents diagnostic tools. |
Modul10Monitoring/10_WAIT_STATS.sql |
Reformats wait-statistics analysis. |
Modul10Monitoring/10_QueryStore.sql |
Documents Query Store concepts. |
Modul05BackupSnapshot/Snapshot.sql |
Reworks snapshot examples. |
Modul05BackupSnapshot/Backup.sql |
Rewrites backup and restore guidance. |
Modul03DBSettings/Partitionierung.sql |
Documents partitioning examples. |
Modul03DBSettings/DBSettings.sql |
Adds database-settings guidance. |
Modul03DBSettings/DBObjekte.sql |
Documents database-object comparisons. |
Modul03DBSettings/Dateigruppen.sql |
Formats filegroup creation examples. |
Modul03DBSettings/04_DBobjekte.sql |
Clarifies object-performance notes. |
Modul03DBSettings/03_DBSettings.sql |
Formats database-option examples. |
Modul02SystemDBs/05_SystemDBs.sql |
Reworks system-database notes. |
Modul01ServerSetup/02_Setup.sql |
Documents setup considerations. |
Modul01ServerSetup/02_MAXDOP.sql |
Rewrites MAXDOP examples. |
Modul01ServerSetup/01_Virtualisierung.sql |
Documents virtualization guidance. |
Modul01ServerSetup/01_Installation.sql |
Adds installation-planning guidance. |
MaintenanceSolution.sql |
Adds an upstream maintenance header. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| -- Stellt Northwind auf den Stand des Snapshots zurueck. | ||
| RESTORE DATABASE [Northwind] | ||
| FROM DATABASE_SNAPSHOT = [SN_Northwind_1152]; |
Comment on lines
+80
to
+84
| -- Alternativ nur Sitzungen der Quelldatenbank und des Snapshots anzeigen. | ||
| SELECT * | ||
| FROM sysprocesses | ||
| WHERE spid > 50 | ||
| AND dbid IN (DB_ID(N'Northwind'), DB_ID(N'nw_1616')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Die 29 SQL-Dateien erhalten am Anfang eine Beschreibung ihres Themas. Ausgewählte T-SQL-Beispiele wurden formatiert, sprachlich überarbeitet und mit Erläuterungen versehen.
Beispiel für die neuen Dateiheader: