ALTER TABLE
Posted in 2009
Topics: Server Administration
Hi,
Can you please advise whether the below statments could successfully implement
with constraint to particular table?
These aa and bb table consists of nearly 30 million rows of data. I got sense
the global alter due to substantial bulk data could make informix running out
of locks, end up constraint with default value could not be in-place.
`echo "ALTER TABLE aa ADD operator char(8) DEFAULT 'xyz' NOT NULL CONSTRAINT
npfsud_operator BEFORE chk_upd_dt;" | dbaccess abc `;
`echo "ALTER TABLE bb ADD operator char(8) DEFAULT 'xyz' NOT NULL CONSTRAINT
npsud_operator BEFORE chk_upd_dt;" | dbaccess cde `;
Hope to hear from. Thanks
As long as the table does not contain any VARCHAR, Smart Large Objects, or
User Defined Data Types (note: LVARCHAR and BOOLEAN are implemented as UDTs)
the alter should be performed in-place to add a CHAR column, even with a
DEFAULT clause.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Thu, Oct 1, 2009 at 12:07 AM, CEDRIC CHIU <cedric.mh@gmail.com> wrote:
> Hi,
>
> Can you please advise whether the below statments could successfully
> implement
> with constraint to particular table?
>
> These aa and bb table consists of nearly 30 million rows of data. I got
> sense
> the global alter due to substantial bulk data could make informix running
> out
> of locks, end up constraint with default value could not be in-place.
>
> `echo "ALTER TABLE aa ADD operator char(8) DEFAULT 'xyz' NOT NULL
> CONSTRAINT
> npfsud_operator BEFORE chk_upd_dt;" | dbaccess abc `;
>
> `echo "ALTER TABLE bb ADD operator char(8) DEFAULT 'xyz' NOT NULL
> CONSTRAINT
> npsud_operator BEFORE chk_upd_dt;" | dbaccess cde `;
>
> Hope to hear from. Thanks
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0023545bd6441f96c20474e0b0da