Regarding table redefinition

HI ALL,
Is it possible to redefine table without primary key on table? because i m doing redefinition the table but it is not possible to create primary key on table and i m creating partition on that table
How it is possible without primary key to redefine it?
is it possible?
Thanks in advance

hello,
So you are trying to redefine a table which has a primary key into partitioned table without a primary key, is that correct or I misunderstood you? If yes, then it's possible.
Here is an test example, i am using a table with a primary key and redefining into partitioned table, see if it helps you anyway and answers your question or not.
CREATE TABLE my_object (
   owner VARCHAR2 (30 BYTE) NOT NULL,
   object_type VARCHAR2 (19 BYTE) NULL
LOGGING;
-- OR
CREATE TABLE my_object
AS
   SELECT DISTINCT owner, object_type
   FROM all_objects;
ALTER TABLE my_object_ ADD (
  CONSTRAINT my_object_pk
PRIMARY KEY
(owner, object_type));
-- INTERIM PARTITIONED TABLE with no primary key
CREATE TABLE MY_OBJECT_INTERIM
  OWNER        VARCHAR2(30 BYTE)                       NULL,
  OBJECT_TYPE  VARCHAR2(50 BYTE)                    NULL,
  OBJECT_NAME  VARCHAR2(100 BYTE)                  NULL,
  CREATE_DATE  DATE                             DEFAULT SYSDATE                   NULL
PARTITION BY RANGE (CREATE_DATE)
  PARTITION MY_TEST_PARTITION VALUES LESS THAN (MAXVALUE)
    LOGGING
    NOCOMPRESS
);Now when copying dependent objects your can choose 0 for no indexes and FALSE for constraints.
DECLARE
   num_errors   NUMBER;
