I have unloaded/reloaded the database in the past, before our web site was
up
and running, and the whole process would take (at worst) 2 days to
complete. I
can't afford to be down for 2 days any longer. I am toying around with the
idea of installing another database server so that I can perform an ordered
reload
on that machine, and make that machine my production database environment.
I would
use this scheme to swap the production and test database environments when
I need to perform this defrag operation.
I am looking for alternatives to this, or at least some confirmation that
my
plan is sound. Has anyone any other ideas for performing a defrag with
minimal downtime?
Regards,
Louis J. Ciocci
Chief Technology Officer
Decision Strategies, Inc.
Is there a small number of problem tables? If so, then perhaps an
in-place copy, from old table to new on pre-allocated DBSPACEs to
reduce future fragmentation, followed by renaming the tables... the
app would only be offline long enough to rename the tables.
The problem remains, though... making sure all the recent updates have
been copied to the new database, or new table, when the switch
happens. This might be facilitated by a DEFAULT TIMESTAMP column on
the rows to be copied.
Breck
Breck [TeamSybase]
www.bcarter.com
bca...@bcarter.com
Georgi
<Louis_J._Ciocci> wrote in message
news:7609B3D088A5AA78005166D1852569DE.005166EC852569DE@webforums...
I'd recommend doing a practice run of steps 1-5 to work out any problems and
determine the times required for each step. You may also want to save copies
of your files at various points. It's important that any other scheduled
backups not rename the production database's log; if that is done, you will
need to apply the transactions from these renamed logs to the rebuilt
database in the correct order.
I understand what you're trying to do here, and it's not bad. I have one
question, though: What do you do with the old dbspace and tables? Part of the
problem I ran into in performing the rebuild was deleting the tables and
recreating the dbspaces - it took an awful long time to process.
Regards,
Louie
Thanks for the info. With regard to the rebuild, let me pose another question:
I have several tables in my database that have LONG VARCHAR columns. When I ran
the DBUNLOAD on these tables in the past (not sure what version of the DB I was
running), these columns would be truncated to 32K. Would you happen to know if
that's still the case with version 5.5.04?
Having said that, you may want to pre-allocate a lot of contiguous
space for the new database, and perhaps use dbspaces too. With Bruce's
solution you are starting over with a new database so
deleting/recreating is not an issue. Preallocation may prevent future
fragmentation.
Having said THAT, isn't continued 24by7 availability your biggest
concern, not how long some background or offline process takes?
Breck
Breck [TeamSybase]
www.bcarter.com
bca...@bcarter.com