Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2010
    Posts
    34

    Unanswered: Need help on Table hangs ...

    Hello,

    I tried to add a column on a empty table but it hangs,

    oracle version: 10.2.0.4
    OS : Linux

    Command: ALTER TABLE MIDA.X_ABC_1 ADD Test_Wid NUMBER(10) NOT NULL;

    The Table Hangs,
    The Following thing I checked:

    The table has no data, no locks, table not in read mode & no alert log errors.
    I can add column on this table backup MIDA.X_ABC_1_BKUP no problem.

    Is there any way I can sort this out with out the option of dropping & recreating the table?

    I appreciate your suggestions at the earliest.

    Regards,

  2. #2
    Join Date
    Aug 2010
    Posts
    34
    Hi,

    Jus did on a diff way around & it works,

    Added column with out the data type then

    alter table schema.tab_name
    add <colmn_name> number(10);

    Modified the table with the new data type
    alter table schema.tab_name
    modify <column_name> <new_data_type>;

    It worked ,
    still Why table hangs while adding column with the below given syntax
    still remains a mystry.

    alter table <schema.tab_name>
    add <colmn_name> number(10) not null;

    Kind Regards,

  3. #3
    Join Date
    Feb 2005
    Posts
    57
    Have you tried the problematic statment without the NOT NULL constraint??

  4. #4
    Join Date
    Aug 2010
    Posts
    34
    That's what I meant on my last thread

    /*
    Added column with out the data type then

    alter table schema.tab_name
    add <colmn_name> number(10);

    Modified the table with the new data type
    alter table schema.tab_name
    modify <column_name> <new_data_type>;
    */

    It initially worked with out adding the 'not null'
    but it wasn't with 'not null' option which is not clear yet.


    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •