473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How do you manage changes from development server to production server?

Hi!

What started out as a simple test of mysql has turned into what is
quickly becoming a replacement for our entire business system and web
site

The bad news is that we are now wrestling with how to we continue
working on development the system without risking down time for users.
If we work on a development server, how can we log the changes to table
structure and then apply them to the live database on the production
server when we are done testing?

Is there some sort of tool or log that would just let us apply table
structure changes to another copy of the database?

Jul 29 '05 #1
4 2197
zacware wrote:
Is there some sort of tool or log that would just let us apply table
structure changes to another copy of the database?


I use mysql-console for small changes by giving direct sql-commands like:
alter table user add column age int unsigned default 0;

But if there are many changes I usually create .sql file with similar
commands as above, but in one while. And then I use the same
mysql-console either by copy-pasting the queries to there, or if there
are too many, I call from commandline:
$ mysql -u user -p databasename < queries.sql

Which is basicly same as copy-pasting queries from a file into the
database, except without force-flag execution of queries is stopped on
errors.
I usually do this so that I write the query down. Then I copy-paste it
to development release to see that it actually works. After testing I
copy-paste the same query to release-database.

If you want to minimize the risk of making errors. Create one single
file where you will put all the update queries. Then, under or above of
each query write down when and where you have executed it. This way you
should see right away if some query is not executed for example in
release version.
Jul 29 '05 #2
zacware wrote:
Hi!

What started out as a simple test of mysql has turned into what is
quickly becoming a replacement for our entire business system and web
site

The bad news is that we are now wrestling with how to we continue
working on development the system without risking down time for users.
If we work on a development server, how can we log the changes to table
structure and then apply them to the live database on the production
server when we are done testing?

Is there some sort of tool or log that would just let us apply table
structure changes to another copy of the database?

Since you are dealing with a business and can't afford
interruptions to service you need two things: 1 - a test server
and 2 - a release control system.

A release control system can be as simple as once a week copying
the development database and programs to the test server and
then running an exhaustive set of tests and once satisfied
copying the programs and modifying the database on the
production server.

If you find that you consistently need more than one release per
week you have some serious development problems that you had
better fix -- quickly.

Once your system matures you should be able to increase to semi
annual or annual major releases with minor releases as needed to
cope with external changes that force changes to your applications.

HTH
Jerry
Jul 29 '05 #3
zacware wrote:
Hi!

What started out as a simple test of mysql has turned into what is
quickly becoming a replacement for our entire business system and web
site

The bad news is that we are now wrestling with how to we continue
working on development the system without risking down time for users.
If we work on a development server, how can we log the changes to table
structure and then apply them to the live database on the production
server when we are done testing?

Is there some sort of tool or log that would just let us apply table
structure changes to another copy of the database?

I use phpMyAdmin which lets me make those changes manually real easy and
lets me export/import SQL format files that build/rebuild/populate the
tables.

Maybe that doesn't really answer your question though. For incremental
changes once it's up, I simply email myself the various update queries
to keep them together. phpMyAdmin does help visually comparing the two
in case I miss something.
Jul 31 '05 #4
zacware (za*****@comcast.net) wrote:
: Hi!

: What started out as a simple test of mysql has turned into what is
: quickly becoming a replacement for our entire business system and web
: site

: The bad news is that we are now wrestling with how to we continue
: working on development the system without risking down time for users.
: If we work on a development server, how can we log the changes to table
: structure and then apply them to the live database on the production
: server when we are done testing?

: Is there some sort of tool or log that would just let us apply table
: structure changes to another copy of the database?

Often CVS is used as the underlying tool to help control this.

Table definitions and changes (and etc) should always be done via a
script. The person that creates the script should check it into CVS.
After testing, all the scripts that are ready for the next version should
be applied, by someone other than the developer, by checking the code out
of CVS and applying it.

Naturally this should be done several times before being done on the
production server. First the process is done in development, then it's
done to the test server, and finally, it's done to production.

The above just skims the surface, but that's basicly what you need to do.

Aug 1 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bill Willyerd | last post by:
Hello All, I have been searching for a published document for Best Practices concerning access levels based on roles. Should developers have more than (if at all) select level access to...
6
by: Klaus Jensen | last post by:
Hi! I have a pretty traditional setup where I develop on my local PC and the use "Copy Project" to deploy to the production enviroment.. In web.config I need different values for...
0
by: AC [MVP MCMS] | last post by:
I have a web application that is throwing a common error, but in a very unusual state. I'm specifically receiving the following error: "Failed to start monitoring changes to 'd:\inetpub\wwwroot'."...
5
by: Matt | last post by:
Hello, What is the best way to handle the database connection string for a class library project that will be compiled and used as a .dll? This .dll will be accessed via classic ASP and in...
1
by: bay_dar | last post by:
We are wondering what is the best way to go about managing production and development versions of our ASP.NET applications. We often publish a production version of a .NET application but then we...
3
by: RichardLamont | last post by:
We often have to migrate changes to sql server 2000 databases from development to production. Normally we dump the sql from Enterprise Manager for production and development and do a diff (using...
2
by: gsauns | last post by:
Hello, I have just put a new virtual server in place that I intend to make my development server. I would like to develop and test on that new server, and host my production apps on my...
5
by: walterbyrd | last post by:
I don't know much php either, but running a php app seems straight forward enough. Python seems to always use some sort of development environment vs production environment scheme. For...
1
by: Bobby Edward | last post by:
Here's the situation.... 1. Local dev environment is VS2005 and VS2008 / using SQL Express databases for data 2. Hosting company ONLY supports MS SQL Server 2005 databases Here are the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.