Professional Documents
Culture Documents
By reading just the title I'm sure that lots of you are thinking why people
just cannot do things in an easy and well ordered fashion ... the way it is
supposed to be. Well, sometimes there is just no way around.
Maybe explaining why will set things more in perspective: living in a
country where three languages are spoken, makes sorting chars a
challenge. You would want to have names - whether they are Dutch,
French or German - to be sorted the way your customer wants to see
them on his reports and this without losing any performance.
You should know that once you have created your database, the choice in
which things are sorted is made for good and that flipping on any
configuration switch is not going to help you changing all that. Sure, you
can change your sorting by adding clauses to each and every query, but
be assured that sorting will happen by using algorithms which is always
much slower than every other option. It is just fine for testing purposes
and that's the end of that discussion.
So the hard way ... which means in short and by far the complete list:
-
generate ddl
arrange new disk space
prepare the new database with the new codepage to get the sorting
right
arrange downtime
export data with a script invoking HighPerformanceUnload or when
the downtime has to be kept to the minimum, set up a replication of
the data by using Change Data Capture
import data
check integrity
point all software to the new database
put the old database out of commission and free up the discs
and repeat this cycle for every of your databases in our case we had
800 databases spread over the multiple environments and you're done.
We had to come up with a strategy that would avoid failure and since we
had a team of thirteen all migrations had to be done in one and exactly
one standardized way. Besides that we to bypass all of the flaws we found
in the tools we used:
a) db2look didn't deliver ddl on which we could blindly count on as the
order of creating elements isn't always correct. To give one example
think of the order of creation of tables and views or stored
procedures. Remove database objects and grants that werent
needed anymore as a second example. For the databases that we
SuadaSoft