Table compression and alter table statement

Friends
I am trying to add columns to a table which is compressed. Since Oracle treats compressed tables as Object tables, I cannot add columns directly so I tried to uncompress table first and then add columns. This doesnt seems to work.
What could be issue.
Thanks
Vishal V.
Script to test is here and results are below.
-- Test1 => add columns to uncompressed table -> Success
DROP TABLE TAB_COMP;
CREATE TABLE TAB_COMP(ID NUMBER) NOCOMPRESS;
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
-- Test2 =. try adding columns to compressed tables, uncompress it and then try again -> Fails
DROP TABLE TAB_COMP;
CREATE TABLE TAB_COMP(ID NUMBER) COMPRESS;
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
ALTER TABLE TAB_COMP move NOCOMPRESS;
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
SQL> -- Test1 => add columns to uncompressed table -> Success
SQL> DROP TABLE TAB_COMP;
Table dropped.
SQL> CREATE TABLE TAB_COMP(ID NUMBER) NOCOMPRESS;
Table created.
SQL> ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
Table altered.
SQL>
SQL> -- Test2 =. try adding columns to compressed tables, uncompress it and then try again -> Fails
SQL> DROP TABLE TAB_COMP;
Table dropped.
SQL> CREATE TABLE TAB_COMP(ID NUMBER) COMPRESS;
Table created.
SQL> ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10))
ERROR at line 1:
ORA-22856: cannot add columns to object tables
SQL> ALTER TABLE TAB_COMP move NOCOMPRESS;
Table altered.
SQL> ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10));
ALTER TABLE TAB_COMP ADD (NAME VARCHAR2(10))
ERROR at line 1:
ORA-22856: cannot add columns to object tables

Which version of oracle you are using?
1* create table test1234(a number) compress
SQL> /
Table created.
Elapsed: 00:00:00.02
SQL> alter table test1234 add(b varchar2(200));
Table altered.
Elapsed: 00:00:00.02

