On 26 Jan., 12:41, Troels Arvin <tro...@arvin.dkwrote:
Hello,
With a large database with many tablespaces, primarily on raw devices, how
do I convert it to a sms-based-only database?
--
Regards,
Troels Arvin <tro...@arvin.dk>http://troels.arvin.dk/
With DB2 9 you might want to extract the DDL with db2look, change the
Tablespace characteristics and assignments and recreate the Objects in
a new database.
Next use db2move with the new copy funktion and LOAD_ONLY mode to copy
the data. You will have to run set integrity afterwards when
constrainst are defined. Also keep in mind that you will have to change
any Identity or sequence starting values in your new database (and very
likely a couple of other things i forgot). You see its not that easy to
migrate from DMS to SMS.
Another option would be to stay with DMS. Just convert your raw devices
to file containers: Add a new stripe set with file containers (large
enough to hold the data) to your existing tablespaces, then drop the
old containers. DB2 will rebalance the data in background into the new
file containers. You can do this one tablespace at at time. After your
done you can alter your tablespace to AUTORESIZE YES and they will
behave nearly like SMS in terms of autogrowing but still delivering
the advantages of DMS. You need to be at V8 FixPak 9 a least to use
AUTORESIZE.
HTH
Joachim