I'm writing a program to sanitize a dev database. The dev database is just a recent backup of the live database.
It would be disastrous if the sanitize routine ever ran against the live database. As such, I'm taking extra measures to ensure that the program can only run against the dev database.
At the beginning of the program I'm clearing out all possible lingering connection handles:
LOCAL lnX
FOR lnX=1 TO 999
TRY
=SQLDISCONNECT(lnX)
CATCH
ENDTRY
ENDFOR
I'm verifying that the connection string in use points to the dev database.
I've added a record to the master options table in the dev database which only exists in the dev database. My routine double checks that this record exists.
Are there any other ideas or best practices for this? There is no such thing as too paranoid here!
Brandon Harker
Sebae Data Solutions