From a T-SQL perspective, how would you prevent T-SQL code from running on a production SQL Server? Technology Community › Category: T-SQL › From a T-SQL perspective, how would you prevent T-SQL code from running on a production SQL Server? 0 Vote Up Vote Down VietMX Staff asked 4 years ago Use IF logic with the @@SERVERNAME function compared against a string with a RETURN command before any other logic.