Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Practices to Ensure Working with Dev DB?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Best Practices to Ensure Working with Dev DB?
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01529519
Message ID:
01529519
Views:
95
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
** to ensure any open db connections are closed
FOR lnX=1 TO 999
	TRY
		=SQLDISCONNECT(lnX)
	CATCH
		** no biggie
	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
Next
Reply
Map
View

Click here to load this message in the networking platform