In this article I will talk about the process of updating Microsoft SQL Server databases and propose a software product that can be used in the interaction of a customer and a contractor.
First of all, why is it necessary
Our company develops software and in most cases we use Microsoft SQL Server as a DBMS. For definiteness, we will call the developer company the “
performer ”, and the client company the “
customer ”.
In the process of making changes to the database, programmers create a set of scripts created manually or in a specialized software package.
Subsequently there are such tasks:
- on the performer’s side, check the execution of a set of scripts in the test database;
- on the customer side, run scripts in the client's working database;
Suppose that both a programmer and a tester can verify the execution of scripts in a test database using Microsoft SQL Server Managerment Studio (SSMS). But it is impossible to force the customer to carry out these operations in SSMS, since:
- he may not have SSMS installed at all;
- the customer may not have knowledge of working with the database. And should not by and large;
- in case of errors when executing scripts, it will be difficult for the customer to assemble them for sending to developers;
How we solve the specified task
We have developed a software "Database Update Manager", which consists of two programs:
- a program to prepare a service pack;
- program to perform the service pack;
The program for the preparation of updates
The program is used by the performer. Programmers with its help form a set of scripts in one file.
')

Of the features of this program, two points can be noted:
- Information about the structure of the reference database can be added to the generated update package. If such information is present in the package, after completing the update, the customer can compare the structure of its database with the reference one;
- for the customer, the update execution program is transmitted as a single EXE file, inside which the scripts and the structure of the reference database are wired.
The program to perform the update
As already mentioned, the program is launched using a single EXE file. In most cases, the user just needs to enter the registration information (by the way, these values ​​can be stitched into the update package) and click “Next” everywhere.

The second screen is updated. After that, a comparison of the structure of the reference database wired into the package and the current one (on which the update was performed) can be made.


Analysis of discrepancies in the structure is made in the graphical interface of the update program.

Unfortunately, the programmer’s review of discrepancies is carried out in a text log file, which the customer subsequently sends. An interesting approach to solving this problem is proposed in the article
Control of database structure changes . This task is not so critical; programmers themselves can write a script to bring the structure to the target.
The software package is distributed under the Freeware license agreement, you can download the installer via the link
Database Update Manager