Script for pushing database change to servers -


This is probably the most classic database problem.

I have an e-commerce software solution that is hosted on a SQL server for data, and a web server for the frontend. Every instance / client has its own database of SQL Server 2008.

During the development of the next edition, I can change or add tables, scenes, stored procedures, etc.

How do I publish this change in all the databases, without losing data? It should be done in a script or something similar. The centralized management key is ...

This problem is essentially one of the manual processes to log in Is running a script against a single SQL server, and against one or more databases, which makes the necessary modifications by you.

This is worse, of course, if you need to update the examples of SQL Server you need to, and therefore do not have direct access.

It is also important to make sure that the script has been implemented in the sequence - it will not make any sense to run the "Add Index" script before the "Make Table" script.

The way we have solved it, it is with a web service that writes the package as a dataset, and when sending a remote system to the correct sequence while calling it at home.

On the remote SQL Server, we have a net application that calls the web service, downloads script files, unpacks them, and applies them to the database.

When remote system calls, this is the most recent upgrade ID. When the web service is complete, it finally knows that it was distributed. So it is trivial to know what level system the remote system is at.

Only manual intervention is required, to create scripts in the first place and upload them to the central server.


Comments