Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
BuildMaster application variables in a BuildMaster SQL change script
-
Good morning,
I was wondering if it was possible to use BuildMaster application variables in a BuildMaster SQL change script. I couldn't make it work with the standard $variable or between parentheses.
The reason we would use this is to use certain passwords and the names of our databases which are not environment independent.
Thanks in advance and have a nice day,
Nick
Product: BuildMaster
Version: 4.8.6
-
Variables within SQL change scripts are not expanded, the idea being that they should not change at all between environments. Credentials should be part of the Database Connections themselves (i.e. in the connection string) for each instance.
-
A bit late in the game for an answer, but I thought I would add my two cents:
Tod is 100% correct, you do not want to use variables within Buildmaster for this, but you do not need to go the length of over-managing either. To resolve this issue:
- Passwords: Resolve this with the credentials for the database.
- Database name differences: Have your DBA create a Synonym across the board. For example, if your app is named "DirtyHarry" and on DBDEV is called "RevolverDB" and PRODDEV is called "MagnumDB" just create a synonym "DirtyHarryDB" on both servers, resolving to the actual DB name. Then in all your change scripts use DirtyHarryDB... or just set a synonym on DEV to be the same as PROD DB name or vice-versa.
There are quite a few ways you can resolve issues like this, but it is always better to be genericized. We have the same in that we utilize snapshots in DEV that can be in any database location, but in production they are referenced to linked servers.
-Kevin