Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to restrict a code from running in the production environment?

Status
Not open for further replies.

Walid

Programmer
May 18, 2000
382
0
0
US
Hi,

I am trying to find an elegant way to check, in the beginning of a sproc, if I am in production environment. In which case, I will prevent the code from running. This is suppose to be the last level of protection, of course we will be careful and try to check for this in so many different places in the app but because I am paranoid by nature, only when it comes to coding, I still prefer to have this defense mechanism just in case.

My question is, is any of you ladies and gentlemen, know an elegant way – architectural wise – to perform this. The server name in production is different than dev. Any advice?



Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
Thanks for the reply.

This is what I thought of, originally. But I am looking for more generic way without the code itself being aware of the conditional execution. One of these architectural wows we get here some times.



Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top