I am writing a sql script for sql server 2008 where I place a use statement at the beginning that specifies the database the script should be run against:
use [my_database]
As I have different environments where the same database exists, eg dev, qa, prod, is there any way I can specify in the script the environment the script is for, either by server name or ip address or by any other mechanism.
