Purge SOAINFRA based on partition

Hi
Is there a PL/SQL procedure that deletes instance data from the SOAINFRA schema, based on the partition they are deployed in?
If we for example have 2 partitions in the SOA Suite
PartitionA with deployed composites:
- CompositeA
- CompositeB
PartitionB with deployed composites:
- CompositeA
- CompositeB
Note that the same process was deployed twice, but in different partitions. And we only want to delete data from one partition at a time.
I found the collaxa.delete_cis_by_composite_dn and with the above structure i guess the following would work:
collaxa.delete_cis_by_composite_dn('PartitionB', 'CompositeA', '10.1.6', i_deleted_instance_count);
collaxa.delete_cis_by_composite_dn('PartitionB', 'CompositeB', '10.1.6', i_deleted_instance_count);
But does it really delete data from all tables? Is there a better way?
Regards

I tried the pl/sql below.
And yes when i perform a search in EM no instances can be found.
But select count(*) from xml_document; still returns thousands of rows.
So not everything is cleaned up by the soa.delete_instances. Which i think is wrong.
Also select count*) from dlv_message gives alot of rows. Which i think is incorrect.
Atleast with the below parameters (i_ignore_state=true)
declare
  i_min_creation_date timestamp;
  i_max_creation_date timestamp;
  i_batch_size number := 20000;
  i_max_runtime number := 60;
  i_retention_period timestamp;
  i_purge_partitioned_component boolean := false;
  i_composite_name varchar2(200) := null;
  i_composite_revision varchar2(200) := null;
  i_soa_partition_name varchar2(200);
  i_ignore_state boolean := true;