BEGIN
   DBMS_REDEFINITION.can_redef_table ('SCHEMA_NAME',
                                      'MY_OBJECT',
                                      DBMS_REDEFINITION.cons_use_pk,
                                      NULL
   DBMS_REDEFINITION.start_redef_table ('SCHEMA_NAME',
                                        'MY_OBJECT',
                                        'MY_OBJECT_INTERIM',
                                        NULL,
                                        DBMS_REDEFINITION.cons_use_pk,
                                        NULL,
                                        NULL
   DBMS_REDEFINITION.copy_table_dependents ('SCHEMA_NAME',
                                            'MY_OBJECT',
                                            'MY_OBJECT_INTERIM',
                                            0, --> indexes
                                            TRUE,
                                            FALSE, --> constraints
                                            TRUE,
                                            FALSE,
                                            num_errors,
                                            FALSE
   DBMS_OUTPUT.put_line('ERRORS OCCURED WHEN COPYING DEPENEDENTS OBJECTS '
                        || num_errors);
   DBMS_REDEFINITION.finish_redef_table ('SCHEMA_NAME',
                                         'MY_OBJECT',
                                         'MY_OBJECT_INTERIM',
                                         NULL
END;Regards

Similar Messages

  • 10G online table redefinition

    We have a DWH large table T1 (one single partition) which needs to be loaded incrementally, but due to large number of updates and deletes, we create another table T2 (one single partition) where we load all the data as inserts and then use partition exchange to load T1 and retire T2 as we cant have any downtime. This entire process takes a long time. Is there a better way using Oracle 10G online table redefinition that we can use so that the entire process doesnt take too long?
    Thanks

    If you are getting a large number of updates and deletes then I believe you have more of an OLTP processing system rather than a Data Ware House.
    Have you thought about looking into redesigning the system to accomodate your large number of updates and deletes as well as your incremental loads?
    What about using partitioning as you eluded to briefly?
    Regards
    Tim

  • Error while finishing the Table Redefinition

    Hi All ,
    I am performing the Table Redefinition for one of my tables CSP_RESOURCE.
    While performing the last step where we execute the finish_redef_table , I am getting the below error :-
    SQL> exec dbms_redefinition.finish_redef_table('CSP','CSP_RESOURCE','CSP_RESOURCE_TEMP');
    BEGIN dbms_redefinition.finish_redef_table('CSP','CSP_RESOURCE','CSP_RESOURCE_TEMP'); END;
    ERROR at line 1:
    ORA-42012: error occurred while completing the redefinition
    ORA-00600: internal error code, arguments: [17182], [0x2AC81E4E19F0], [], [], [], [], [], [], [], []
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 82
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1524
    ORA-06512: at line 1
    The same piece of code was running in Oracle 10g successfully but its giving the above error in Oracle 11G Release .
    Could someone please let me know what could be the possible cause for that?

    Thanks a lot Damorgan.
    i checked my version and i got the below result which suggests that I already have 11.2.03
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Could you please let me know how to raise a SR for Oracle Support Team?

  • Shell script for online table redefinition

    Hi,
    Could someone help me out in building a script for online table redefinition in AIX 11g, moving the table into a new table space.
    Thanks

    You are embarking upon a voyage in which you will expend a substantial effort reinventing the wheel.
    Look at Oracle DBMS_REDEFINITION built-in package.
    http://www.morganslibrary.org/reference/pkgs/dbms_redefinition.html
    and never do something outside the database, in a proprietary language, that can be done far more efficiently inside the RDBMS in a platform independent language.
    In other words, inside the database, I could code your entire project with error handling, in far less than an 15 minutes including testing.
    With a simple DDL statement, issued at the command prompt in SQL*Plus ... I could do it in less than 15 seconds: Your choice.
    ALTER TABLE <table_name> MOVE TABLESPACE <new_tablespace_name>;

  • Regarding Table Maintainance

    Helo All. I have a query regarding table maintainance.
    I have created a transaction for a table, and allowed only SHOW and VIEWNAME in default values.
    Still it is allowing to update the table.
    Can you tell me why?
    Thanks in advance !!!

    Your transaction is just calling SM30, even though you specify these defaults all of functionality of SM30 is available.
    To limit access to the table to display only you would need to either apply the authorisation concept (set an authorisation group in the table maintenance settings and restrict user access) or write a simple list report that displays the table contents and link that to a transaction.
    Regards,
    Nick

  • Regarding table VBEPDG- Dangerous goods

    Hi Friends.
    I need help regarding table VBEPDG.
    Can anybody tell me how entries are made in table VBEPDG? Whether its configuration table or master data table?
    In my purchase order an item has been wrongly marked as dangerous material,
    and this is leading to table VBEPDG.
    Thanks in advance.

    Dear Saketpanse,
    the table VBEPDG contains the schedule line data for the dangerous goods. If the material is not dangerous then the entry should not be created. Probably the material initially was classified as a dengerous one and is currently changed to the non-dangerous. Am I correct ?
    In this case the entry in VBEPDG will remain because during creation of the order the material was dangerous. Quite generally, SAP does not recommend to change Customizing or Master Data in the Life-system. It can cause many inconsistencies. The correct way to do such a change would be to reject all sales documents which could be affected by such a change, then do the change and then create the sales documents again. It is for the future.
    Concerning the current inconsistency. The correct way would be: to indicate the material temporary as a dangerous one again, then delete the sales order item, and then to indicate the material as a non-dangerous one and create the item again. If you have already subsequent documents, then you can only reject the item. Then the VBEPDG entry will remain, but will not disturb you anymore. Alternatively, you can write a simple ABAP report, which deletes the VBEPDG entry.
    I hope, that this information will help you a little bit further.
    Kind regards,
    Akmal Vakhidov
    Development Support SD, SAP, Walldorf/Germany

  • Regarding table names in sd

    hi developer's
    its regarding table names in sd.
    for sd_co1 and sd_co4 connected with 2lis_01_s001
    and 2lis_01_s012 i think.
    from which tables these 2 ds getting the data.
    plz let me know.
    Thanks in advance.
    Regards,
    Vijay.

    Hi Vijaya kumar,
    I hereby sending you some of the important links which will be very usefull to you, please go thru:
    2LIS_01_S260/2LIS_11_VAITM:
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/36f338472b420de10000000a114084/content.htm
    2LIS_12_VASCL:
    http://help.sap.com/saphelp_nw04/helpdata/en/42/06f3381fff3358e10000000a11402f/content.htm
    2LIS_12_VCITM:
    http://help.sap.com/saphelp_nw04/helpdata/en/32/26f438151bc321e10000000a11402f/content.htm
    and 2LIS_01_S264
    http://help.sap.com/saphelp_nw04/helpdata/en/59/efe8375ae64014e10000009b38f8cf/content.htm
    NOTE: Quotations is not included in the LO Cockpit.
    and go through this link, this will gave some idea to you
    about the Sales Business content model.
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/63073c52619459e10000000a114084/frameset.htm
    you can use best practice documention for sales and distribution scenario.
    http://help.sap.com/bp_hightechv1600/HighTech_US/html/BI/H44_EN_DE.htm
    Regards
    Pcrao.

  • What is Table redefinition

    Hi,
    what is the concept of Table redefintion.

    Hi,
    Table redefinition allows you to modify tables online so that there is an increased availability of tables during the process of redefinition.
    With redefinition you can modify the storage parameters, change the tablespace, add support for parallel queries, add or drop a column etc.
    The dbms_redefinition is used for this purpose.
    hth

  • Regarding Table View In visual Composer

    Hi All,
    I am using Visual Compsoer 7.0. I have a table in my iview. When i go to the layout tab and right click the table. I cant see the options like "CUSTOMIZE TOOLBAR", where i can insert a row in my table. How can i have this option in VC 7.0?
    Regards,
    Divya.

    Hi Divya,
    Refer this pdf. It ll be useful to u
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c617533c-0a01-0010-b88e-a6e8e2e419c9">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c617533c-0a01-0010-b88e-a6e8e2e419c9</a>
    Regards,
    Hemalatha

  • Problem Regarding TABLE updation for Scheduling Agreement

    Dear Experts,
    We have noticed that whenever we are releasing any Delivery Schedule for a line item against a Scheduling Agreement the table field ABART(Scheduling Agreement Release Type) in table EKET is not getting updated,but the same field or column in TABLE EKEH or EKEK is getting updated.
    Please advice what is the problem and how to resolve the same.
    Regards,
    Soumick

    Hi,
    The scheduling agreement schedule line is not firmed physically:The fixing indicator (EKET-FIXKZ) is empty for this schedule line.
    This can be checked in Transaction ME39 or with Transaction SE16 for table EKET for the corresponding schedule line.
    In the MRP group of the corresponding material, it is set that only transferred scheduling agreement schedule lines should be regarded as firmed (Transaction OPPR, firming scheduling agreement, Firm transmSLines [Field XFAT1]).
    In this case, only such scheduling agreement schedule lines are firmed which were transferred by message transmission through purchasing to the vendor. (see also the F1 help for the field).
    However, the system displays all scheduling agreement schedule lines as fixed in Transaction MD04 within the release period and assigns them with a star ('*'), that is, this applies also scheduling agreement schedule lines with a transmitted quantity of 0.
    In contrast to the above, these schedule lines are not displayed as fixed in Transaction MD05 or in the planning with 'Display result'.
    Note 354164 explains this system behavior.
    For the planning, the transmitted quantity is considered as fixed if this is correspondingly set in the MRP group of the material.
    If the transmitted quantity was updated correctly, it should be contained in field AMENG of table EKET.
    By using Transaction SE16 for this table and the corresponding schedule line (scheduling agreement number EBELN, item EBELP, schedule line ETENR), you should be able to find out....
    transmitted quantity was written to the database and a fixing can be carried out correspondingly in amount of the transmitted quantity or whether no update of the transmitted quantity occurred (see below Notes 82169, 117093, 134356).
    Solution
    First, the system behaves as intended.
    It should be checked whether the function, which is controlled by this indicator, is actually wanted this way (to firm only scheduling agreement schedule lines which actually have been transferred).
    In addition, problems can occur in purchasing when the printed quantity is updated (AMENG).This symptom can especially occur after you have upgraded from a release < Release 4.0A to a release > Release 4.0B.
    In this regard, see the related Notes 82169, 117093 and 134356.
    Regards,
    Udaya.

  • Regarding TABLE node -- Footer Area in smartform

    Hi Friends,
    This is regarding smartform.
    I have created TABLE node in MAIN window. As long as data exists in internal table my smartform is working fine. I mean it is displaying all the items and followed by TABLE FOOTER text.
    Assume if no data exists in the internal table. In that case the TABLE FOOTER text is moving up. But I need at least 10 line space in that table MAIN Area. I mean even thogh the data is not there in the internal table.. It should display some space and then TABLE FOOTER text should be displayed.
    Can any body tell me is there any way the TABLE FOOTER can fix irrespective of the data?
    This is very urgent. Thanks in advance.
    Regards
    Raghu

    For that, you can create one additional window such that it overlaps with the main window.
    The size of this window should be exactly equal to the size of the main window, excluding footer. That means footer should come just after this window.
    If there are no data to be displayed in the main window, then this empty window will be displayed.
    In effect, some blank lines will be shown.
    Just try this and check whether it suffice your requirement...
    Jissa.

  • 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

  • Two suggestions regarding table columns in the Oracle database

    Oracle,
    I have two suggestions to make.
    First, it would be of great value to be able to add a new column at an arbitrary position in a table and not simply add it to the end of the column list. Quite frequently we have to drop and recreate tables in order to accomplish this.
    Second, we often add 4 columns to the end of every table's column list (and accompanying triggers in order to keep them updated) which would seem suitable as Oracle pseudo-columns (in the same fashion as ROWID, etc.) These 4 columns would be:
    - Row created date
    - Row created by Oracle user
    - Row updated date
    - Row updated by Oracle user
    Regards,
    Dan D'Andrea
    [email protected]

    Dan,
    I don't work for Oracle, but, just some thoughts/reactions to your ideas.
    I don't think inserting a column in any arbitrary position is feasible, because it doesn't scale. It would require a reorganization of every block in the table. One reasonable workaround is to add the columns at the end of the table, then create a view on top of the table that has the columns in the desired order.
    As to the second suggestion, yes, we do something similar, add the same 4 columns to every table. I think the reason that Oracle doesn't support these types of pseudocolummns, is the overhead this would incur. Not only in terms of the extra resources, to maintain the data, but also storage overhead.
    So, just my unofficial opinion, but, I don't see how either of those suggestions would make it.
    Also, FYI, if you want to officially enter an enhancement request, see Doc ID 214168.1 on MetaLink.
    Hope that helps,
    -Mark

  • Regarding table information

    hi experts,
    there is one table KNVP for customer master partner function..
    i wud like to know is there any similar table for vendor master partner function..if yes then plz tell me the name of that table..
    regards,
    raman.

    Hi,
    There is partner - vendor relationship table SPKR1.
    Reward if Helpful.

  • Regarding Table data display

    Hi experts,
    I have one ztable having some fields, the end user will not have authorize for (SE11 and SE16) . I want to make program for display that table data. And also want put filter options( Select-options) for all fields, User wants select some fields based on that fields want display all data from that table.  How can i do this?
    Please help me? Any coding?
    Thanks and Regards,
    Linganathan.K
    Moderator message : Not enough re-search  before posting, discussion locked.
    Message was edited by: Vinod Kumar

    Dear Linganathan,
    It is purely based on your requirement.
    1. If the users are strictly restricted for SE11 and SE16 then  table generator would be a probable option
    2. However, when you restrict SE11 and Se16 I do not think so you will give SM30 also...
    3. Are you allow user to maintain/edit the table?
    3. Do you want to provide selection parameter...
    Based on this, probably you should go for a small report program that displays data in the ALV format accepting the input parameters as selection range.
    Regards,
    Venkat

Maybe you are looking for

  • Can I open a new tab but stay on my current tab instead of automatically jumping to the new one?

    In the older version of Firefox, when I opened a new tab, it would not jump to it but rather remain on my current tab. I've tried safe mode and it wasn't any of my add-ons that are the problem and I haven't selected the option of automatically switch

  • Run through t-code

    hi experts, i got requirement, after we create report we assign that to t-code,  when we execute that t-code o/p will come. when we execute report in se38 means it will get a error message that run through particulat t-code. pls any one suggest ....

  • AAE CS5.5 LAUNCH ISSUE

    I needed to reinstall AAE CS5.5 after my PC crashed and installed new hardware. It installs 100% and launches correctly but after restarting or swtiching off and then starting again AAE will not launch. Right clicking on the shortcut does not help be

  • Editing HD in FCE

    I want to edit video filmed in HD in Final Cut Express (FCE), which it is capable. I am looking at the Cannon HV20 video camera. 1. Do I need a video capture card/board etc. or will the cable with the camera import the file directly to my MacPro. 2.

  • Commen je peu reactiver mon iphone3g apres mise a jour d IOS il est bloque il dit ..activation impossibile ! aider moi svp ! :(

    commen je peu reactiver mon iphone3g apres mise a jour d IOS il est bloque il dit ..activation impossibile ! aider moi svp !