< Day Day Up > |
IN THIS CHAPTER
In Chapters 5 and 6 we examined how to create useful and efficient DB2 database objects. After we create databases, table spaces, tables, indexes, and so on, we build application programs to access the DB2 data and move everything into production. Eventually, we will need to change the database to meet changing business needs. One of the bigger causes of database downtime is when changes are made to DB2 database structures. This is so because many of the most common changes required of DB2 objects cannot be supported with simple ALTER s. Instead, DBAs are required to DROP the object and then re- CREATE it with the desired changes. Such changes can be tedious and error-prone . Suppose you need to extend the length of a column in a table, perhaps because business conditions have changed, necessitating longer values. For example, (for V7 and all previous releases) to change a CHAR(10) column to CHAR(15) , the following steps need to occur:
You can see how this intensive manual process can be very time-consuming , and the data is unavailable for the duration of this procedure. Furthermore, if you miss any single item or step, the resulting database structures will not be accurate and problems will arise. Of course, not all database changes require such drastic steps. Many changes can be made using a simple ALTER to change specific aspects of a DB2 object. Sometimes the object will need to be stopped and started for the change to take effect, sometimes not. DB2 V8 features online schema evolution to begin the process of making more types of database changes possible without requiring objects to be dropped and re-created. NOTE Third-party ISV tools are available that make the process of modifying DB2 database structures easier and safer. These products provide a simple menu-driven interface that allows the user to indicate the changes to be made. The tool then automates the DROP and re- CREATE process. Examples of such products include BMC Software's Change Manager and Computer Associates' RC/Migrator. More information on products such as these is offered in Chapter 39, "Components of a Total DB2 Solution."
|
< Day Day Up > |