What we would like to accomplish is to test to see which scripts have been run against a user's database. During support issues, they may be given a temporary update SQL script that will later be folded into the next release. We have a table in their DB that keeps track of which updates have been applied and we want to find out at the beginning of the install what their DB looks like.
We have tried to schedule several (18 as of now) "Query SQL Database fo Data" custom actions that query for the value and assign the value to an internal installer property and then test these properties when determining if we should install the script.
The problem is that on many of the faster machines, about 4-8 of them execute (in somewhat random order), then the machine freezes. I have tried placing them in several different places in the installation sequence and the only thing that changes is how many of them get executed before the machine freezes and the ones that are skipped in the sequence. I've used a SQL profiler and all that gets executed are the few random checks. I've played with lock avoidance hints and that doesn't change anything.
My objective is to "run any script that has not been run on THIS database where "THIS" is determined by examining the database during the installation process and comparing it to a "available updates" for that database.
Any ideas:
- why the queries are not running in order and then freezing?
- if there is a way to accomplish the objective - what is built-in assumes that everyone must take the same "update order"
- I know that the if-then-else versioning could be put into the scripts themselves but we have 10's of thousands of lines of SQL scripts in multiple products that are constantly changing - it would be impossible to manage such an effort
We use the AE 10.2 Enterprise Edition on Windows Server 2003-Windows Server 2012 and SQL Server 2005-2012.
FOLLOW US
Get the latest news in Application Packaging