There are many reasons you need a SQL script that captures table, view, column, and key properties. But they all boil down to comparing different states to quickly identify what is different.
Maybe you need to quickly isolate what got missed in the migrations from DEV to TEST environments. Maybe you need to quickly identify what changed between this release (AFTER) and the prior release (BEFORE). Maybe you want to run the script daily and output state snapshots to text files so that in the event of an emergency you can quickly identify what changed between given dates.
This short video walks you through downloading the simple script, executing it, outputing the schema snapshot to text file, then repeating under different states and using a free text file diffing tool like "SourceGear DiffMerge" or "PrestoSoft ExamDiff" to quickly visualize the differences.
------ Chapter Timestamps (click to jump forward): ----------------------------
0:00 - Intro
0:08 - Ever Needed to Troubleshoot What Schema Change Broke Your App?
0:43 - Ever Needed to Test for Schema Changes?
1:14 - Specific Examples of Table Schema Changes
2:05 - Caveat: Limited to Tables & Views
2:41 - How to Run Script (Environments & Across Time)
3:58 - Demo: How to Download the Script
4:38 - Demo: How to Capture Schema Snapshots
6:18 - Demo: How to Compare Schema Snapshots
9:16 - Bonus Tip: Uses Information Schema
9:53 - The End
Download:
- raw.githubusercontent.com/Dat...
Watch related playlist videos:
- • SQL Server Scripts for...
Connect with me on social media:
- LinkedIn: / mpiercead576
- KZitem: / @dataresearchlabs
- GitHub: github.com/DataResearchLabs
Subscribe to my KZitem Channel:
- / @dataresearchlabs
Background Music (via KZitem "always free" Audio):
- "Rewind" by Ofshane: / @ofshane
#MSSQL #SchemaDiff #SchemaDump #SchemaCompare
Негізгі бет Тәжірибелік нұсқаулар және стиль How to Compare SQL Server Schemas Using a SQL Script
Пікірлер: 6