Is it possible to create table with partition in compress mode

Hi All,
I want to create a table in compress option, with partitions. When i create with partitions the compression isnt enabled, but with noramal table creation the compression option is enables.
My question is:
cant we create a table with partition/subpartition in compress mode..? Please help.
Below is the code that i have used for table creation.
CREATE TABLE temp
  TRADE_ID                    NUMBER,
  SRC_SYSTEM_ID               VARCHAR2(60 BYTE),
  SRC_TRADE_ID                VARCHAR2(60 BYTE),
  SRC_TRADE_VERSION           VARCHAR2(60 BYTE),
  ORIG_SRC_SYSTEM_ID          VARCHAR2(30 BYTE),
  TRADE_STATUS                VARCHAR2(60 BYTE),
  TRADE_TYPE                  VARCHAR2(60 BYTE),
  SECURITY_TYPE               VARCHAR2(60 BYTE),
  VOLUME                      NUMBER,
  ENTRY_DATE                  DATE,
    REASON                      VARCHAR2(255 BYTE),
TABLESPACE data
PCTUSED    0
PCTFREE    10
INITRANS   1
MAXTRANS   255
NOLOGGING
COMPRESS
NOCACHE
PARALLEL (DEGREE 6 INSTANCES 1)
MONITORING
PARTITION BY RANGE (TRADE_DATE)
SUBPARTITION BY LIST (SRC_SYSTEM_ID)
SUBPARTITION TEMPLATE
  (SUBPARTITION SALES VALUES ('sales'),
   SUBPARTITION MAG VALUES ('MAG'),
   SUBPARTITION SPI VALUES ('SPI', 'SPIM', 'SPIIA'),
   SUBPARTITION FIS VALUES ('FIS'),
   SUBPARTITION GD VALUES ('GS'),
   SUBPARTITION ST VALUES ('ST'),
   SUBPARTITION KOR VALUES ('KOR'),
   SUBPARTITION BLR VALUES ('BLR'),
   SUBPARTITION SUT VALUES ('SUT'),
   SUBPARTITION RM VALUES ('RM'),
   SUBPARTITION DEFAULT VALUES (default)
PARTITION RMS_TRADE_DLY_MAX VALUES LESS THAN (MAXVALUE)    
    LOGGING
        TABLESPACE data
     ( SUBPARTITION TS_MAX_SALES VALUES ('SALES')      TABLESPACE data,
    SUBPARTITION TS_MAX_MAG VALUES ('MAG')      TABLESPACE data,
    SUBPARTITION TS_MAX_SPI VALUES ('SPI', 'SPIM', 'SPIIA')      TABLESPACE data,
    SUBPARTITION TS_MAX_FIS VALUES ('FIS')      TABLESPACE data,
    SUBPARTITION TS_MAX_GS VALUES ('GS')      TABLESPACE data,
    SUBPARTITION TS_MAX_ST VALUES ('ST')      TABLESPACE data,
    SUBPARTITION TS_MAX_KOR VALUES ('KOR')      TABLESPACE data,
    SUBPARTITION TS_MAX_BLR VALUES ('BLR')      TABLESPACE data,
    SUBPARTITION TS_MAX_SUT VALUES ('SUT')      TABLESPACE data,
    SUBPARTITION TS_MAX_RM VALUES ('RM')      TABLESPACE data,
    SUBPARTITION TS_MAX_DEFAULT VALUES (default)      TABLESPACE data)); Edited by: user11942774 on 8 Dec, 2011 5:17 AM

