0

I need to move a table with its data from tablespace 16bit to 32bit in db2, how to do it?

I have read many articles but they are very confusing, table space creation is going to be handled by someone else, I just need to migrate data from previous table space to new one.

I have read about

 ADMIN_MOVE_TABLE

but I couldn't figure out,

  1. Where we are supposed to execute this command, in the new table space or the old one?
  2. What are 'index_tbsp' and 'lob_tbsp' (4th and 5th parameter of command).what I learnt is they are 'tablespace to storage indexes' and 'tablespace to storage long data' respectively , but

    are they mandatory?

    and where I can find their names?

    are they of new table space or the old one?

  3. Most importnat, is this command really the one for what I intend to do, that is, migration of data from 16bit tablespace to 32bit tablespace?

All the help would really be appreciated.

Just_another_developer
  • 5,737
  • 12
  • 50
  • 83
  • What version and platform of db2? –  Oct 21 '15 at 11:31
  • What type of system is it, how much data needs to be moved, what has been planned in terms of quality checks...? – data_henrik Oct 21 '15 at 12:37
  • @dan1111 I am blank about all this information, I am just supposed to propose "how to do it " to some other team. They just told me their requirement and now I just have to come up with solution. – Just_another_developer Oct 22 '15 at 08:40
  • @data_henrik like I replied above, I have no idea of specifics, it has been taken care of by some other folks, One thing I know is that Data is huge. – Just_another_developer Oct 22 '15 at 08:42
  • They haven't really "told you their requirement" because a lot of key information is missing. I think you need to find out in order to give them a good solution. –  Oct 22 '15 at 10:32

1 Answers1

0

Unless I am terribly mistaken, you must be talking about moving data from a 16K page size table space to a 32K page size (I am intimately familiar with DB2 table space design, but I am not aware of 16-bit table spaces).

If you are about to use ADMIN_TABLE_MOVE, be sure to get familiar with its restrictions (e.g. referential constraints). 'index_tbsp' and 'lob_tbsp' are optional arguments to be used when you want to store the base table data separately from its indexes and lobs (binary large objects). They refer to the new table space. The relevant table spaces must exist before you attempt to use any of 'index_tbsp' and 'lob_tbsp', and your DBA should give you the names since the DBA is in charge in creating these table spaces.

Another option would be unload/reload data, for example by using EXPORT and IMPORT/LOAD, or db2move.

Let me know if this helps.

pavel_sustr
  • 307
  • 1
  • 4