Summary
This article discusses how the SQL Script Schema Version works.Synopsis
The Schema Version field is found in SQL Scripts View | General Tab and can be used to version SQL scripts so they are run only when needed. The schema is specific to each SQL script.
Discussion
InstallShield creates an InstallShield table in the target database in order to maintain the schema version. This table holds the highest schema version from any executed SQL scripts in the last SQL connection. The schema version is used when making additional connections in the same project or during an upgrade to decide whether to run various SQL scripts. Here is an example:
Connection A
+ Script 1 (4.0)
+ Script 2 (3.0)
Connection B
+ Script 3 (4.1)
+ Script 4 (3.1)
InstallShield gets the current schema from the database each time a connection is opened and stores the highest version each time a connection is closed. The behavior of the preceding scripts is as follows assuming that both Connection A and B target the database named TestDB on TESTSQL2K server, and TestDB currently has schema version equal to 2.0:
- Open Connection A (connecting to TestDB on TESTSQL2K).
- Retrieve the current schema from TestDB = 2.0.
- Run Script 1 (4.0 > 2.0).
- Run Script 2 (3.0 > 2.0).
- Write 4.0 to TestDB as the current schema.
- Close Connection A.
- Open Connection B (connecting to TestDB on TESTSQL2K).
- Retrieve the current schema from TestDB = 4.0.
- Run Script 3 (4.1 > 4.0).
- Do not run Script 4 (3.1 < 4.0).
- Write 4.1 to TestDB as the current schema.
- Close Connection B.
Additional Information
The SQL script always executes if no schema version is specified.
The SQL schema data is not automatically removed from the database upon uninstallation. It is necessary to run a custom script upon uninstallation to remove the version number or drop the table if you want the installation to roll back the changes.
For more information on the Schema Version field, see Flexera Software Helpnet topic General Tab.
Related Articles
Switch SQL Script Settings to Use Oracle ODBC Driver 5Number of Views Use a SQL script to accept asset links in bulk 8Number of Views SQL script to check the database permissions for LicenseManagerUser 135Number of Views How do I order the SQL script generated by Installshield to input data to the tables in a particular order? 18Number of Views Resolve Snow Update Service self-update failure caused by missing snowschema.version in srcsettings.json 15Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago