Way to identify DB connection in SQL developer script? [message #389156] |
Fri, 27 February 2009 07:45 |
dpgrieves
Messages: 4 Registered: January 2007
|
Junior Member |
|
|
I've written a simple script to clean out my test database so I can mess it up as much as I want and start out fresh every time.
Right now, the script is just a bunch of TRUNCATE TABLE commands. Here's my problem: I am deathly afraid that some day I'm going to pull the second-biggest bonehead move of my life and run the script on the production server by mistake.
At the moment, the only way I have to make sure I don't do this is manual--I triple check which connection I've chosen before I hit Ok on running the script.
Is there a way to put a failsafe in my script? Something that automatically checks the name of the server I'm connected to, and if it's not the test server, then ABORT ABORT ABORT.
Please help before I ruin my career!
Thanks,
Dan
|
|
|
|
|