SiberianGuy
SiberianGuy

Reputation: 25312

ensuring correct configuration in different environments

I usually change the connection string in config to connect either to a Test database or to a Production database.

I am afraid some day I will mix up them and execute activities that were intended for the Test database, but execute against the Production database.

Backups minimize impact, but is there something else that can be done to avoid this problem?

My environment is Visual Studio 2010, .NET, MySQL

Upvotes: 0

Views: 84

Answers (2)

Mitch Wheat
Mitch Wheat

Reputation: 300769

Use different account/permissions in different environments.

In a windows environment, use database roles mapped to Windows Groups (if your DB supports it).

Preferably, do not give developers everyday access to Production. If needed, create DOMAIN\userName.admin (or something similiar) accounts to be used in the rare circumstances that developers need to access the production environment.

Upvotes: 2

p.campbell
p.campbell

Reputation: 100637

Deny the developer's accounts the rights/permissions to execute against production. Let's assume you have the ability to create A.D. accounts.

  • Use your regular everyday account against your Dev and Test environments. Deny that account permission to Prod.

  • Create and use another account when executing changes to Production. Name it something clear like Idsa-Admin or Idsa-Prod. This will force you to be explicit and create a connection or login with that account.

Upvotes: 1

Related Questions