ApexSQL Data Diff is a tool for comparison and synchronization of SQL Server database data and it can compare live databases and backups. In this article, key and unique features, which create advantages of ApexSQL Data Diff vs. Visual Studio ®, will be shown and explained. The following described features are the features which are available in different versions of ApexSQL Data Diff. Apexsql audit activation key in Title/Summary ApexSQL Audit Viewer The program can be distributed to team members and end users who only need to view auditing reports and don't need access to the administrative features of ApexSQL Audit. ApexSQL Diff all version keygen, ApexSQL Diff activation key, crack. Apexsql Log 2011 Serial Numbers. Apexsql log activation key keygen.rarufffdr instrument lagu batak simalungun.rarufffdr murder 3 songs free download mp3 dj punjab megaufffdr. Key Apexsql log activation key keygen Rar. Auditing and recovery tool that analyzes SQL.
It’s common knowledge that running database changes directly in production, without thorough testing first, should be avoided.
If there are enough resources in the environment, there would be at least one testing and one production SQL Server instance. However, that introduces another challenge. When everything is set up in the test, and runs smoothly and as expected, how can it easily be applied to the production instance?
Synchronizing several objects can be done manually, but applying multiple, complex changes to a live, high transaction database is something that can start an avalanche of problems, if not properly tested and executed.
What to do if wrong changes were applied to the production database, or if something had gone wrong and ended up with the messed-up production database and the incorrect object schemas in the test database. How to compare SQL schemas, and more importantly, how to safely synchronize them?
To compare and synchronize in any of the scenarios describes above, here is what can be done:
Compare the database objects in the production and test databases, using a SQL script such as the following one:
There are various SQL scripts with different approaches that can be used to compare database object schemas. What they all have in common is that they use system objects.
The disadvantage of SQL scripts like this is that it doesn’t compare all object types, it treats object definition only as text and it compares only objects with exactly the same names. So, it cannot be used to compare the tables, Customers and tblCustomers, for example. Also, the system object structure has to be well known.
Once the different objects are found, synchronize them.
The easiest scenarios are to use an Alter script for the object or drop the object and recreate it using the object DDL script. These methods are applicable only if there are no dependencies.
For tables, all records have to be stored first, and then drop and recreate a table using the generated script:
Run SQL Server Management Studio
In Object Explorer, expand the Databases node
Right-click a database, open the Tasks sub-menu -> Generate scripts:
In the Choose objects tab, select the objects to script:
In the Set scripting options tab, click the Advanced button and make sure the Types of data to script option is set to Schema only:
Besides the described disadvantages, the manual synchronization method is not recommended as it:
Doesn’t handle object dependencies. Dependencies are easily overlooked, dependent objects are not scripted, SQL is not executed in the correct order. When SQL is executed without recreating all parent objects first, SQL will fail
Is time-consuming – finding all different objects and creating synchronization SQL for them takes a lot of time. If developers didn’t document each and every change to a detail, this is close to impossible
Error prone – huge databases with a large number of objects are not easy to maintain nor is keeping track of all changes manually. They usually involve complex dependencies which increase the problems manual synchronization brings
Instead of synchronizing databases manually and risk making a mess on the production instance, use SQL database compare tool ApexSQL Diff.
ApexSQL Diff is a SQL Server database comparison and synchronization tool which detects differences between database objects and resolves them without errors. It generates comprehensive reports on the found differences and can automate the synchronization process between live databases, backups, snapshots, script folders and source control projects.
Follow these steps to set up the automation for the schema synchronization process:
Start ApexSQL Diff
Click the New button in the Project management window:
On the Source side of the Data source tab:
Select Database from the Source drop-down list
Specify the SQL instance with the test database from the Server drop-down list
Specify the authentication method for that SQL instance (and a valid set of credentials if SQL Server authentication is chosen)
Specify the test database name in the Database drop-down list
On the Destination side of the Data source tab:
Select Database from the Destination drop-down list
Specify the SQL instance with the production database from the Server drop-down list
Specify the authentication method for that SQL instance (and a valid set of credentials if SQL Server authentication is chosen)
Specify the production database name in the Database drop-down list:
Note: Check the Remember password option, if using SQL Server authentication, as the CLI won’t be able to connect to the source and/or destination data source, unless a password is specified as a switch in the CLI.
Click the Compare button in the bottom-right corner of the New project window once everything is set
After the comparison process is done, select objects from the Results grid that will be included in the synchronization process:
Click the Save button, from the Home tab, to save the project:
The saved project file will be used later for automating the process.
Click the Synchronize button from the Home tab, to initiate the Synchronization wizard:
Select the Synchronize now action in the Output options step:
Once everything is set up, click the Synchronize button in the bottom-right corner of the Synchronization wizard
After the synchronization is finished, the Results window will be shown:
Automating schema sync process
Since the first synchronization was successful and the project file was created, the automation of process can be done by creating a PowerShell script.
In this example, we used SQL Server authentication and the login password is encrypted in the saved project file. Learn more about ways of handling login credentials.
Next, the command that will call ApexSQL Diff and execute its parameters, is provided:
Additionally, the “no differences detected” return code can be utilized in this PowerShell script, so that before each schema synchronization, comparison will be initiated and if there are no schema changes, the job will go back to sleep.
Scheduling schema sync process
Once the PowerShell script is created and saved, it can be easily scheduled in one of the several ways. Learn more about ways of scheduling ApexSQL tools.
There is no need to worry about database synchronization any more. ApexSQL Diff will compare all database objects, check for dependencies and script them along with the objects, make sure the scripts are executed in the correct order, and create a full database backup before the synchronization. All this can be scheduled to run unattended.
Related posts:
April 4, 2013
This article explains how to activate ApexSQL Log on remote SQL Server instances.
ApexSQL Log is licensed per SQL Server instance. It must be activated on each SQL Server instance after the trial period of 14 days expires. Otherwise, ApexSQL Log cannot be used on these SQL Server instances, whether they are hosted on a local or remote server machine.
Note that ApexSQL Log doesn’t require to install server-side components on SQL Server instance directly, only service that enables remote auditing of online transaction log file is installed.
The remote activation process
To activate ApexSQL Log on a remote SQL Server instance:
Click Activate in the Resources tab of the main toolbar
The Server activation center dialog will open. Use the Add server option to add the remote SQL Server instance on which you want to activate ApexSQL Log, if it is not shown in the list
In the Add server dialog choose the desired SQL Server instance from the drop-list and click the Add button
In case the SQL Server instance is not shown in the Server dropdown menu, you can manually type its name or use the Start scan button to find it.
After the SQL Server instance is added to the list in the Server activation center dialog, select it and click Activate server.
The ApexSQL Log activation on server [SQL Server instance name] dialog will open
Use your ApexSQL Log activation key to activate ApexSQL Log on the remote SQL Server instance by selecting either the Online or Manual method.
The remote activation process must be performed for each remote SQL Server instance that you want to activate. Note that each remote SQL Server instance provides different Hardware ID value used for the activation process.