user11942774 wrote:
I want to create a table in compress option, with partitions. When i create with partitions the compression isnt enabled, but with noramal table creation the compression option is enables. First of all your CREATE TABLE statement is full of syntax errors. Next time test it before posting - we don't want to spend time on fixing things not related to your question.
Now, I bet you check COMPRESSION value of partitioned table same way you do it for a non-partitioned table - in USER_TABLES - and therefore get wrong results. Since compreesion can be enabled on individual partition level you need to check COMPRESSION in USER_TAB_PARTITIONS:
SQL> CREATE TABLE temp
  2  (
  3    TRADE_ID                    NUMBER,
  4    SRC_SYSTEM_ID               VARCHAR2(60 BYTE),
  5    SRC_TRADE_ID                VARCHAR2(60 BYTE),
  6    SRC_TRADE_VERSION           VARCHAR2(60 BYTE),
  7    ORIG_SRC_SYSTEM_ID          VARCHAR2(30 BYTE),
  8    TRADE_STATUS                VARCHAR2(60 BYTE),
  9    TRADE_TYPE                  VARCHAR2(60 BYTE),
10    SECURITY_TYPE               VARCHAR2(60 BYTE),
11    VOLUME                      NUMBER,
12    ENTRY_DATE                  DATE,
13      REASON                      VARCHAR2(255 BYTE),
14    TRADE_DATE                  DATE
15  )
16  TABLESPACE users
17  PCTUSED    0
18  PCTFREE    10
19  INITRANS   1
20  MAXTRANS   255
21  NOLOGGING
22  COMPRESS
23  NOCACHE
24  PARALLEL (DEGREE 6 INSTANCES 1)
25  MONITORING
26  PARTITION BY RANGE (TRADE_DATE)
27  SUBPARTITION BY LIST (SRC_SYSTEM_ID)
28  SUBPARTITION TEMPLATE
29    (SUBPARTITION SALES VALUES ('sales'),
30     SUBPARTITION MAG VALUES ('MAG'),
31     SUBPARTITION SPI VALUES ('SPI', 'SPIM', 'SPIIA'),
32     SUBPARTITION FIS VALUES ('FIS'),
33     SUBPARTITION GD VALUES ('GS'),
34     SUBPARTITION ST VALUES ('ST'),
35     SUBPARTITION KOR VALUES ('KOR'),
36     SUBPARTITION BLR VALUES ('BLR'),
37     SUBPARTITION SUT VALUES ('SUT'),
38     SUBPARTITION RM VALUES ('RM'),
39     SUBPARTITION DEFAULT_SUB VALUES (default)
40    )  
41  (  
42   PARTITION RMS_TRADE_DLY_MAX VALUES LESS THAN (MAXVALUE)    
43      LOGGING
44          TABLESPACE users
45       ( SUBPARTITION TS_MAX_SALES VALUES ('SALES')      TABLESPACE users,
46      SUBPARTITION TS_MAX_MAG VALUES ('MAG')      TABLESPACE users,
47      SUBPARTITION TS_MAX_SPI VALUES ('SPI', 'SPIM', 'SPIIA')      TABLESPACE users,
48      SUBPARTITION TS_MAX_FIS VALUES ('FIS')      TABLESPACE users,
49      SUBPARTITION TS_MAX_GS VALUES ('GS')      TABLESPACE users,
50      SUBPARTITION TS_MAX_ST VALUES ('ST')      TABLESPACE users,
51      SUBPARTITION TS_MAX_KOR VALUES ('KOR')      TABLESPACE users,
52      SUBPARTITION TS_MAX_BLR VALUES ('BLR')      TABLESPACE users,
53      SUBPARTITION TS_MAX_SUT VALUES ('SUT')      TABLESPACE users,
54      SUBPARTITION TS_MAX_RM VALUES ('RM')      TABLESPACE users,
55      SUBPARTITION TS_MAX_DEFAULT VALUES (default)      TABLESPACE users));
Table created.
SQL>
SQL>
SQL> SELECT  PARTITION_NAME,
  2          COMPRESSION
  3    FROM USER_TAB_PARTITIONS
  4    WHERE TABLE_NAME = 'TEMP'
  5  /
PARTITION_NAME                 COMPRESS
RMS_TRADE_DLY_MAX              ENABLED
SQL> SELECT  COMPRESSION
  2    FROM USER_TABLES
  3    WHERE TABLE_NAME = 'TEMP'
  4  /
COMPRESS
SQL> SY.

