

We’ll create an initial snapshot and save it to the Root path (as specified in the Config file) using ApexSQL Diff. Snapshots can be created directly from ApexSQL Diff and can be used by ApexSQL Diff to compare to a database to produce a difference export, which we’ll be using later in the article To accomplish this, we’ll use ApexSQL schema snapshots, a proprietary and lightweight file that contains an entire database schema. To do this we’ll need to establish (and periodically reset) the baseline and compare it to our actual database To create a “Smart” data dictionary, our dictionary much be “change aware” so that it only writes changes (new, updated and deleted objects). The first step in the process of creating a Data dictionary is setting up the data sources. The config file must be located in the same directory as the PowerShell script Learn more about different options for handling database credentials hereĪ configuration file (config.xml), that provides the name of the SQL Server and the Database where the Data dictionary is located and also provides SQL Server and the Database name which changes we are tracking. For SQL Server authentication the script can be modified to use encrypted credentials stored in the project file itself. Integrated security for database connectivity. ApexSQL Diff is a 3 rd party tool for comparing SQL Server schemas. The created Data dictionary can be later used for various things like querying to see the full history of object changes or to create aggregate exports showing database change statistics that will be covered in a separate article.ĪpexSQL Diff Professional edition (as this task requires the CLI). Now that we’ve whetted your appetite, this article will explain how to create a smart data dictionary using XML schema change exports from ApexSQL Diff. The article also described the difference between a Dumb and a Smart data dictionary. In the article, “What is a data dictionary and why would I want to build one?” a data dictionary was described and compared to other alternatives to documenting, auditing and versioning a database.