Similar Messages

  • The detail algorithm of OLTP table compress and basic table compress?

    I'm doing a research on the detail algorithm of OLTP table compress and basic table compress, anyone who knows, please tell me. 3Q, and also the difference between them

    http://www.oracle.com/us/products/database/db-advanced-compression-option-1525064.pdf
    Edited by: Sanjaya Balasuriya on Dec 5, 2012 2:49 PM
    Edited by: Sanjaya Balasuriya on Dec 5, 2012 2:49 PM

  • Compare table A and table B and update table B ,,,,table B has 300k rows

    Hi,
    I m trying to write a code, I have tables A and table B.
    I need to compare table A and table B , and update table B with one column.
    using joins b/w A&B tables, I selected one record from table A in cursor.
    After Begin I m trying to open cursor and in FOR LOOP
    Im trying to update table B WHERE CURRENT OF Cursor.
    this is erroring out.
    could you let me know on this.
    there is another way like selecting required columns from both table.but i was told to do as above.
    Thanks

    > this is erroring out.
    You haven't posted nearly enough for anyone to help you.  You didn't even tell us what error you are getting.
    So about the only thing we can do is post a generic MERGE statement which you'll have to modify for your use.
    merge into tableB b
    using (select some_key, some_column from tableA where etc.) u
    on (u.some_key = b.some_key)
    when matched then update
    set b.some_column = u.some_column;

  • View Customization Table changes and Data  table base changes in a report

    Hi All,
    How to view Customization Table changes and DAta  table base changes in a report ,
    Is it right transactions: SCU3 or RSVTPROT
    Also plz let me know the concept of audit trial,
    Thanks
    SD

    Hi,
    Changes to master data objects must be captured for the For compliance purposes. The auditor allows you to be able to view and print an audit log of changes to master data objects for a chosen period. It is very common for external auditors to focus on what has changed from one year or quarter to the next to help determine the nature, extent, and population for testing. To configure and access your audit log, perform the actions listed with each of the following utilities.
    Audit Trail is used to track the record changes.
    The report RPUAUD00 gives all the changes done to the masterdata by any user anytime.
    But, before using this audit trial, please ensure that the system hardware is well equipped as the audit trials activation would later become a performance issue as this would occupy a lot of space in the coming time.
    Best Regards,
    Venkat.

  • Purpose of tables UJA_FORMULA_APP  and UJA_FORMULA tables

    Hi BPC Experts,
    What is the purpose of tables UJA_FORMULA_APP  and UJA_FORMULA tables?
    Thanks.
    Mila

    Hello,
    There r 3 default measures provided with ApShell: Periodic, Quarter To Data, and Year To Date. U can create your own measure by defining it in a table UJA_FORMULA.
    When you create a new application, the entries from UJA_FORMULA are read and copied to table UJA_FORMULA_APP. This is required to replace the variable names with the technical names (we could have read UJA_FORMULA at runtime and done a dynamic replacement, but this optimizes runtime performance). Therefore, it is important to note that if you add a new formula into UJA_FORMULA for an existing application, you will also need to manually update UJA_FORMULA_APP, as well.
    Hope this info will help u,
    Dzmitry

  • How can we delete SID table data and Text table data

    Hi,
    How can we delete SID table data and Text table data of any
    InfoObject.

    Hi,
    Go to transaction SE14, give the technical name if the table:
    /BIC/T<InfoObject Name>   for Text Table
    /BIC/S<InfoObject Name>  for SID Table
    Select "Table" in the given 4 options below  &  hit Edit button.
    in the next screen select "Direct"
    & also select "detele data" radio button.
    & hit  "Activate & adjust database".
    this will delete the complete data from the tables.
    Note: before deleting the SID's make sure of the consequences & after effects.
    Also the SID gets generated the next time you load master data/transaction data only for those records which were loaded..
    Regards,
    Iliyas

  • Type hierarchy table and alter table for subtypes

    I have objects tables TObjTable and TRefTable
    create type TParent as object (c_name varchar2(30)) not final
    create table TObjTable of TParent
    create type TRef as object (c_code varchar2(30)) not final
    create table TRefTable of TRef
    constraint Pk_Ref primary key (c_code)
    object identifier is primary key
    Then, I create type TChild under TParent
    create type TChild under TParent (c_ref ref TRef)
    The attribure "c_ref" should refer to the object table TRefTable.
    How I can specify foreign key for new column "c_ref" on table
    TObjTable?
    Thanks.

    Assume, that you have new column "c_new" on type t2.
    I think, you can treat values of table t as type t2:
    create index Idx on t p (treat(value(p) as t2).c_new)
    tablespace idx

  • Help regarding 'table controls' and 'internal table' updation

    Hi all.
    Basically this is what i have done..... I have created a table control in module pool program. I declared an Internal table and also have populated it from a database table. I have also used insert statement to insert an blank record in the table control view and delete statements to delete any record,  also in the table control view... .
    But I am not able to update any new record into an Internal table or  the  original table ..
    Any Ideas how to do it ,Gurus
    Thanks

    HEllo,
    Check thsi simple report.
    REPORT ZTFH_TABLECONTROL .
    TABLES : ZEMPTABLE.
    DATA : SELLINE .
    DATA : FLD(20).
    DATA : LINNO TYPE I , OFF TYPE I.
    DATA : ITAB LIKE ZEMPTABLE OCCURS 10 WITH HEADER LINE.
    CONTROLS  : CON_TAB TYPE TABLEVIEW USING SCREEN 100.
    SELECT * FROM ZEMPTABLE INTO TABLE ITAB.
    DESCRIBE TABLE ITAB LINES CON_TAB-LINES.
    CALL SCREEN 100.
    *&      Module  EXT_COMM  INPUT
    *       text
    MODULE EXT_COMM INPUT.
    LEAVE PROGRAM.
    ENDMODULE.                 " EXT_COMM  INPUT
    *&      Module  TAB_UPDATE  INPUT
    *       text
    MODULE TAB_UPDATE INPUT.
    CASE SY-UCOMM.
    WHEN 'DEL'.
          IF SELLINE = 'X'.
            DELETE ITAB WHERE EMPNO = ITAB-EMPNO.
            MESSAGE I000(ZYF_DEL).
          ENDIF.
    WHEN 'UPD'.
        IF SELLINE = 'X'.
             MODIFY ITAB INDEX CON_TAB-CURRENT_LINE.
             MESSAGE I001(ZYF_DEL).
        ENDIF.
    WHEN 'INS'.
         IF SELLINE = 'X'.
          GET CURSOR FIELD FLD LINE LINNO OFFSET OFF.
          SET CURSOR FIELD FLD LINE LINNO OFFSET OFF.
          IF FLD CP 'ITAB*' AND SY-SUBRC = 0.
            IF LINNO >= 1.
              LINNO = LINNO + CON_TAB-TOP_LINE - 1.
              CLEAR ITAB.
              INSERT ITAB INDEX LINNO.
              CON_TAB-LINES = CON_TAB-LINES + 1.
            ELSE.
              CLEAR ITAB.
              APPEND ITAB.
              CON_TAB-LINES = CON_TAB-LINES + 1.
            ENDIF.
          ENDIF.
        ENDIF.
    WHEN 'SAV'.
      MODIFY ITAB INDEX CON_TAB-CURRENT_LINE.
      MESSAGE I002(ZYF_DEL).
    ENDCASE.
    ENDMODULE.                 " TAB_UPDATE  INPUT
    “ FLOW LOGIC
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB WITH CONTROL CON_TAB.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    MODULE EXT_COMM AT EXIT-COMMAND.
    LOOP AT ITAB.
    MODULE TAB_UPDATE.
    ENDLOOP.     
    REgards,
    Vasanth

  • Table types and internal table

    Hi all,
    What is the relationship between table type in ABAP dictionary and internal table?
    Moderator message : Search for available information OR read ABAP documentation. Thread locked.
    Edited by: Vinod Kumar on Jul 16, 2011 11:16 AM

    You can INCLUDE TYPE.
    Types: begin of itab,
           field1 type string,
           field2 type string,
    *      More Fields in here.
           Field30 type string,
           End of itab.
    Data: lt_itab type table of itab.
    TYPES BEGIN OF new_itab.
           INCLUDE type itab.
    TYPES: field31 type string,
           field32 type string,
    END OF new_itab.
    Regards,
    Rich Heilman

  • Material Group Difference MM03  (Table MARA) and Reservation (Table RESB)

    Why material group at T-code MM03 (MARA-MATKL) difference at Table RESB ?
            Table MARA-MATKL = 04
            Table RESB-MATKL = 02
    I checking  MM03 not change about material group. I don't know some T-code can change material group link to table RESB.

    Dear Mr.Jutamas,
    As per to my understanding,initially when the reservation was made for the
    particular material ,material group - 02 in Basic Data 1 view  would have been
    present or maintained in the material master.
    After that a change might have occured,i.e someone must have changed the
    material group from 02 to 04.
    So in MARA table the value is showing as 04 and in RESB its showing as 04.
    Once after creating reservation ,if such changes are made,as far as i know that
    will not get updated or reflected in RESB.
    Better confirm the same,in MM03 - Display mode of the material and after going
    into any one of the view,in the top menu check Environment - Display Changes -
    you may get one or a list of changes that were made,along with the user,date &
    time details.
    <b>If useful reward points</b>
    Regards
    Mangal

  • Statistical table, pool table, structure, and ordinary table

    请教在ABAP引用表时,不同类型的表的区别:
    statistical table
    pool table
    structure,
    ordinary table
    其它 table (请列出)
    谢谢!

    >
    leopard123456 wrote:
    > 请教在ABAP引用表时,不同类型的表的区别:
    > statistical table
    > pool table
    > structure,
    > ordinary table
    > 其它 table (请列出)
    >
    > 谢谢!
    对上面提到的几个term不是很明白(尤其是statistical table和ordinary table),其中structure应该不是表的类型。
    请举例。

  • Columns in table OCRD and mapping table

    Hey,
    I want to recreate the form settings form or the query generator form.
    That means I need all columns in this table including the translations.
    The background is that I select the column address and property 1 and contact person and my program creates automatically the corresponding select clause.
    SELECT Address, Property1, contctprsn
    FROM OCRD
    For this I need the mapping table:
    CntctPrsn = Contact Person
    a.s.o
    Where ist this saved?
    Regards Chris

    Hi Janos,
    thanks a lot for your fast replies.
    I think I still explained it wrong.
    I will try it again.
    My requirement from my customer is to write a tool which gives out all selected columns. I am using a list box where I can set check boxes. The list box includes for example DocNum, Sales Employee, Owner, Posting Date, Delivery Date and all other columns sometimes more than 60 depending on the table.
    The customer selects now Sales Employee, Owner, Delivery Date. Now I create the select query.
    SELECT SlpCode, Owner Code, DocDueDate
    FROM OINV
    If you open now the query generator and load the table ORDR you will get the Name and Description of every column.
    I only need the information where this mapping is saved in B1.
    What I want to do is to give out all Descriptions of the columns and to create to sql query with all Names, which you can see in the query generator.
    This meta data is somewhere saved in SAP but I did not found the table yet.
    Sorry for my complicated issue description.
    Regards Chris

  • CONNECT and ALTER statements in a Procedure. COPY command in SQL*Plus

    Hi people,
    Is it possible to use the SQL commands, "CONNECT" and "ALTER TABLE" in a procedure, function or trigger?
    In one of my audit procedures, I need to connect to a financial database (FROM the applications database), and then proceed to alter a number of tables based on certain data. I'm sure I've done it before, but I can't remember how! Isn't there a command such as "EXEC_SQL" or something?
    Another question:
    I need to copy a table from one database ("OPS$TSLIVE") to another ("TRACKER"). Here is an excerpt of my code, as well as an error! I've never had this error before!
    JOHANN> copy from ops$tslive/pwd@cds to tracker/pwd@tracker create new_alerts using select * from alertcodesfile;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    select * from alertcodesfile
    Error in SELECT statement: ORA--1002: Message -1002 not found; product=RDBMS; facility=ORA
    Please help!
    Kind regards,
    Johann.

    You are refering to 'execute immediate' (>=8i). As far as I know it is not possible to do connects. Alter table perhaps, if it is in the local database (try it). If you want to perform dml in a remote database, create a database link and use that to perform you dml on. a DB link can also be used to call a remote procedure (That perhaps does the alters for you). Try it.
    The oracle doc says this about ORA-1002:
    ORA-01002 fetch out of sequence
    Cause: In a host language program, a FETCH call was issued out of sequence.
    A successful parse-and-execute call must be issued before a fetch. This can
    occur if an attempt was made to FETCH from an active set after all records have
    been fetched. This may be caused by fetching from a SELECT FOR UPDATE
    cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may
    also cause this error.
    Action: Parse and execute a SQL statement before attempting to fetch the data.It looks like a bug, ask Oracle support.
    L.

  • What is the version of grant alter table, drop table to user in Oracle 10g?

    Hi,
    Oracle support "grant alter table and drop table" before, but I get the "invalid privilege" error in Oracle 10g. Oracle 10g have the "DROP ANY TABLE" and "Alter any table". Is these two means can drop and alter tables belonging to other users? How do I grant the total control (CRUD) of tables in the owner's schema to the owner in Oracle10g?
    Thanks,
    Jiang

    CREATE TABLE privilege grants complete control on owner's tables :
    SYS@db102 SQL> create user test01 identified by test01;
    User created.
    SYS@db102 SQL> grant create session, create table to test01;
    Grant succeeded.
    SYS@db102 SQL> alter user test01 quota unlimited on users;
    User altered.
    SYS@db102 SQL> conn test01/test01
    Connected.
    TEST01@db102 SQL> create table test(a number);
    Table created.
    TEST01@db102 SQL> alter table test add(b varchar2(100));
    Table altered.
    TEST01@db102 SQL> drop table test purge;
    Table dropped.
    TEST01@db102 SQL>                                                      

  • Is there any order in which records are stored in SessionDetails and Conferences Table in Lync Archiving DB?

    Hi,
    Archiving Database Schema states that in the tables SessionDetails and Conferences tables, the column 'SessionIdTime'
    holds datetime value at which session request is captured by Archiving service.
    But, is there any order in which the records are stored in the db?
    Say, a session 'S1' starts at 1:00 PM and another session 'S2' starts at 1:05PM. 'S2' ends at 1:10 PM and 'S1' is still on going. I have observed that on ending the session the record is written to DB, so is it possible that details of session S2 is written
    in db prior to 'S1'?
    Is there any way to query these tables, in the order in which the records are stored?
    Thanks and Regards,
    Arjabh

    Hi,
    You can export records that have been stored in the Lync Server Archiving database with the following cmdlet in the link using Lync server manageshell.
    http://technet.microsoft.com/en-us/library/gg398452.aspx
    You need to write a SQL query/view or report server report to display the information.
    More details:
    http://blogs.technet.com/b/dodeitte/archive/2013/06/02/sample-lync-server-archiving-report-available.aspx
    For the issue about “is there any order in which the records are stored in the db?” you can post a case to SQL forum and more experts will help to verify the issue.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