Similar Messages

  • Possible to alter table with partitions to also have subpartitions online?

    The subject says it all....
    Is it possible to add hash sub-partitioning to an existing range partitioned table 'in-the-fly', or will it be necessary to create the new table structure first and reload the data?

    You have to create a new table first.

  • Is it possible to create graph with in the table / Pivote table.

    Is it possible to create graph with in the table / Pivote table.
    Emp# Emp Name % Bonus Pay Amt
    111 AAA $28276
    222 BBB $78878
    In the place of Bonus I have to display Bar (Chart) instead of number.
    Is it possible in OBIEE? I know we can display chart and table next by next but my user want display just like above.
    Please help me on this issue
    Thank you very much for your time

    hi,
    it is better for 2 different questions,make 2 differents threads...
    You used the 2ond solution(google???),put in the dashboard...html enabled...and check your pdf again.
    Moreover,printing pdf with answer is discouraged...always prefer Xml Publisher.
    Last,there are 2 fst files which configure the *.pdf files , check them,
    http://obiee101.blogspot.com/2008/09/obiee-pdf-controls-fst-files.html
    hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • Unable to create table with column default value with date interval

    Please help to create table with calculated date defaullt value:
    CREATE TABLE emp (
      birth_date  DATE  DEFAULT sysdate + interval '3' day NOT NULL
    or
    CREATE TABLE emp (
      some_date DATE,
      birth_date  DATE  DEFAULT some_date NOT NULL
    or
    CREATE TABLE emp (
      some_date DATE,
      birth_date  DATE  DEFAULT some_date + interval '3' day NOT NULL
    below syntax error:
    TT1001: Syntax error in SQL statement before or at: "+"

    I'm afraid this is not possible; as per the SQL Reference, TimesTen only supports 'constant expressions' for the DEFAULT clause and none of these are constant expressions.
    Chris

  • Is it possible to create views with parameters ?

    Hi,
    As MS-Access, is it possible to create views with parameters ?
    Ms-Access syntax : parameters [a] text; select * from table where code = [a]
    If yes, can you give samples ?
    Regards
    Pascal

    I suggest you you write a stored procedure that returns a recordset in oracle. Then execute the stored procedure and loop through the record set.
    Look in in MS Knowledgebase searching on ADO Stored Proceedures for the VB/C++/VBS .. code.
    Look in in Oracle PL/SQL guide for the Stored Proceedure code.

  • How to create table with table description

    Hi,
    I would like create table with table description(like creating package or procedure with comments).
    Is it possible to achieve through oracle, if possible please help me how to achieve this.
    Thanks and regards,
    Ibrahim Sayyed.

    > create table test (col1 number);
    > comment on table test is 'this is a comment';
    > select comments from user_tab_comments where table_name = 'TEST';
    COMMENTS
    this is a comment

  • Create table with references pointing to values in a different schema

    Experts,
    Is it possible to create table in one schema with references pointing to column values in a different schema?
    Say, I have 2 schemas A and B
    A has employee table and and B has dept table, I want to run the below alter statement, will this work?
    ALTER TABLE A.EMP ADD (
    FOREIGN KEY (DEPT_ID)
    REFERENCES B.DEPT (DEPT_ID));
    I know there is no sense in doing this, still would like to know for making some temporary workaround.
    Regards,
    Sarvan
    Edited by: sarvan on Oct 21, 2011 12:30 AM

    Yes this is possible with right privilege:
    SQL> grant connect, resource to a identified by a;
    Grant succeeded.
    SQL> grant connect, resource to b identified by b;
    Grant succeeded.
    SQL> connect b/b
    Connected.
    SQL> create table p (x int primary key);
    Table created.
    SQL> grant references on p to a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> create table c (y int);
    Table created.
    SQL> alter table c add foreign key (y) references b.p(x);
    Table altered.

  • OID users ( EUS) problem with grant create table with admin

    Hi,
    We activated enterprise users in the OID.
    There is a role APP_ADMIN that has the following grants:
    create user
    drop user
    create table with admin option
    this is for an application that creates BI schemas, so it needs to be able to create other users.
    I have granted these to a local role, and the user has access to the local role, thanks to the OID setup.
    The create and drop user work.
    however, the grant create table to another user does not work.
    Is there an issue with 'with admin option' grants in Enterprise user security?
    Regards,
    Peter

    If I grant
    grant create table to test_role with admin option;
    it does not work
    if I grant
    GRANT GRANT ANY PRIVILEGE to test_role WITH ADMIN OPTION;
    it does work.
    The test command as user with test_role is:
    grant create table to test_usr;
    very strange!
    If the user is a standard user and I create role test_role
    and grant create table to test_role with admin option it works.
    but if I convert the user to an EUS user and the same privilege is given to the role ( role is granted to a global role to an enterprise role)
    it doesnt work
    Edited by: Peter on Dec 7, 2012 2:36 PM

  • ORA-00604 ORA-00904 When query partitioned table with partitioned indexes

    Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
    Query runs fine when query the partitioned table without partitioned indexes.
    Here is the query.
    SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
    al27.accessory_code
    FROM vlc.veh_vdc_accessorization_fact al1,
    vlc.vdc_dim al2,
    vlc.model_attribute_dim al7,
    vlc.ppo_list_dim al18,
    vlc.ppo_list_indiv_type_dim al23,
    vlc.accy_type_dim al27
    WHERE ( al2.vdc_id = al1.vdc_location_id
    AND al7.model_attribute_id = al1.model_attribute_id
    AND al18.mydppolist_id = al1.ppo_list_id
    AND al23.mydppolist_id = al18.mydppolist_id
    AND al23.mydaccytyp_id = al27.mydaccytyp_id
    AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
    AND al2.vdc_name IN
    ('PORT OF BALTIMORE',
    'PORT OF JACKSONVILLE - LEXUS',
    'PORT OF LONG BEACH',
    'PORT OF NEWARK',
    'PORT OF PORTLAND'
    AND al27.accessory_code IN ('42', '43', '44', '45')
    GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_code

    I would recommend that you post this at the following OTN forum:
    Database - General
    General Database Discussions
    and perhaps at:
    Oracle Warehouse Builder
    Warehouse Builder
    The Oracle OLAP forum typically does not cover general data warehousing topics.

  • Is it possible to create report with two databases in Web Analysis Studio

    Hi,
    I am new to Hyperion Web Analysis, Could anyone help me out, whether its possible to create report with two databases for eg: OLAP(ESSBASE) and relational.
    Thanks & Regards,
    Prashanthi.

    Hi Mohit,
    Thanks for the reply, could you throw out some scenario so that i can try it out.As I am just trying my hands wet on this would like to know in detail & even i have gone through WA user guide but dint get any clue. Please throw some light.
    thanks
    prasanthi

  • Problem CREATE TABLE with PRIMARY KEY Still in Trouble ! Please Help!

    Hi there !
    I use the orcle 8i, and i don't know why i can't create table with any primary key EXample:
    SQL> CREATE TABLE O_caisses
    2 (No_caisse NUMBER(3) constraint caisses_pk PRIMARY KEY,
    3 NB_BILLETS NUMBER(5)
    4 )
    5 /
    CREATE TABLE O_caisses
    ERROR at line 1:
    ORA-18008: cannot find OUTLN schema
    ***********some Debuger show me this way: *********************
    Well there r certain point u got to notice when creating a table with constraints.
    1) U can create table with COLUMN level constraint.
    2) U can create table with TABLE level constraint.
    3) In COLUMN level constraint u can't give a constraint a name
    but only mention the type of constraint.
    4) In TABLE level constraint u can give a name to constraint.
    Following are the examples of both
    --COLUMN LEVEL
    CREATE TABLE O_caisses
    (No_caisse NUMBER(3) PRIMARY KEY,
    NB_BILLETS NUMBER(5));
    --TABLE LEVEL
    CREATE TABLE O_caisses
    (No_caisse NUMBER(3),
    NB_BILLETS NUMBER(5),
    constraint pk_caisse primary key (No_caisse));
    ********************And this is another one:*****************
    SQL>grant create any outline to username;
    BUT the problem is still present, i don't know what to do now !
    Please could some body help me !
    Thanks alot!
    Luong.

    The clue is in the error message: the OUTLN schema is missing.
    This is something Oracle 8i introduced to help manage the CBO (or soemthing equally geeky and internal). For some reason your database no longer has this user. It ought to be created automatically during installation (or upgrade) but catproct may not have completed probably or some over zealous admin type has dropped it.
    Solution is to re-install (or re-upgrade) as you cannot create this user on their own. Alas.
    HTH, APC

  • How to create table with dynamic rows

    Hi Ppl,
    I have an array lets say with length of n. I want to creata table with 2 columns and no of rows = array length.
    lets say array length is 3 ( array[0] = 1, array[1] = 2, array[2] = 3) so the table should have 2 columns and 3 rows.
    After creation of table I want to display each array value in each row.
    Can somebody help me in this asap.
    Thanks \
    Ashish

    Hi, Thanks for reply... actually this is one part of rtf. I have put values from xml to an array and now I want to create a table with no of rows = length of array. so here xml will not be useful. could you pls think of it without xml.
    result is like
    lets says below is the array
    array[0] = a
    array[1] = b
    array[2] = c
    array length = 3
    so there should be a table of 2 coulmns and 3 rows. Second column of first row will show 'a', Second column of second row wil show 'b' and Second column of third row will show 'c'.
    Hope this is useful.
    Thakns
    Ashish

  • How to create table with row type in smart forms

    How to create table with row type in smart forms with out line type
    please explain me the procedure

    HI,
    A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA <inttab> TYPE TTYP. An internal table <inttab> is created in the program with the attributes defined for TTYP in the ABAP Dictionary.
    A table type is defined by:
    its line type, that defines the structure and data type attributes of a line of the internal table
    the options for managing and accessing the data ( access mode) in the internal table
    the key ( key definition and key category) of the internal table
    The row type is defined by directly entering the data type, length and number of decimal places or by referencing a data element, structured type ( structure, table or view) or other table type. Or the row type can be a reference type.
    <b>for more info :</b> http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    Internal table
    Regards
    Sudheer

  • How to create table with resizable row ?

    how to create table with resizable row ?

    I'd suggest you start here:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

  • Problem on CREATING TABLES  with PRIMARY KEY

    Hi there !
    I use the orcle 8i, and i don't know why i can't create table with any primary key EXample:
    SQL> CREATE TABLE O_caisses
    2 (No_caisse NUMBER(3) constraint caisses_pk PRIMARY KEY,
    3 NB_BILLETS NUMBER(5)
    4 )
    5 /
    CREATE TABLE O_caisses
    ERROR at line 1:
    ORA-18008: cannot find OUTLN schema
    Please could some body help me !
    Thanks alot!
    Luong.

    Luong,
    Your syntax is fine. It looks like you don't have the correct database privileges to create the table. The error message you're getting suggests that you don't have CREATE ANY OUTLINE privileges. You should log in as a user than can grant these privileges and give yourself the correct privileges. I think the syntax is
    SQL>grant create any outline to username;
    Alison

Maybe you are looking for

  • Load Master Data to BPC from a file in BW server

    Hi all, the problem is the next one. We have create some files in Bw with APD. We left those files in a carpet in the Bw server. We want to load those files in BPC. Anyone can explain how we can upload those files? Thanks for the help. Gorka.

  • OBYA : vendor and customer clearing in cross company code transaction

    Hi Gurus, Please can any one telll me how to clear the transactions of cross company code which is in vendor and customer. I already done a configuration in OBYA for customer - vendor. Expected a process of clearing the cross company code transaction

  • What's the method name for convert integer to ASCII

    Hi, all: I need a method which can convert the integer value to the ASCII character. I just can't find this kind of method. If someone know the name of the method or where I need to find it, please tell me. Thanks in advance! he

  • No isight with 10.7.2

    i just install Lion 10.7.2 and now my MBP doesn't recognize the isigt

  • A good installer (configurator) for X please

    I cannot configure my ATI X800 in Xorg. Nit with fglrx (ATI), not with radeon(OSS). I've read all the wiki, I have put the sample xorg.cfg, the Sabayon LiveCD one, and tune all of them step by step reading. I would like an arch version with kde and o