BubbaT
BubbaT

Reputation: 1840

How to maintain production and developer database?

How would you maintain separate production anddeveloper databases when working on one machine, which you can toggle transparently? I've seen some close subjects but none of them seem to match.

Upvotes: 2

Views: 1125

Answers (3)

Rowland Shaw
Rowland Shaw

Reputation: 38128

Ideally the production environment shouldn't be on the same host as the development environment (so any accidentally long running or intensive queries don't take down production).

One approach I've used in the past where I needed a QA environment and a development environment side-by-side, was to use different instances of SQL Server, which had the added advantage that inter-database queries were relatively "safe", and didn't need changing between environments; Then just have different config files as appropriate.

Upvotes: 1

Nick Kavadias
Nick Kavadias

Reputation: 7368

Call one database prod and one dev. use a different set of username/password pair for production and development.
You can toggle the connection string & change the database, username and password.

Upvotes: 2

Mitchel Sellers
Mitchel Sellers

Reputation: 63136

I typically see this done one of two ways.

  1. Use two configuration files, and simply rename them as needed to enable each environment

  2. Use two copies of the application/website on the machine, one that is production one that is dev.

I personally prefer the second option, as I find that the first one makes it WAY too easy to accidentally be on the production database.

Upvotes: 0

Related Questions