Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practices to Ensure Working with Dev DB?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01529519
Message ID:
01529549
Vues:
40
Connection information is part of configuration. Don't have anything configured on your dev machine that connects to a production database. If you do need to connect to production, do it from a virtual machine. That way, you won't have the problem.

>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!
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform