Red Hat Linux & IDS 7.31.UD1
Posted in 2006
Topics: Backup & Restore, Storage & Space Management, Migration, Import/Export & Data Conversion, Platform-Specific Issues, Versions, Editions & End-of-Life
Hi,
We spend 3 hours doing this
1.- alter table xyz modify nextsize 1000000
2.- drop all contraints from table xyz
3.- update systables set fextsize 2000000 where tabname = 'xyz';
4.- ontape -s -L 0 -N BDD
5.- onunload -t /dev/st0 -b 8192 -s 20000000 BDD:xyz
6.- onload -t /dev/st0 -b 8192 -s 20000000 -d DBspace1 BDD:xyznew
7.- rename table xyz xyzold
8.- selec count(*) from xyzold where 1 = 1;
9.- selec count(*) from xyznew where 1 = 1;
10.- create primary key, secondary index and 3 constraints on table xyznew
11.- rename table xyznew xyz
12.- ontape -s -L 0 -U BDD
13.- down instance
14.- up instance
Just for fix a table xyz with 209 extents, with table xyznew with 4 extents.
There is another way (HPL for example) for doing this more faster?
Because Linux Red Hat don't let us create file grather than 2GB!!!.
Regards.
___________________________________________________________
Do You Yahoo!?
La mejor conexi'n a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx
yeah, HPL, or ALTER TABLE ... FRAGMENT INIT
"Cesar Cruz" <markaragnos17@yahoo.com.mx> wrote in message
news:mailman.332.1138648098.740.informix-list@iiug.org...
> Hi,
>
> We spend 3 hours doing this
>
> 1.- alter table xyz modify nextsize 1000000
> 2.- drop all contraints from table xyz
> 3.- update systables set fextsize 2000000 where tabname = 'xyz';
> 4.- ontape -s -L 0 -N BDD
> 5.- onunload -t /dev/st0 -b 8192 -s 20000000 BDD:xyz
> 6.- onload -t /dev/st0 -b 8192 -s 20000000 -d DBspace1 BDD:xyznew
> 7.- rename table xyz xyzold
> 8.- selec count(*) from xyzold where 1 = 1;
> 9.- selec count(*) from xyznew where 1 = 1;
> 10.- create primary key, secondary index and 3 constraints on table xyznew
> 11.- rename table xyznew xyz
> 12.- ontape -s -L 0 -U BDD
> 13.- down instance
> 14.- up instance
>
> Just for fix a table xyz with 209 extents, with table xyznew with 4
> extents.
>
> There is another way (HPL for example) for doing this more faster?
>
> Because Linux Red Hat don't let us create file grather than 2GB!!!.
>
> Regards.
>
>
>
>
>
> ___________________________________________________________
> Do You Yahoo!?
> La mejor conexi'n a Internet y <b >2GB</b> extra a tu correo por $100 al
> mes. http://net.yahoo.com.mx
>
Cesar Cruz wrote:
> Hi,
>
> We spend 3 hours doing this
>
> 1.- alter table xyz modify nextsize 1000000
> 2.- drop all contraints from table xyz
> 3.- update systables set fextsize 2000000 where tabname = 'xyz';
> 4.- ontape -s -L 0 -N BDD
> 5.- onunload -t /dev/st0 -b 8192 -s 20000000 BDD:xyz
> 6.- onload -t /dev/st0 -b 8192 -s 20000000 -d DBspace1 BDD:xyznew
> 7.- rename table xyz xyzold
> 8.- selec count(*) from xyzold where 1 = 1;
> 9.- selec count(*) from xyznew where 1 = 1;
> 10.- create primary key, secondary index and 3 constraints on table xyznew
> 11.- rename table xyznew xyz
> 12.- ontape -s -L 0 -U BDD
> 13.- down instance
> 14.- up instance
>
> Just for fix a table xyz with 209 extents, with table xyznew with 4 extents.
>
> There is another way (HPL for example) for doing this more faster?
ALTER FRAGMENT ON xyz INIT IN dbspace1;
You just need enough disk space in dbspace1 and enough logical log space
(unless you: ALTER xyz TYPE( RAW ); first) to hold the copy of the table and
the logical log records generated. Altering the table to RAW before the
reorg and back to STANDARD afterward will eliminate the need for masses of
logical logs.
Art S. Kagel
<SNIP>
Cesar Cruz wrote:
> Hi,
>
> We spend 3 hours doing this
>
> 1.- alter table xyz modify nextsize 1000000
> 2.- drop all contraints from table xyz
> 3.- update systables set fextsize 2000000 where tabname = 'xyz';
> 4.- ontape -s -L 0 -N BDD
> 5.- onunload -t /dev/st0 -b 8192 -s 20000000 BDD:xyz
> 6.- onload -t /dev/st0 -b 8192 -s 20000000 -d DBspace1 BDD:xyznew
> 7.- rename table xyz xyzold
> 8.- selec count(*) from xyzold where 1 = 1;
> 9.- selec count(*) from xyznew where 1 = 1;
> 10.- create primary key, secondary index and 3 constraints on table xyznew
> 11.- rename table xyznew xyz
> 12.- ontape -s -L 0 -U BDD
> 13.- down instance
> 14.- up instance
>
> Just for fix a table xyz with 209 extents, with table xyznew with 4 extents.
>
> There is another way (HPL for example) for doing this more faster?
ALTER FRAGMENT ON xyz INIT IN dbspace1;
You just need enough disk space in dbspace1 and enough logical log space
(unless you: ALTER xyz TYPE( RAW ); first) to hold the copy of the table and
the logical log records generated. Altering the table to RAW before the
reorg and back to STANDARD afterward will eliminate the need for masses of
logical logs.
Art S. Kagel
<SNIP>