Moving table to a different dbspace
Posted in 2005
Topics: Storage & Space Management
How can I move one table to a different dbspace. I am using informix 7.31.
First find out if your table resides in one dbspace:
dbschema -d <your db> -t <your table> -ss
look for fragment....
if that is not present and the table is not too big
then in dbaccess
alter fragment on table <yourtable> init in <dbspace where you want it>
if the table is huge you may want to consider swithing off trax log and
use
pdqpriority to speed things up and avoid long trx rollbacks etc.
Superboer.
mchivaviro@okzim.co.zw schreef:
> How can I move one table to a different dbspace. I am using informix
> 7.31.
unload the data to a file, drop the table
create the a new table of the same name in the alternate dbspace
load the data from the file
--------------------------------------------------------------------------------------------------
create a new table in the alternate dbspace
using SQL
insert into new tabe select from old table (you might want to turn
logging off while you do this bit)
ensure the data is in the new table
drop the old table
rename the new table with the name of the old table
mchivaviro@okzim.co.zw wrote:
> How can I move one table to a different dbspace. I am using informix
> 7.31.