begin
  select (sysdate-365) into i_min_creation_date from dual;
  select (sysdate+1) into i_max_creation_date from dual;
  i_retention_period := i_max_creation_date;
  i_soa_partition_name := 'SYNC';
  soa.delete_instances(
    min_creation_date => i_min_creation_date,
    max_creation_date => i_max_creation_date,
    batch_size => i_batch_size,
    max_runtime => i_max_runtime,
    retention_period => i_retention_period,
    purge_partitioned_component => i_purge_partitioned_component,
    composite_name => i_composite_name,
    composite_revision => i_composite_revision,
    soa_partition_name => i_soa_partition_name,
    ignore_state => i_ignore_state
end;

Similar Messages

  • Multiple LDAP Servers and Attribute-Based Data Partitioning

    Hello
    We currently want to implement following szenario on Netweaver 2004s. From the
    following SAP Help documentation we want attribute based data partitioning:
    http://help.sap.com/saphelp_nw70/helpdata/EN/4e/4d0d40c04af72ee10000000a1550b0/frameset.htm
    The difference to the SAP document is that we want a distribution of attributes over
    multiple LDAP servers. So we tried to fit that concept into xml. see attached xml source.
    The Portal finds both LDAP Systems but it is NOT that the useres are beeing merged
    but they appear as two distict users in the portal UME. If you do a lookup in the portal
    usernamagent system you get and see two users.
    User1: unique ID = USER.Datasource1.uid
    User2: unique ID = USER.Datasource2.uid
    Obviously the UME system was not able to merge that information of the two distict
    LDAP Systems. MSADS and Lotus Notes.
    Hence my questions:
    1) is it possible to distribute attributes over multiple ldap data sources
    2) any ideas why UME constructs two different users based in Datasource ID's specified in XML
    Thanks for any contributions or ideas,
    Ulrich Scherb
    <?xml version="1.0" encoding="UTF-8"?>
    <dataSources>
        <dataSource id="PRIVATE_DATASOURCE"
                    className="com.sap.security.core.persistence.datasource.imp.DataBasePersistence"
                    isReadonly="false"
                    isPrimary="true">
            <homeFor>
                <principals>
                     <principal type="group"/>
                     <principal type="user"/>
                     <principal type="account"/>
                    <principal type="team"/>
                    <principal type="ROOT" />
                    <principal type="OOOO" />
                </principals>
            </homeFor>
            <notHomeFor/>
            <responsibleFor>
                <principals>
                     <principal type="group"/>
                     <principal type="user"/>
                     <principal type="account"/>
                    <principal type="team"/>
                    <principal type="ROOT" />
                    <principal type="OOOO" />
                </principals>
            </responsibleFor>
            <privateSection>
            </privateSection>
        </dataSource>
        <dataSource id="NOTES_LDAP"
              className="com.sap.security.core.persistence.datasource.imp.LDAPPersistence"
              isReadonly="true"
              isPrimary="true">
              <homeFor/>
              <responsibleFor>
                   <principal type="account">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="j_user"/>
                             <attribute name="logonalias"/>
                             <attribute name="j_password"/>
                             <attribute name="userid"/>
                        </nameSpace>
                       <nameSpace name="com.sap.security.core.authentication">
                            <attribute name="principal"/>
                       </nameSpace>
                   </principal>
                   <principal type="user">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="firstname" populateInitially="true"/>
                             <attribute name="lastname" populateInitially="true"/>
                             <attribute name="email"/>
                             <attribute name="uniquename" populateInitially="true"/>
                        </nameSpace>
                        <nameSpace name="$usermapping$">
                             <attribute name="REFERENCE_SYSTEM_USER"/>
                        </nameSpace>
                   </principal>
              </responsibleFor>
              <attributeMapping>
                   <principal type="account">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="j_user">
                                  <physicalAttribute name="uid"/>
                             </attribute>
                             <attribute name="logonalias">
                                  <physicalAttribute name="uid"/>
                             </attribute>
                             <attribute name="j_password">
                                  <physicalAttribute name="unicodepwd"/>
                             </attribute>
                             <attribute name="userid">
                                  <physicalAttribute name="*null*"/>
                             </attribute>
                        </nameSpace>
                       <nameSpace name="com.sap.security.core.authentication">
                            <attribute name="principal">
                                 <physicalAttribute name="uid"/>
                            </attribute>
                       </nameSpace>                    
                   </principal>
                   <principal type="user">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="firstname">
                                  <physicalAttribute name="givenname"/>
                             </attribute>
                             <attribute name="lastname">
                                  <physicalAttribute name="sn"/>
                             </attribute>
                             <attribute name="uniquename">
                                  <physicalAttribute name="uid"/>
                             </attribute>
                             <attribute name="loginid">
                                  <physicalAttribute name="*null*"/>
                             </attribute>
                             <attribute name="email">
                                  <physicalAttribute name="mail"/>
                             </attribute>
                        </nameSpace>
                        <nameSpace name="$usermapping$">
                             <attribute name="REFERENCE_SYSTEM_USER">
                                  <physicalAttribute name="sapusername"/>
                             </attribute>
                        </nameSpace>
                   </principal>
              </attributeMapping>
            <privateSection>
                   <ume.ldap.access.server_type>MSADS</ume.ldap.access.server_type>
                   <ume.ldap.access.server_name>ldap1</ume.ldap.access.server_name>
                   <ume.ldap.access.server_port>389</ume.ldap.access.server_port>
                   <ume.ldap.access.authentication>simple</ume.ldap.access.authentication>
                   <ume.ldap.access.user>xxxxx</ume.ldap.access.user>
                   <ume.ldap.access.password>xxxxx</ume.ldap.access.password>
                   <ume.ldap.access.base_path.user>O=SMT_TEST</ume.ldap.access.base_path.user>
                   <ume.ldap.record_access>TRUE</ume.ldap.record_access>
                   <ume.ldap.unique_uacc_attribute>uid</ume.ldap.unique_uacc_attribute>
                   <ume.ldap.unique_user_attribute>uid</ume.ldap.unique_user_attribute>
                   <ume.ldap.access.context_factory>com.sun.jndi.ldap.LdapCtxFactory</ume.ldap.access.context_factory>
                   <ume.ldap.access.user_as_account>true</ume.ldap.access.user_as_account>
                   <ume.ldap.access.ssl_socket_factory>com.sap.security.core.server.https.SecureConnectionFactory</ume.ldap.access.ssl_socket_factory>
                   <ume.ldap.access.objectclass.user>person</ume.ldap.access.objectclass.user>
                   <ume.ldap.access.objectclass.uacc>person</ume.ldap.access.objectclass.uacc>
                   <ume.ldap.access.naming_attribute.user>cn</ume.ldap.access.naming_attribute.user>
                   <ume.ldap.access.auxiliary_naming_attribute.user>uid</ume.ldap.access.auxiliary_naming_attribute.user>
                   <ume.ldap.access.naming_attribute.uacc>cn</ume.ldap.access.naming_attribute.uacc>
                   <ume.ldap.access.auxiliary_naming_attribute.uacc>uid</ume.ldap.access.auxiliary_naming_attribute.uacc>
              </privateSection>
         </dataSource>
        <dataSource id="CORP_LDAP"
              className="com.sap.security.core.persistence.datasource.imp.LDAPPersistence"
              isReadonly="true"
              isPrimary="true">
              <homeFor/>
              <responsibleFor>
                   <principal type="account">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="j_user"/>
                             <attribute name="logonalias"/>
                             <attribute name="j_password"/>
                             <attribute name="userid"/>
                        </nameSpace>
                       <nameSpace name="com.sap.security.core.authentication">
                            <attribute name="principal"/>
                            <attribute name="realm"/>
                            <attribute name="domain"/>
                       </nameSpace>
                   </principal>
                   <principal type="user">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="firstname" populateInitially="true"/>
                             <attribute name="displayname" populateInitially="true"/>
                             <attribute name="lastname" populateInitially="true"/>
                             <attribute name="fax"/>
                             <attribute name="title"/>
                             <attribute name="department"/>
                             <attribute name="description"/>
                             <attribute name="mobile"/>
                             <attribute name="telephone"/>
                             <attribute name="streetaddress"/>
                             <attribute name="uniquename" populateInitially="true"/>
                        </nameSpace>
                        <nameSpace name="com.sap.security.core.usermanagement.relation">
                             <attribute name="PRINCIPAL_RELATION_PARENT_ATTRIBUTE"/>
                        </nameSpace>
                        <nameSpace name="$usermapping$">
                             <attribute name="REFERENCE_SYSTEM_USER"/>
                        </nameSpace>
                   </principal>
                   <principal type="group">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="displayname" populateInitially="true"/>
                             <attribute name="description" populateInitially="true"/>
                             <attribute name="uniquename"/>
                        </nameSpace>
                        <nameSpace name="com.sap.security.core.usermanagement.relation">
                             <attribute name="PRINCIPAL_RELATION_MEMBER_ATTRIBUTE"/>
                             <attribute name="PRINCIPAL_RELATION_PARENT_ATTRIBUTE"/>
                        </nameSpace>
                        <nameSpace name="com.sap.security.core.bridge">
                             <attribute name="dn"/>
                        </nameSpace>
                   </principal>
              </responsibleFor>
              <attributeMapping>
                   <principal type="account">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="j_user">
                                  <physicalAttribute name="samaccountname"/>
                             </attribute>
                             <attribute name="logonalias">
                                  <physicalAttribute name="samaccountname"/>
                             </attribute>
                             <attribute name="j_password">
                                  <physicalAttribute name="unicodepwd"/>
                             </attribute>
                             <attribute name="userid">
                                  <physicalAttribute name="*null*"/>
                             </attribute>
                        </nameSpace>
                       <nameSpace name="com.sap.security.core.authentication">
                            <attribute name="principal">
                                 <physicalAttribute name="samaccountname"/>
                            </attribute>
                            <attribute name="realm">
                                 <physicalAttribute name="*null*"/>
                            </attribute>
                            <attribute name="domain">
                                 <physicalAttribute name="*null*"/>
                            </attribute>
                       </nameSpace>                    
                   </principal>
                   <principal type="user">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="firstname">
                                  <physicalAttribute name="givenname"/>
                             </attribute>
                             <attribute name="displayname">
                                  <physicalAttribute name="displayname"/>
                             </attribute>
                             <attribute name="lastname">
                                  <physicalAttribute name="sn"/>
                             </attribute>
                             <attribute name="fax">
                                  <physicalAttribute name="facsimiletelephonenumber"/>
                             </attribute>
                             <attribute name="uniquename">
                                  <physicalAttribute name="samaccountname"/>
                             </attribute>
                             <attribute name="loginid">
                                  <physicalAttribute name="*null*"/>
                             </attribute>
                             <attribute name="mobile">
                                  <physicalAttribute name="mobile"/>
                             </attribute>
                             <attribute name="telephone">
                                  <physicalAttribute name="telephonenumber"/>
                             </attribute>
                             <attribute name="department">
                                  <physicalAttribute name="ou"/>
                             </attribute>
                             <attribute name="description">
                                  <physicalAttribute name="description"/>
                             </attribute>
                             <attribute name="streetaddress">
                                  <physicalAttribute name="postaladdress"/>
                             </attribute>
                             <attribute name="pobox">
                                  <physicalAttribute name="postofficebox"/>
                             </attribute>
                        </nameSpace>
                        <nameSpace name="com.sap.security.core.usermanagement.relation">
                             <attribute name="PRINCIPAL_RELATION_PARENT_ATTRIBUTE">
                                  <physicalAttribute name="memberof"/>
                             </attribute>
                        </nameSpace>
                        <nameSpace name="$usermapping$">
                             <attribute name="REFERENCE_SYSTEM_USER">
                                  <physicalAttribute name="sapusername"/>
                             </attribute>
                        </nameSpace>
                   </principal>
                   <principal type="group">
                        <nameSpace name="com.sap.security.core.usermanagement">
                             <attribute name="displayname">
                                  <physicalAttribute name="displayname"/>
                             </attribute>
                             <attribute name="description">
                                  <physicalAttribute name="description"/>
                             </attribute>
                             <attribute name="uniquename" populateInitially="true">
                                  <physicalAttribute name="cn"/>
                             </attribute>
                        </nameSpace>
                        <nameSpace name="com.sap.security.core.usermanagement.relation">
                             <attribute name="PRINCIPAL_RELATION_MEMBER_ATTRIBUTE">
                                  <physicalAttribute name="member"/>
                             </attribute>
                             <attribute name="PRINCIPAL_RELATION_PARENT_ATTRIBUTE">
                                  <physicalAttribute name="memberof"/>
                             </attribute>
                        </nameSpace>
                        <nameSpace name="com.sap.security.core.bridge">
                            <attribute name="dn">
                                  <physicalAttribute name="*null*"/>
                             </attribute>
                        </nameSpace>
                   </principal>
              </attributeMapping>
            <privateSection>
                   <ume.ldap.access.server_type>MSADS</ume.ldap.access.server_type>
                   <ume.ldap.access.server_name>ldap2</ume.ldap.access.server_name>
                   <ume.ldap.access.server_port>389</ume.ldap.access.server_port>
                   <ume.ldap.access.authentication>simple</ume.ldap.access.authentication>
                   <ume.ldap.access.user>yyyyy</ume.ldap.access.user>
                   <ume.ldap.access.password>yyyyy</ume.ldap.access.password>
                   <ume.ldap.access.base_path.user>O=SMT_TEST</ume.ldap.access.base_path.user>
                   <ume.ldap.access.base_path.grup>O=SMT_TEST</ume.ldap.access.base_path.grup>
                   <ume.ldap.record_access>TRUE</ume.ldap.record_access>
                   <ume.ldap.unique_uacc_attribute>samaccountname</ume.ldap.unique_uacc_attribute>
                   <ume.ldap.unique_user_attribute>samaccountname</ume.ldap.unique_user_attribute>
                   <ume.ldap.access.context_factory>com.sun.jndi.ldap.LdapCtxFactory</ume.ldap.access.context_factory>
                   <ume.ldap.access.authentication>simple</ume.ldap.access.authentication>
                   <ume.ldap.access.flat_group_hierachy>true</ume.ldap.access.flat_group_hierachy>
                   <ume.ldap.access.user_as_account>true</ume.ldap.access.user_as_account>
                   <ume.ldap.access.dynamic_groups>false</ume.ldap.access.dynamic_groups>
                   <ume.ldap.access.ssl_socket_factory>com.sap.security.core.server.https.SecureConnectionFactory</ume.ldap.access.ssl_socket_factory>
                   <ume.ldap.access.objectclass.user>User</ume.ldap.access.objectclass.user>
                   <ume.ldap.access.objectclass.uacc>User</ume.ldap.access.objectclass.uacc>
                   <ume.ldap.access.objectclass.grup>Group</ume.ldap.access.objectclass.grup>
                   <ume.ldap.access.naming_attribute.user>cn</ume.ldap.access.naming_attribute.user>
                   <ume.ldap.access.auxiliary_naming_attribute.user>samaccountname</ume.ldap.access.auxiliary_naming_attribute.user>
                   <ume.ldap.access.naming_attribute.uacc>cn</ume.ldap.access.naming_attribute.uacc>
                   <ume.ldap.access.auxiliary_naming_attribute.uacc>samaccountname</ume.ldap.access.auxiliary_naming_attribute.uacc>
                   <ume.ldap.access.naming_attribute.grup>cn</ume.ldap.access.naming_attribute.grup>
              </privateSection>
         </dataSource>
    </dataSources>

    Hi Ulrich,
    Hope your problem is resolved. We are using EP7 and SP18. We are doing some study on your first issue. i.e. Distributing a user attribute into multiple LDAPs. Can you please let me know the feasibility? If yes, what are all step do I have to follow? Expecting your valuable answer. Thanks in advance!
    Regards,
    Kabali

  • How to merge in to a table based on partition

    Hi,
    we have a mapping in which we use partitioned table as target and we call the mapping in loop sending partition keys as input parameters.this mapping works as merge on target based on some 4 columns, for just 20 records it take more than 7 minutes, i tried running that merge statement directly against DB it took same time, then i used the partition keys in the merge to match it finished in 1 second. my question is can i have some kind of parameter setting which will enable to use the input parameters while merging so that it can go against single partition instead of searching the whole table,
    how to merge based on partition key values along with merge keys
    Suresh

    Hi David,
    here is my original merge statement from mapping
    MERGE INTO GL_JE_LINE_DETAIL
    USING (SELECT "GL_JE_LINES_STG"."JE_LINE_ID" "JE_LINE_ID",
    '4' "SOURCE",
    "XXGL_AP_DRILLDOWN_V"."VENDOR_NUMBER" "VENDOR_NUMBER",
    "XXGL_AP_DRILLDOWN_V"."VENDOR_NAME" "VENDOR_NAME",
    "XXGL_AP_DRILLDOWN_V"."INVOICE_NUMBER" "INVOICE_NUMBER",
    "XXGL_AP_DRILLDOWN_V"."PO_NUMBER" "PO_NUMBER",
    "XXGL_AP_DRILLDOWN_V"."DOC_REF" "DOC_REF",
    "XXGL_AP_DRILLDOWN_V"."AMOUNT" "AMOUNT",
    "GL_JE_LINES_STG"."CREATION_DATE" "CREATION_DATE",
    "GL_JE_LINES_STG"."LAST_UPDATE_DATE" "LAST_UPDATE_DATE",
    "GL_JE_LINES_STG"."PERIOD_YEAR" "PERIOD_YEAR",
    "GL_JE_LINES_STG"."PERIOD_MONTH" "PERIOD_MONTH",
    "GL_JE_LINES_STG"."ENTITY_CODE" "ENTITY_CODE",
    "XXGL_AP_DRILLDOWN_V"."DESCRIPTION" "DESCRIPTION",
    '6' "ORIG_SOURCE",
    "XXGL_AP_DRILLDOWN_V"."AP_SOURCE" "AP_SOURCE",
    "XXGL_AP_DRILLDOWN_V"."AE_LINE_ID" "AE_LINE_ID",
    "XXGL_AP_DRILLDOWN_V"."JE_HEADER_ID" "JE_HEADER_ID_1",
    "XXGL_AP_DRILLDOWN_V"."JE_LINE_NUM" "JE_LINE_NUM_1"
    FROM datarepdb."GL_JE_LINES_STG" "GL_JE_LINES_STG",
    datarepdb."XXGL_AP_DRILLDOWN_V" "XXGL_AP_DRILLDOWN_V"
    WHERE ("GL_JE_LINES_STG"."PERIOD_YEAR" = 2009)
    AND ("GL_JE_LINES_STG"."PERIOD_MONTH" = 9)
    AND ("GL_JE_LINES_STG"."ENTITY_CODE" = 'GPC')
    AND ("GL_JE_LINES_STG"."USER_JE_SOURCE_NAME" = 'Payables')
    AND ("GL_JE_LINES_STG"."JE_HEADER_ID" = "XXGL_AP_DRILLDOWN_V"."JE_HEADER_ID")
    AND ("GL_JE_LINES_STG"."JE_LINE_NUM" = "XXGL_AP_DRILLDOWN_V"."JE_LINE_NUM")) merge_subquery
    ON ( "GL_JE_LINE_DETAIL"."PERIOD_YEAR" = "MERGE_SUBQUERY"."PERIOD_YEAR"
    AND "GL_JE_LINE_DETAIL"."PERIOD_MONTH" = "MERGE_SUBQUERY"."PERIOD_MONTH"
    AND "GL_JE_LINE_DETAIL"."ENTITY_CODE" = "MERGE_SUBQUERY"."ENTITY_CODE"
    AND "GL_JE_LINE_DETAIL"."AE_LINE_ID" = "MERGE_SUBQUERY"."AE_LINE_ID")
    I am merging based on the 4 columns you see at the end , i specified that on target table, this query is costly
    when i change the merge part as
    ON ( "GL_JE_LINE_DETAIL"."PERIOD_YEAR" = "MERGE_SUBQUERY"."PERIOD_YEAR"
    AND "GL_JE_LINE_DETAIL"."PERIOD_MONTH" = "MERGE_SUBQUERY"."PERIOD_MONTH"
    AND "GL_JE_LINE_DETAIL"."ENTITY_CODE" = "MERGE_SUBQUERY"."ENTITY_CODE"
    AND "GL_JE_LINE_DETAIL"."AE_LINE_ID" = "MERGE_SUBQUERY"."AE_LINE_ID")
    AND "GL_JE_LINE_DETAIL"."PERIOD_YEAR" = 2009
    AND "GL_JE_LINE_DETAIL"."PERIOD_MONTH" = 9
    AND "GL_JE_LINE_DETAIL"."ENTITY_CODE" = 'GPC')
    The lines in bold in the first sql are input parameters i added the same in to merge statement then the query finished in 1 second,and i see in the explain plan that its going to single partition in other case it was doing multiple partitions
    how can i add these input parameters in to the mapping.
    Suresh.
    Edited by: Suresh_G on Sep 22, 2009 9:34 AM
    Edited by: Suresh_G on Sep 22, 2009 9:56 AM

  • Function based local partitioned Index

    Hi,
    Is function based index possible on partitioned column?
    E.g:
    CREATE TABLE MYTABLE
        MY_ID               NUMBER(10)   NOT NULL,
        MY_DATETIME         DATE         NOT NULL,
        MY_ACTIVITY_TYPE    VARCHAR2(1)  NOT NULL,
        MY_CREATE_DATETIME  DATE         NOT NULL,
        MY_BUSINESS_DATE    DATE         NOT NULL,
        MY_EXP_PROCESS_DATE DATE             NULL
    TABLESPACE TABLESPACE_D
    NOLOGGING
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOPARALLEL
    NOCACHE
    PARTITION BY RANGE(MY_DATETIME)
    (PARTITION MYTABLE_2006_JAN VALUES LESS THAN (TO_DATE('02-FEB-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_FEB VALUES LESS THAN (TO_DATE('02-MAR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAR VALUES LESS THAN (TO_DATE('04-APR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_APR VALUES LESS THAN (TO_DATE('02-MAY-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAY VALUES LESS THAN (TO_DATE('02-JUN-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUN VALUES LESS THAN (TO_DATE('04-JUL-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUL VALUES LESS THAN (TO_DATE('02-AUG-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_AUG VALUES LESS THAN (TO_DATE('04-SEP-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_SEP VALUES LESS THAN (TO_DATE('03-OCT-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_OCT VALUES LESS THAN (TO_DATE('02-NOV-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_NOV VALUES LESS THAN (TO_DATE('04-DEC-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_DEC VALUES LESS THAN (TO_DATE('02-JAN-2007','DD-MON-YYYY'))
    NOLOGGING
    CREATE INDEX IDX_MY_TABLLE_DATETIME
        ON MYTABLE(MY_DATETIME,TO_NUMBER(TO_CHAR(MY_DATETIME,'YYYYMM')))
    LOCAL
    PARTITION MYTABLE_2006_JAN,
    PARTITION MYTABLE_2006_FEB,
    PARTITION MYTABLE_2006_MAR,
    PARTITION MYTABLE_2006_APR,
    PARTITION MYTABLE_2006_MAY,
    PARTITION MYTABLE_2006_JUN,
    PARTITION MYTABLE_2006_JUL,
    PARTITION MYTABLE_2006_AUG,
    PARTITION MYTABLE_2006_SEP,
    PARTITION MYTABLE_2006_OCT,
    PARTITION MYTABLE_2006_NOV,
    PARTITION MYTABLE_2006_DEC
    ) PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    TABLESPACE TABLESPACE_I
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOLOGGING
    NOPARALLEL
    NOCOMPRESS
    /Oracle allows me to create the above index(I am using 10g) but in the USER_INDEXES data dictionary, for the above index the STATUS value is N/A. I could able to query also and the explain plan shows this index but my concern is will there be any other performance problem with this type of index?
    Regards,
    Mohana

    Hi,
    Is function based index possible on partitioned column?
    E.g:
    CREATE TABLE MYTABLE
        MY_ID               NUMBER(10)   NOT NULL,
        MY_DATETIME         DATE         NOT NULL,
        MY_ACTIVITY_TYPE    VARCHAR2(1)  NOT NULL,
        MY_CREATE_DATETIME  DATE         NOT NULL,
        MY_BUSINESS_DATE    DATE         NOT NULL,
        MY_EXP_PROCESS_DATE DATE             NULL
    TABLESPACE TABLESPACE_D
    NOLOGGING
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOPARALLEL
    NOCACHE
    PARTITION BY RANGE(MY_DATETIME)
    (PARTITION MYTABLE_2006_JAN VALUES LESS THAN (TO_DATE('02-FEB-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_FEB VALUES LESS THAN (TO_DATE('02-MAR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAR VALUES LESS THAN (TO_DATE('04-APR-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_APR VALUES LESS THAN (TO_DATE('02-MAY-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_MAY VALUES LESS THAN (TO_DATE('02-JUN-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUN VALUES LESS THAN (TO_DATE('04-JUL-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_JUL VALUES LESS THAN (TO_DATE('02-AUG-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_AUG VALUES LESS THAN (TO_DATE('04-SEP-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_SEP VALUES LESS THAN (TO_DATE('03-OCT-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_OCT VALUES LESS THAN (TO_DATE('02-NOV-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_NOV VALUES LESS THAN (TO_DATE('04-DEC-2006','DD-MON-YYYY')),
    PARTITION MYTABLE_2006_DEC VALUES LESS THAN (TO_DATE('02-JAN-2007','DD-MON-YYYY'))
    NOLOGGING
    CREATE INDEX IDX_MY_TABLLE_DATETIME
        ON MYTABLE(MY_DATETIME,TO_NUMBER(TO_CHAR(MY_DATETIME,'YYYYMM')))
    LOCAL
    PARTITION MYTABLE_2006_JAN,
    PARTITION MYTABLE_2006_FEB,
    PARTITION MYTABLE_2006_MAR,
    PARTITION MYTABLE_2006_APR,
    PARTITION MYTABLE_2006_MAY,
    PARTITION MYTABLE_2006_JUN,
    PARTITION MYTABLE_2006_JUL,
    PARTITION MYTABLE_2006_AUG,
    PARTITION MYTABLE_2006_SEP,
    PARTITION MYTABLE_2006_OCT,
    PARTITION MYTABLE_2006_NOV,
    PARTITION MYTABLE_2006_DEC
    ) PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    TABLESPACE TABLESPACE_I
    STORAGE(INITIAL 128K
            NEXT 4M
            MINEXTENTS 1
            MAXEXTENTS UNLIMITED
            PCTINCREASE 0
            BUFFER_POOL DEFAULT)
    NOLOGGING
    NOPARALLEL
    NOCOMPRESS
    /Oracle allows me to create the above index(I am using 10g) but in the USER_INDEXES data dictionary, for the above index the STATUS value is N/A. I could able to query also and the explain plan shows this index but my concern is will there be any other performance problem with this type of index?
    Regards,
    Mohana

  • Time based aggregation - partition

    I have a question regarding partitioning of an InfoCube.  Can you use logical partitioning on an InfoCube designed with "time-based aggregation"?

    conversion of minthly and weekly time buckets: If you have overlaping time buckets in your planning area, data is stored in storage buckets that have the lowest granularity of the planning buckets. the overlaping periods are considered as a separate storage bucket
    21May -27May - 7 days
    28May -31 may - 4 days
    01 June -03 June  - 3 days
    04June -10 june - 7 days
    You can have a temporary mixed bucket display in the planning book by using the Planning Bucket Profile : 9ASTORAGE. You can do this change from the interactive planning book. If you can tell what version you are on we can help with how to reach there. As far as i know, This display cannot be made permanent
    if you want a mixed time bucket for permanent display you need to create fiscal year variants in customizing and create your time bucket and planning bucket profiles accordingly.

  • SELECT data based on partitions

    I know we have PARTITION clause in SELECT statement.
    My requirement is i need to select data from Last two partitions in which data is available.
    If we know the name of the 2 partitions then we can select and UNION ALL.
    But In my case, i dont know the partitition names too,
    I need to find out the names of the partitions using any subquery and i need to select from that.
    May i know how can i achieve this?
    Thanks

    Maybe you could adjust the below (NOT TESTED !) if the meaning of the recent 2 partitions is somehow connected with partition_position within [url http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/statviews_2108.htm#REFRN20281]all_tab_partitions as I don't have a database at hand to find out how partitions are being numbered.
    declare
      the_sql   varchar2(32000) := q'{ your sql here }'; -- assumed having a where clause
      the_table varchar2(30)    := 'your_table_name';
    begin
      for i in (select partition_name
                  from all_tab_partitions
                 where table_name = the_table
                   and partition_position <= 2  -- assumed ascending order for partition numbering
      for i in (select partition_name
                  from (select partition_name,row_number() over (order by partition_position desc) rn
                          from all_tab_partitions
                         where table_name = the_table
                 where rn <= 2  -- assumed descending order for partition numbering
      loop
        substr(the_sql,1,instr(the_sql,'where')) || ' partition (' || i.partition_name || ') ' ||
        substr(the_sql,instr(the_sql,'where')) || ' union all ';
      end loop;
      the_sql := 'select * from (' || substr(the_sql,1,instr(the_sql,' union all ',-1,1)) || ')';
      dbms_output(the_sql);
    end;Regards
    Etbin

  • User-based partitioning

    Hi everybody,
    I'm trying to implement user-based data partitioning. I want to store users with the department "IT" in the Database and others in the second Data Store an SAP System.
    With the following config.xml I achieved this, but the users that were stored in the sap system became no sap account and could not login to the sap system. This is becaue I've set the <homeFor> <principal name="account"> .. on the database side.
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- $Id: //shared_tc/com.sapall.security/630_SP_COR/src/_deploy/dist/configuration/shared/dataSourceConfiguration_r3.xml#6 $ from $DateTime: 2004/07/01 09:31:21 $ ($Change: 16627 $) -->
    <!DOCTYPE dataSources SYSTEM "dataSourceConfiguration.dtd">
    <dataSources>
      <dataSource id="PRIVATE_DATASOURCE" className="com.sap.security.core.persistence.datasource.imp.DataBasePersistence" isReadonly="false" isPrimary="true">
        <homeFor>
          <principals>
            <principal type="user">
              <nameSpace name="com.sap.security.core.usermanagement">
                <attribute name="department">
                  <values>
                    <value>IT</value>
                  </values>
                </attribute>
              </nameSpace>
            </principal>
            <principal type="account"/>
            <principal type="group"/>
            <principal type="team"/>
            <principal type="ROOT"/>
            <principal type="OOOO"/>
          </principals>
        </homeFor>
        <notHomeFor/>
        <responsibleFor>
          <principals>
            <principal type="group"/>
            <principal type="user"/>
            <principal type="account"/>
            <principal type="team"/>
            <principal type="ROOT"/>
            <principal type="OOOO"/>
          </principals>
        </responsibleFor>
        <privateSection/>
      </dataSource>
      <dataSource id="R3_DATASOURCE" className="com.sap.security.core.persistence.datasource.imp.R3Persistence" isReadonly="false" isPrimary="true">
        <homeFor>
         <principal type="user"/>
        </homeFor>
        <notHomeFor>
         <principals>
            <principal type="user">
              <nameSpace name="com.sap.security.core.usermanagement">
                <attribute name="department">
                  <values>
                    <value>IT</value>
                  </values>
                </attribute>
              </nameSpace>
            </principal>
            </principals>
        </notHomeFor>
        <responsibleFor>
          <principals>
            <principal type="user">
              <nameSpaces>
                <nameSpace name="com.sap.security.core.usermanagement">
                  <attributes>
                    <attribute name="uniquename"/>
                    <attribute name="firstname"/>
                    <attribute name="lastname"/>
                    <attribute name="salutation"/>
                    <attribute name="title"/>
                    <attribute name="jobtitle"/>
                    <attribute name="department"/>
                    <attribute name="email"/>
                    <attribute name="telephone"/>
                    <attribute name="mobile"/>
                    <attribute name="fax"/>
                    <attribute name="locale"/>
                    <attribute name="timezone"/>
                    <attribute name="referenceuser"/>
                  </attributes>
                </nameSpace>
              </nameSpaces>
            </principal>
            <principal type="account">
              <nameSpaces>
                <nameSpace name="com.sap.security.core.usermanagement">
                  <attributes>
                    <attribute name="j_user"/>
                    <attribute name="j_password"/>
                    <attribute name="validfrom" />
                    <attribute name="validto"/>
                    <attribute name="islocked"/>
                    <attribute name="lockreason"/>
                    <attribute name="passwordchangerequired"/>
                    <attribute name="userid"/>
                    <attribute name="ispassworddisabled"/>
                    <attribute name="logonalias"/>
                  </attributes>
                </nameSpace>
              </nameSpaces>
            </principal>
          </principals>
        </responsibleFor>
        <attributeMapping/>
        <privateSection/>
      </dataSource>
    </dataSources>
    What I tried than is adding
    </principal>
             <principal type="account">
              <nameSpace name="com.sap.security.core.usermanagement">
                <attribute name="department">
                  <values>
                    <value>IT</value>
                  </values>
                </attribute>
              </nameSpace>
        </principal>
    to the <homeFor> section of the database
    and <notHomeFor> section of the sap system
    and of course adding: <principal type="account"> to <homeFor> of SAP System.
    It didn't worked.
    So my question is how can I specify that an account for the user with department "IT" should also be created in the database and all other accounts in the SAP system?
    Regards

    James,
    yes. We want to setup external users in a seperate datastore. From the EP documentation I know it is possible but I do not seem to find any docs on how to set it up.
    Thank You, Madhavi

  • How to find out the min & max partition_id in a range partition?

    Hi we have a table set up by range partition
    In the table creation script. It goes something like:
    PARTITION PARTD_CUST_3_1_NEW VALUES LESS THAN ('39500')
    so how we can find out this number '39500' from some of the data_dictionary view?
    What we want to do is to set up parallel processing (do-it-yourself) based on partition.
    So the number of parallel process will be based on this ID-range.
    I can find out how many partitions are there by using something like this:
    SELECT COUNT(*)
    FROM all_tab_partitions WHERE table_owner='OWNER_NAME' AND table_name='TABLE_NAME'
    We have 5 partitions now but the table structure can change in the near future even this table has moer than 130Million rows
    I do not want to hardcode this "39500" just in case the table structure changes (partition structure changes)
    Any idea ??

    vxwo0owxv wrote:
    Hi we have a table set up by range partition
    In the table creation script. It goes something like:
    PARTITION PARTD_CUST_3_1_NEW VALUES LESS THAN ('39500')
    so how we can find out this number '39500' from some of the data_dictionary view?
    What we want to do is to set up parallel processing (do-it-yourself) based on partition.
    So the number of parallel process will be based on this ID-range.
    I can find out how many partitions are there by using something like this:
    SELECT COUNT(*)
    FROM all_tab_partitions WHERE table_owner='OWNER_NAME' AND table_name='TABLE_NAME'
    We have 5 partitions now but the table structure can change in the near future even this table has moer than 130Million rows
    I do not want to hardcode this "39500" just in case the table structure changes (partition structure changes)
    Any idea ??query DBA_TAB_PARTITIONS.HIGH_VALUE

  • Partitioned IOT of Object Type - mapping table not allowed for bitmap index

    Hi,
    looks like a feature available for standard Partitioned IOTs is not supported for object based tables, namely the MAPPING TABLE construct to support secondary local bitmap indexes.
    Can you confirm behaviour is as expected/documented?
    If so, is a fix/enhancement to support mapping table for object-based Partitioned IOTs in the pipeline?
    Results for partition-wise load using pipelined table function are very good, look-ups across tens of millions of rows are excellent.
    Environment = Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    OS = Oracle Enterprise Linux Server release 5.2 (Carthage) 2.6.18 92.el5 (32-bit)
    Here's the potted test-case...
    1) First the non object based Partitioned IOT - data is range-partitioned across the alphabet
    CREATE TABLE IOT_Table (
    textData VARCHAR2(10),
    numberData NUMBER(10,0),
    CONSTRAINT IOT_Table_PK PRIMARY KEY(textData))
    ORGANIZATION INDEX MAPPING TABLE PCTFREE 0 TABLESPACE Firewire
    PARTITION BY RANGE (textData)
    (PARTITION Text_Part_A VALUES LESS THAN ('B') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_B VALUES LESS THAN ('C') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_C VALUES LESS THAN ('D') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_D VALUES LESS THAN ('E') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_E VALUES LESS THAN ('F') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_F VALUES LESS THAN ('G') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_G VALUES LESS THAN ('H') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_H VALUES LESS THAN ('I') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_I VALUES LESS THAN ('J') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_J VALUES LESS THAN ('K') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_K VALUES LESS THAN ('L') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_L VALUES LESS THAN ('M') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_M VALUES LESS THAN ('N') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_N VALUES LESS THAN ('O') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_O VALUES LESS THAN ('P') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_P VALUES LESS THAN ('Q') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Q VALUES LESS THAN ('R') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_R VALUES LESS THAN ('S') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_S VALUES LESS THAN ('T') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_T VALUES LESS THAN ('U') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_U VALUES LESS THAN ('V') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_V VALUES LESS THAN ('W') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_W VALUES LESS THAN ('X') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_X VALUES LESS THAN ('Y') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Y VALUES LESS THAN ('Z') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Z VALUES LESS THAN (MAXVALUE) PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0))
    NOLOGGING PARALLEL -- FLASHBACK ARCHIVE IOT_Flashback_Data
    SQL> table IOT_TABLE created.
    2) Create the local secondary bitmap index utilising the underlying mapping table
    CREATE BITMAP INDEX IOT_Table_BMI1 ON IOT_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    SQL> bitmap index IOT_TABLE_BMI1 created.
    3) Quick test to confirm all ok
    SQL> INSERT INTO IOT_Table VALUES ('ABC123',100);
    SQL> 1 rows inserted.
    SQL> SELECT * FROM IOT_Table;
    TEXTDATA NUMBERDATA
    ABC123     100
    4) Now create a minimal object type to use as the template for object table
    CREATE TYPE IOT_type AS OBJECT
    textData VARCHAR2(10 CHAR),
    numberData NUMBER(10,0)
    ) FINAL
    SQL> TYPE IOT_type compiled
    5) Attempt to create an object-based range partitioned IOT, including MAPPING TABLE clause as per step (1)
    CREATE TABLE IOTObj_Table OF IOT_type (textData PRIMARY KEY)
    OBJECT IDENTIFIER IS PRIMARY KEY ORGANIZATION INDEX
    MAPPING TABLE -- we'd like to use this feature to enable use of Bitmap Indexes...
    PCTFREE 0 TABLESPACE Firewire
    PARTITION BY RANGE (textData)
    (PARTITION Text_Part_A VALUES LESS THAN ('B') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_B VALUES LESS THAN ('C') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_C VALUES LESS THAN ('D') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_D VALUES LESS THAN ('E') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_E VALUES LESS THAN ('F') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_F VALUES LESS THAN ('G') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_G VALUES LESS THAN ('H') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_H VALUES LESS THAN ('I') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_I VALUES LESS THAN ('J') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_J VALUES LESS THAN ('K') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_K VALUES LESS THAN ('L') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_L VALUES LESS THAN ('M') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_M VALUES LESS THAN ('N') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_N VALUES LESS THAN ('O') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_O VALUES LESS THAN ('P') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_P VALUES LESS THAN ('Q') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Q VALUES LESS THAN ('R') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_R VALUES LESS THAN ('S') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_S VALUES LESS THAN ('T') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_T VALUES LESS THAN ('U') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_U VALUES LESS THAN ('V') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_V VALUES LESS THAN ('W') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_W VALUES LESS THAN ('X') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_X VALUES LESS THAN ('Y') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Y VALUES LESS THAN ('Z') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Z VALUES LESS THAN (MAXVALUE) PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0))
    NOLOGGING PARALLEL -- FLASHBACK ARCHIVE IOT_Flashback_Data
    This errors out with the following...
    SQL Error: ORA-25182: feature not currently available for index-organized tables
    25182. 00000 - "feature not currently available for index-organized tables"
    *Cause:    An attempt was made to use one or more of the following feature(s) not
    currently supported for index-organized tables:
    CREATE TABLE with LOB/BFILE/VARRAY columns,
    partitioning/PARALLEL/CREATE TABLE AS SELECT options,
    ALTER TABLE with ADD/MODIFY column options, CREATE INDEX
    *Action:   Do not use the disallowed feature(s) in this release.
    6) Re-running the create table statement in step 5 without the MAPPING TABLE clause works fine. Not surprisingly an attempt to create a secondary local bitmap index on this table fails as there's no mapping table, like so...
    CREATE BITMAP INDEX IOTObj_Table_BMI1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    CREATE TABLE with LOB/BFILE/VARRAY columns,
    partitioning/PARALLEL/CREATE TABLE AS SELECT options,
    ALTER TABLE with ADD/MODIFY column options, CREATE INDEX
    *Action:   Do not use the disallowed feature(s) in this release.
    CREATE BITMAP INDEX IOTObj_Table_BMI1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL
    Error at Command Line:99 Column:13
    Error report:
    SQL Error: ORA-00903: invalid table name
    00903. 00000 - "invalid table name"
    7) Creating a secondary local b-tree index is fine, like so...
    SQL> CREATE INDEX IOTObj_Table_I1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    index IOTOBJ_TABLE_I1 created.
    8) A quick test to ensure object table ok...
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DEF456',500));
    SQL> 1 rows inserted.
    SQL> SELECT * FROM IOTObj_Table;
    TEXTDATA NUMBERDATA
    DEF456     500

    Thanks Dan,
    the intention is to range partition based on the initial character, so A* -> Text_Part_A, B* -> Text_Part_B, and so on.
    Here's an example, using an empty IOTObj_Table as created previously.
    1) Set up & confirm some test data (two 'D's, one 'N', and two 'Z's)
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DEF456',500));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DDD111',510));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('N3000',515));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('ZZ1212',520));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530));
    SQL> COMMIT;
    SQL> SELECT * FROM IOTObj_Table;
    TEXTDATA NUMBERDATA
    DDD111     510
    DEF456     500
    N3000     515
    Z111X     530
    ZZ1212     520
    2) Just to prove our IOT is enforcing the Primary Key based on the TextData attribute, try to insert a duplicate
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530));
    Error starting at line 141 in command:
    INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530))
    Error report:
    SQL Error: ORA-00001: unique constraint (OCDataSystems.SYS_IOT_TOP_84235) violated
    00001. 00000 - "unique constraint (%s.%s) violated"
    *Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
    For Trusted Oracle configured in DBMS MAC mode, you may see
    this message if a duplicate entry exists at a different level.
    *Action:   Either remove the unique restriction or do not insert the key.
    3) Now confirm that our data has been slotted into the range-based partition we expect using the PARTITION clause of SELECT...
    - The two 'D's...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_D);
    TEXTDATA NUMBERDATA
    DDD111     510
    DEF456     500
    - The single 'N'...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_N);
    TEXTDATA NUMBERDATA
    N3000     515
    - The two 'Z's...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_Z);
    TEXTDATA NUMBERDATA
    Z111X     530
    ZZ1212     520
    4) And to wrap up confirm an empty partition
    SELECT * FROM IOTObj_Table PARTITION (Text_Part_W);

  • What is the best strategy to purge a set of database tables.

    Hi,
    I have 6 tables I would require to purge data from.
    1 parent table - All of the data that needs to be purged are from a partition created on this table
    5 child table - Using the parent record identifier, these records needs to be purged as well.
    The count of the parent table that i would be purging is around 6 * 10^6
    and the child tables contain atleast 12 * 10^6.
    Can some 1 let me know the most efficient way to get this done.
    If i am using delete statements - if there are any oracle hints that would speed up the process.
    Are there any alternatives to execute a delete script versus how a dba can help out getting the same done within the shortest period of time possible?

    Welcome to the forum.
    Are all tables partitioned?
    What database version are you working with?
    Dropping partitions sounds like a good option you have.
    But there are several other ways, like create table as select [records you want to keep].
    Even DBMS_REDEFINITION pops into my mind...
    These threads will give you more ideas: http://asktom.oracle.com/pls/asktom/asktom.search?p_string=%22mass+delete%22

  • Purging the data older than 1 year

    I have a requirement to purge data older than 1 year.
    Table has 5 billion rows and delete about 4 billion rows in batches.
    there is no primary key or indexes on table.
    There is column Datetime and i created nonclustered index on table and planning to purge data based on that column.
    Any help in preparing the script to purge data in batches older than 1 year.
    Thanks,
    Ron.

    As noted above, it is better to build a new table for what you want to keep using SELECT-INTO:
    http://www.sqlusa.com/bestpractices/select-into/
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Copy / Move / Migrate partition within VHD to another VHD(X)?

    I inherited a VM with a single VHD that contains three partitions 100 MB System, 250 GB C:, 750 GB D:. The C: drive has 40 GB maybe on it and is wasted space mostly. I wanted to move the 750 GB partition to its own VHD and then shrink the original VHD.
    Is there an easy way to move a partition from one VHD to another? I know I can move the entire VHD to another but can I do a portion based on partition?

    Hi Brian,
    How are things going ?
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Get cube partition details

    I want cube partition detail by executing sql query or mdx ? Can some one give this answer ?

    What we do is to have a control table and store details of dimensions and measure group partitions inside it. Then we use a SSIS package which will have a for each loop to iterate through table records and process the dimension/ measure groups. We use
    Analysis Services Processing task for processing the partitions/ dimensions. The command would be a XMLA script which would be generated dynamically based on Partition/diemsnion ID. If its start of new period we would also have a step to add a new partition
    to cube using AS DDL task and also add details to the table.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Reseeding cache for users with role based security

    I have role based security and trying to set up cache by purging all cache and later seeding cache by query. The query would be different for different users. What is the best way to purge all cache and reseed cache for administrator as well as all users. The EPT would purge cache based on updated tables. But how do I next go about reseeding cache for better performance to all the users. Thanks.

    I have created an ibot with the following:
    General - Normal Priority, Personalized (recipient's data visibility)
    Conditional Request - example_report
    Schedule - some schedule
    Recipients - Me(administrator) and User1
    Destinations - Oracle BI Server cache
    when the ibot runs 2 cache entries are created (for the 2 recipients).
    I have the report (example_report) on the dashboard (1 dashboard, 1 page, 1 report).
    After the ibot runs:
    When the administrator logs in first, there is a cache hit on the report. Followed by when the User1 logs in there is NO cache hit.
    On the other hand when the User1 logs in first, there is a cache hit on the report. Followed by when the administrator logs in there is no cache hit. The query log creates a Query issued to the database instead of cache hit on query.
    The User1 has a data level security.
    Please let me know where was I making an error in setting the ibot and how to get the cache seeding work for the different users with different role based security.
    Thanks for your inputs.

  • Set table level degree for partitioned table

    Hi all,
    Usually, we set degree 2 or 4 to big tables. In this case, CBO will choose parallel select for these tables if possible.
    Let assume one case that is table1 joins table2. non-partitioned Table1 has 20m rows and has degree 2. partitioned table2 has 50m rows and has no parallel degree.
    When I checked the execution plan, CBO uses parallel execution and uses PX BLOCK ITERATOR on table1 as expected. But I don't know whether table2 is selected in parallel, too.
    I mean I am not sure whether CBO launches slave processes against table2 or just select table2 as a whole.
    And with your tuning or architecture experiences, do you think whehther we should set degree for a partitioned table as the partitioned table can be parallelized based on partitions?
    best regards,
    Leon

    user12064076 wrote:
    And with your tuning or architecture experiences, do you think whether we should set degree for a partitioned table as the partitioned table can be parallelized based on partitions?What version of Oracle?
    A site I worked at recently preferred not to hard-code the degree but to let Oracle choose it at runtime; they felt it offered better allocation of system load than hard-coding the values. They were on 10g release 2.

Maybe you are looking for