Hello and welcome to this ApexSQL Compare general overview video. ApexSQL compare is a standalone SQL server development tool as well as a SQL Server Management Studio and Visual Studio add-in that is capable of performing comparisons of SQL files, file folders, SQL Server database objects, SQL Server database objects for SQL Azure Databases and Amazon RDS.
ApexSQL Compare can also perform two-way comparisons and mergers, compare lines character by character, automate and schedule comparisons, integrate into SQL Server Management Studio and Visual Studio, and more.
ApexSQL Compare consists of three main components: a Windows application used for visual comparison and synchronization, selecting specific comparison options, comparison modes, and ignore options for comparison and synchronization processes, a console application which allows users to schedule and automate comparison and synchronization and also create HTML reports via command line interface, add-ins including both a SQL Server Management Studio and Visual Studio add-in that enables the user to initiate file comparisons directly from the respective host system.
Please note that SSMS and Visual Studio add-ins are optional components that can be selected or de-selected during installation.
Upon starting the application, the New Project window will be shown where two comparison types can be chosen: files or folders. First, let's choose the files comparison type. In the New Project window, select the Data Sources tab and the view for selecting objects comparison will be shown. There are two types of data sources that can be chosen for comparison from this view.
Using the first type, the file can be chosen for comparison. For example, on the left side view, a SQL script with some changes can be chosen to pair it with some previous version of the script selected on the right side. Let's use one new version of a database build script and compare it with the previous version.
Next, we can switch to the Options tab where there are two sets of options: the comparison mode to choose the way the changes are marked and Ignore Options to set which common SQL script differences will be ignored with comparison. In this case, like scripted permissions or comments, which are not crucial for the comparison of the two script versions, will be ignored.
The ignored differences will not be highlighted after the comparison to reduce unnecessary visual noise. When everything is set up, click the Compare button and the comparison process will be initiated. After the comparison process is done, the comparison results will be shown in the main window.
For the other type of compare in the data sources view of the new project window, choose database object. This way, two versions of one or more database objects can be compared for analysis. When the data sources are specified, switch to the Options tab to choose between comparison modes and set specific ignore options. Let's choose the character comparison mode and the options to ignore differences, such as ANSI options, comments, and permissions.
When everything is set up, click the Compare button and the comparison process will be initiated. After the comparison process is done, the object's DDL script will be compared, will be displayed in the main window with all differences highlighted. Since character comparison mode was used, different rows along with all individual character differences are highlighted.
Because the objects are compared in their scripted form, it is possible to compare a SQL script file with a corresponding database object on an apples-to-apples basis to review changes before any updates. The differences can be viewed at the bottom of the Main Application window in the status bar.
Four types of differences are shown including, missing, the number of lines that exist only in the left side; different, the number of lines that exist in both sides, which have differences; additional, the number of lines that exist only on the right side; equal, the number of lines that exist on both sides, which are equal.
Under the Home tab, there's a Merge View option that allows selected differences from both left and right panels. The merge script can be copied to a clipboard and saved to a file. If there is a need to locate a specific word or change under the View tab in the main window, click the Find button, it will show the Find Panel where Panel is selected. In which, search should be conducted and enter a desired search term. In this example, the word status is entered, chosen, and found on the left side in the comparison object.
Now, let's initiate a new project and choose the folder's comparison type. Select the specific folders for comparison on the left and right side. In the Options tab, set the desired Comparison Options. For the purpose of this video, two options are checked, compare hidden files, and ignore files with extension.
Once everything is set, click the Compare button. After the comparison process is finished, the results are shown side by side. Differences are highlighted by type: missing files and folders existing in the left but not in the right folder are red, different files and folders existing in both left and right folders but files are different are blue, additional files and folders existing in right but not in the left folder are green, equal files and folders existing in both left and right folders and they are equal are white.
The chosen files and folders can be copied or synchronized from one side to another. The Copy option will copy only selected files from one to another side. The Sync option will synchronize all files from one to another side.
In this video, synchronization is performed from the left to the right side and the prompt message will be shown upon clicking the Sync Right button and it will ask the user to confirm the synchronization and overwrite the existing files on the right side. After synchronizing from the left side to the right, in the results grid, both sides should have equal numbers of files