How reliable the below two statements are? I am planning to develop a generic script which should work in in all the server and database (environments) using the below two statements.
By getting the server and databases names from DEV TEST and PRODUCTION I am planning to use them with IF branching to execute the corresponding statements
SELECT @DatabaseName = DB_NAME()SELECT @ServerName = @@Servername
Neil