Use PowerShell
Real Admins Script
Real Admins Script
I regularly am working with several versions of a database for an application that I manage (a live database, training database, test database, and previous version database). Occasionally, I need to know what the differences between the databases are, especially after our vendor updates my test environment or right after an update in my training or live environment.
Since I spend a good portion of my day in PowerShell, I wrapped some system table queries in a PowerShell script and use Compare-Object to find any differences in the tables and compare the column definitions as well. The queries targets only user tables.
Compare-DatabaseSchema.ps1 takes several parameters.
I still have to add some checks for the various constraints, but that will come later.
You can find the script on PoShCode.org.
April 30, 2009 - 8:16 pm
You know, the thing about SQL is, that there is virtually nothing that can replace it.
Does anyone know if a substitute exists for sql? I mean besides MS SQL and Oracle and all that jazz. Thanks.