Validating database schema

primary keys, unique constraints, foreign keys, etc) I've written a set of queries for exactly this purpose on SQL Server for a past job - it worked well to identify differences.Many of the queries were using LEFT JOINs with IS NULL to check for the absence of expected items, others were comparing things like column types or constraint names. I found this small and free tool that fits most of my needs.I wrote a simple app that validates and XML document using an XSD schema just to show you how to write the code. You’ll first instantiate an XMLSchema object and add to it the XSD schema file that you already have.When you call the Add method, the first parameter is the namespace that your XML document uses.

We can recommend you a reliable SQL comparison tool that offer 3 time’s faster comparison and synchronization of table data in your SQL Server databases.

On my current gig this was no problem at all, as the DBA's here were already using it.

The basic methodology for using these tools is to maintain a reference script that builds the database and keep this in version control.

You’ll need to get a copy of MSXML 4.0 and install it.

Assuming you already have the schema and the XML document, all you need now is a few lines of code to validate.

Search for validating database schema:

validating database schema-2validating database schema-88validating database schema-85validating database schema-37

What makes it even more interesting is that, besides user validation, it can be used to define database schemas as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating database schema”

  1. And, judging by Olivia Munn's follow-up comment (consisting of two yellow heart emojis and a shooting star, in that order) it looks like at least one of the duo's famous friends was all about G-Eazy's heartfelt birthday gesture, too.