We have 3 MS SQL Environments: Dev, Test, and Prod. There are many Dev servers, and 1 each in Test and Prod. What is the best way to determine the "Environment" from a query? For instance, we want to watermark Dev and Test SSRS reports if it's dev or test.
I don't want to hard code a check for Prod's server name, in case the server name changes.
I also don't want to check a "settings" table in the database, because then I'm depending on the environment's restore scripts running successfully.
Are there any other solutions that will work from a query?