Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / November 2006

Tip: Looking for answers? Try searching our database.

How can I disable a foreign key???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Diego Morales - 23 Nov 2006 12:09 GMT
Hi to all. I have problems to unload/load a table to set extents correctly
(I have table with more than 500,000 records and more than 100 extents). I
need to disable foreign keys to unload and load the main table but I don't
know how. Please help me.



TIA.



DJMoralesM
Superboer - 23 Nov 2006 12:34 GMT
have a look at

set contraints..... disabled ;
-->> object modes...
in the guide to sql afaikr

Superboer

Diego Morales schreef:

> Hi to all. I have problems to unload/load a table to set extents correctly
> (I have table with more than 500,000 records and more than 100 extents). I
[quoted text clipped - 83 lines]
>
> ------=_NextPart_000_00E4_01C70F00.A3BCBB20--
Rich or Kristín - 23 Nov 2006 13:25 GMT
<snip>
> need to disable foreign keys
<snip>
*sighs*
http://publib.boulder.ibm.com/infocenter/idshelp/v10/topic/com.ibm.sqls.doc/sqls
725.htm

Art S. Kagel - 27 Nov 2006 23:31 GMT
> Hi to all. I have problems to unload/load a table to set extents
> correctly (I have table with more than 500,000 records and more than 100
> extents). I need to disable foreign keys to unload and load the main
> table but I don’t know how. Please help me.

Diego, you do not have to unload/reload the table to compress the extents.
The following will do it.

1) ALTER TABLE mytable NEXT SIZE <newsize>;
2) ALTER FRAGMENT ON TABLE mytable INIT IN <dbspace or fragmentation
expression>;

The dbspace/expression can be the same one the table already uses as long as
there is space for a 2nd copy of the table temporarily.  You should end up
with one or at most 2 extents - assuming the table is smaller than a chunk -
or one per chunk if it is larger unless that dbspace is badly fragmented.
In which case doing this 2x for each table in the dbspace or moving the
table(s) to an empty dbspace will solve that.

Art S. Kagel
Art S. Kagel - 27 Nov 2006 23:31 GMT
> Hi to all. I have problems to unload/load a table to set extents
> correctly (I have table with more than 500,000 records and more than 100
> extents). I need to disable foreign keys to unload and load the main
> table but I don’t know how. Please help me.

Diego, you do not have to unload/reload the table to compress the extents.
The following will do it.

1) ALTER TABLE mytable NEXT SIZE <newsize>;
2) ALTER FRAGMENT ON TABLE mytable INIT IN <dbspace or fragmentation
expression>;

The dbspace/expression can be the same one the table already uses as long as
there is space for a 2nd copy of the table temporarily.  You should end up
with one or at most 2 extents - assuming the table is smaller than a chunk -
or one per chunk if it is larger unless that dbspace is badly fragmented.
In which case doing this 2x for each table in the dbspace or moving the
table(s) to an empty dbspace will solve that.

Art S. Kagel
Diego Morales - 28 Nov 2006 09:04 GMT
Interesting... this "alter fragment" works on IDS 7.31???

-----Mensaje original-----
De: KAGEL@BLOOMBERG.NET [mailto:KAGEL@BLOOMBERG.NET]
Enviado el: martes, 28 de noviembre de 2006 0:31
Para: Diego Morales
CC: informix-list@iiug.org
Asunto: Re: How can I disable a foreign key???

Diego Morales wrote:
> Hi to all. I have problems to unload/load a table to set extents
> correctly (I have table with more than 500,000 records and more than 100
> extents). I need to disable foreign keys to unload and load the main
> table but I don't know how. Please help me.

Diego, you do not have to unload/reload the table to compress the extents.
The following will do it.

1) ALTER TABLE mytable NEXT SIZE <newsize>;
2) ALTER FRAGMENT ON TABLE mytable INIT IN <dbspace or fragmentation
expression>;

The dbspace/expression can be the same one the table already uses as long as

there is space for a 2nd copy of the table temporarily.  You should end up
with one or at most 2 extents - assuming the table is smaller than a chunk -

or one per chunk if it is larger unless that dbspace is badly fragmented.
In which case doing this 2x for each table in the dbspace or moving the
table(s) to an empty dbspace will solve that.

Art S. Kagel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.