Maybe you are looking for

  • Pension plan deduction

    Dear friends, The pension record (IT0169) is delimited for an employee within a pay period. Still pension is deducting for the entire period. The employee is going to be separated from company.Due to settlement employee has active status till end of

  • Re: I got a malware, how do I get rid of it?

    I got my MacBook Air corrupted by pop up warm and probably other things through Safari, and decided to go to Genius Bar on Friday the 13th, and asked to do hard reset (or clean install), thinking that I could recover from my Time Machine backup. Howe

  • Credit Limit for SalesOrder

    Here is my problem description: Please forgive me if this is not the right forum or this is solved earlier. Pl guide me in these cases. I am trying to solve this problem from external program, so I can use only remote enabled RFCs/BAPIs. The problem

  • Reg: Block purchase order item level using MEMASSPO

    Hi, I am checking to see if we can block PO item level  in MEMASSPO.There is field for deletion indicator but i could'nt find any option to block.I searched forum but i found that deletion indicator LOEKZ value could be S for blocking and L for delet

  • Event Table Error

    I've implemented the event table in OBIEE 10.1.3.4.1 and I'm facing this error: 2011-09-02 12:04:58 [55004] The prepare operation failed while polling from table UET. 2011-09-02 12:04:58 [nQSError: 22005] Repository metadata: column has no data type