Dbms_redefinition.start_redef_table -- error

While Redefining below , I got the error . Could you please help what I am missing
exec dbms_redefinition.start_redef_table('uname','orig table','interim table',NULL,2);
ORA-12008: error in materialized view refresh path
ORA-01114: IO error writing block to file (block # )
ORA-01114: IO error writing block to file 6 (block # 1693811)
ORA-29701: unable to connect to Cluster Synchronization Service
ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
ORA-06512: at line 1
select * from v$version
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
Thanks ,
Mahesh

Mahesh wrote:
While Redefining below , I got the error . Could you please help what I am missing
exec dbms_redefinition.start_redef_table('uname','orig table','interim table',NULL,2);
ORA-12008: error in materialized view refresh path
ORA-01114: IO error writing block to file (block # )
ORA-01114: IO error writing block to file 6 (block # 1693811)
ORA-29701: unable to connect to Cluster Synchronization ServiceOS fatal flaw
what clues exist within system "messages" file.
post results of OS command below
df -k

Similar Messages

  • Using DBMS_REDEFINITION.START_REDEF_TABLE I get SP2-0027: Input is too long

    Hello, I am using the DBMS_REDEFINITION.START_REDEF_TABLE to migrate a large table to unicore data types. When I attempt this the list of columns is too long and it generates:
    SP2-0027: Input is too long (> 2499 characters) - line ignored
    Below is the procedure call. Is there a way to over come this?
    EXECUTE DBMS_REDEFINITION.START_REDEF_TABLE( -
    'FOCUS',
    'PREFERRED_CUSTOMER',
    'INT_PREFERRED_CUSTOMER', -
    'PREFERRED_CUST_KEY PREFERRED_CUST_KEY,SIGNUP_STORE_KEY SIGNUP_STORE_KEY,SIGNUP_ASSOC_EMPKEY SIGNUP_ASSOC_EMPKEY,PREFERRED_CUST_NUM PREFERRED_CUST_NUM, -
    ALT_PREFERRED_CUST_NUM ALT_PREFERRED_CUST_NUM,TAX_EXEMPT_NUMBER TAX_EXEMPT_NUMBER,EMPLOYEE_KEY EMPLOYEE_KEY,SIGNUP_DATE SIGNUP_DATE,ALLOW_CONTACT_IND ALLOW_CONTACT_IND, -
    ALLOW_DISTRIB_IND ALLOW_DISTRIB_IND, ALLOW_EMAIL_IND ALLOW_EMAIL_IND, ALLOW_EMAIL_IND_EFF_DATE ALLOW_EMAIL_IND_EFF_DATE, ALLOW_MAIL_IND ALLOW_MAIL_IND, -
    ALLOW_MAIL_IND_EFF_DATE ALLOW_MAIL_IND_EFF_DATE, ALLOW_TELEMARKET_IND ALLOW_TELEMARKET_IND, ALLOW_DIRECT_MAIL_IND ALLOW_DIRECT_MAIL_IND, ALLOW_STMT_INSERT_IND ALLOW_STMT_INSERT_IND, -
    CUST_SOURCE_CD CUST_SOURCE_CD, NAME_ADDR_SOURCE_CD NAME_ADDR_SOURCE_CD, NAME_ADDR_EFF_DATE NAME_ADDR_EFF_DATE, TO_NCHAR(LAST_NAME) LAST_NAME, TO_NCHAR(FIRST_NAME) FIRST_NAME, -
    TO_NCHAR(MIDDLE_INIT) MIDDLE_INIT, TO_NCHAR(NAME_PREFIX) NAME_PREFIX, TO_NCHAR(NAME_SUFFIX) NAME_SUFFIX, TO_NCHAR(ADDRESS1) ADDRESS1, TO_NCHAR(ADDRESS2) ADDRESS2, -
    TO_NCHAR(ADDRESS3) ADDRESS3, TO_NCHAR(CITY) CITY, TO_NCHAR(STATE) STATE, COUNTRY COUNTRY, ZIP ZIP, ZIP ZIP, ZIP5 ZIP5, HOME_PHONE HOME_PHONE, AREA_CODE AREA_CODE, -
    AREA_CODE_EXCHNG AREA_CODE_EXCHNG, WORK_PHONE WORK_PHONE, DATE_OF_BIRTH DATE_OF_BIRTH, GENDER_CD GENDER_CD,  INSTORE_CONTACT_EMPKEY INSTORE_CONTACT_EMPKEY, -
    LAST_TRANSACTION_TIME LAST_TRANSACTION_TIME, LAST_TRANS_AMT LAST_TRANS_AMT, LAST_RETAIL_TRANS_TIME LAST_RETAIL_TRANS_TIME, LAST_CATALOG_TRANS_TIME LAST_CATALOG_TRANS_TIME, -
    LAST_INTERNET_TRANS_TIME LAST_INTERNET_TRANS_TIME, LIFETIME_AMT LIFETIME_AMT, LIFETIME_RETAIL_AMT LIFETIME_RETAIL_AMT, LIFETIME_CATALOG_AMT LIFETIME_CATALOG_AMT, -
    LIFETIME_INTERNET_AMT LIFETIME_INTERNET_AMT, LIFETIME_UNIT_CNT LIFETIME_UNIT_CNT, LIFETIME_RETAIL_UNIT_CNT LIFETIME_RETAIL_UNIT_CNT, LIFETIME_CATALOG_UNIT_CNT LIFETIME_CATALOG_UNIT_CNT, -
    LIFETIME_INTERNET_UNIT_CNT LIFETIME_INTERNET_UNIT_CNT, LIFETIME_RETURN_AMT LIFETIME_RETURN_AMT, LIFETIME_RETAIL_RETURN_AMT LIFETIME_RETAIL_RETURN_AMT, -
    LIFETIME_CATALOG_RETURN_AMT LIFETIME_CATALOG_RETURN_AMT, LIFETIME_INTERNET_RETURN_AMT LIFETIME_INTERNET_RETURN_AMT, LIFETIME_RETURN_UNIT_CNT LIFETIME_RETURN_UNIT_CNT, -
    LIFETIME_RETAIL_RTRN_UNIT_CNT LIFETIME_RETAIL_RTRN_UNIT_CNT, LIFETIME_CATALOG_RTRN_UNIT_CNT LIFETIME_CATALOG_RTRN_UNIT_CNT, LIFETIME_INTERNT_RTRN_UNIT_CNT LIFETIME_INTERNT_RTRN_UNIT_CNT, -
    LIFETIME_VISIT_CNT LIFETIME_VISIT_CNT, LIFETIME_RETAIL_VISIT_CNT LIFETIME_RETAIL_VISIT_CNT, LIFETIME_CATALOG_VISIT_CNT LIFETIME_CATALOG_VISIT_CNT, -
    LIFETIME_INTERNET_VISIT_CNT LIFETIME_INTERNET_VISIT_CNT, LIFETIME_RTRN_VISIT_CNT LIFETIME_RTRN_VISIT_CNT, LIFETIME_RETAIL_RTRN_VISIT_CNT LIFETIME_RETAIL_RTRN_VISIT_CNT, -
    LIFETIME_CATALG_RTRN_VISIT_CNT LIFETIME_CATALG_RTRN_VISIT_CNT, LIFETIME_INTRNT_RTRN_VISIT_CNT LIFETIME_INTRNT_RTRN_VISIT_CNT, LAST_CONTACT_DATE LAST_CONTACT_DATE, -
    LAST_CONTACT_TYPE LAST_CONTACT_TYPE, LAST_CATALOG_SENT_DATE LAST_CATALOG_SENT_DATE, LIFETIME_CATALOG_SENT_CNT LIFETIME_CATALOG_SENT_CNT, PRIVATE_CC_ACCT_NUM PRIVATE_CC_ACCT_NUM, -
    PRIVATE_CC_FIRST_USE_DATE PRIVATE_CC_FIRST_USE_DATE, PRIVATE_CC_ACCT_BALANCE PRIVATE_CC_ACCT_BALANCE, PRIVATE_CC_LIMIT_AMT PRIVATE_CC_LIMIT_AMT, PRIVATE_CC_LIMIT_SET_DATE PRIVATE_CC_LIMIT_SET_DATE, -
    PRIVATE_CC_LIMIT_EXPIRES_DATE PRIVATE_CC_LIMIT_EXPIRES_DATE, PRIVATE_CC_NUM_CARDS_ISSUED PRIVATE_CC_NUM_CARDS_ISSUED, PRIVATE_CC_JC_FIRST_NAME PRIVATE_CC_JC_FIRST_NAME, -
    PRIVATE_CC_JC_MIDDLE_INIT PRIVATE_CC_JC_MIDDLE_INIT, PRIVATE_CC_JC_LAST_NAME PRIVATE_CC_JC_LAST_NAME, PRIVATE_CC_APP_STORE_KEY PRIVATE_CC_APP_STORE_KEY, -
    ALT_ACCT_NUMBER ALT_ACCT_NUMBER, SOCIAL_SEC SOCIAL_SEC, COMPANY_NAME COMPANY_NAME, BUSINESS_TITLE BUSINESS_TITLE, HOW_DID_YOU_HEAR_CD HOW_DID_YOU_HEAR_CD, -
    HOW_DID_YOU_HEAR_EFF_DATE HOW_DID_YOU_HEAR_EFF_DATE, PREFERRED_PROMO_METHOD_CD PREFERRED_PROMO_METHOD_CD, PREF_CUST_STATUS1_CD PREF_CUST_STATUS1_CD, PREF_CUST_STATUS1_EFF_DATE PREF_CUST_STATUS1_EFF_DATE, -
    PREF_CUST_STATUS2_CD PREF_CUST_STATUS2_CD, PREF_CUST_STATUS2_EFF_DATE PREF_CUST_STATUS2_EFF_DATE, PREF_CUST_STATUS3_CD PREF_CUST_STATUS3_CD, PREF_CUST_STATUS3_EFF_DATE PREF_CUST_STATUS3_EFF_DATE, -
    EMAIL_ADDR EMAIL_ADDR, COUNTRY_CD COUNTRY_CD');--
    Thank you,
    David

    I am not familiar with this. How would you recommend doing this?
    David

  • Error using dbms_redefinition package

    Hi,
    I am trying to use dbms_redefinition package to add a column to a table using primary key method
    SQL> conn / as sysdba
    Connected.
    SQL> grant execute on sys.dbms_redefinition to hr;
    Grant succeeded.
    SQL> grant dba to hr;
    Grant succeeded.
    SQL> conn hr/<password>
    Connected.
    SQL> create table tab1(roll_no number constraint roll_pk primary key,last_name varchar2(30));
    Table created.
    SQL> insert into tab1 values (1,'Hall');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> insert into tab1 values (2,'Mall');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> insert into tab1 values (3,'Roll');
    1 row created.
    SQL> commit;
    Commit complete.
    Adding required column
    SQL>
    SQL> alter table tab1 add(first_name varchar2(30));
    Table altered.
    Checking if table can be redefined
    SQL> exec dbms_redefinition.can_redef_table('HR','TAB1',DBMS_REDEFINITION.CONS_USE_PK);
    PL/SQL procedure successfully completed.
    Creating interim table
    SQL> create table tab2 as select roll_no,first_name,last_name from tab1 where 1=2;
    Table created.
    Adding primary key to interim table
    SQL> alter table tab2 add constraint roll_pk_1 primary key (roll_no);
    Table altered.
    Starting redefinition :
    SQL> exec dbms_redefinition.start_redef_table('HR','TAB1','TAB2','ROLL_NO,FIRST_NAME,LAST_NAME');
    BEGIN dbms_redefinition.start_redef_table('HR','TAB1','TAB2','ROLL_NO,FIRST_NAME,LAST_NAME'); END;
    ERROR at line 1:
    ORA-00439: feature not enabled: Advanced replication
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
    ORA-06512: at line 1
    SQL>
    Could you please help.
    Thanks,
    Haider

    You can, yes. That's why CAN_REDEF_TABLE and START_REDEF_TABLE both have an OPTIONS_FLAG argument that lets you specify whether you want to use the primary key or the ROWID to redefine the table.
    SQL> drop table foo;
    Table dropped.
    SQL> create table foo( col1 number, col2 number );
    Table created.I can't redefine the table using the primary key since there is no primary key
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2    sys.DBMS_REDEFINITION.CAN_REDEF_TABLE ( 'SCOTT', 'FOO' );
      3* end;
    SQL> /
    begin
    ERROR at line 1:
    ORA-12089: cannot online redefine table "SCOTT"."FOO" with no primary key
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 139
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1782
    ORA-06512: at line 2But I can use the ROWID
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2    sys.DBMS_REDEFINITION.CAN_REDEF_TABLE ( 'SCOTT', 'FOO', dbms_redefinition.cons_use_rowid );
      3* end;
    SQL> /
    PL/SQL procedure successfully completed. Justin

  • Error with dbms_redefinition package?

    Hi everybody!
    I have a table ‘object_log’(it is partioned) .
    I used dbms_redefinition to change its partion , and evrythink was ok.
    When I tried to redefine this table for the second time it failed!
    I run this script
    BEGIN
    DBMS_REDEFINITION.start_redef_table(
    uname => 'TL_ETL',
    orig_table => 'OBJECT_LOG',
    int_table => 'OBJECT_LOG2');
    END;
    This is the error:
    Ora-12008 error in materialized view refresh path

    Sorry, I didn'see the other errors
    evrything is clear now :)
    ORA-12008: error in materialized view refresh path
    ORA-14400: inserted partition key does not map to any partition
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 50
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1343
    ORA-06512: at line 2

  • DBMS_REDEFINITION issue. ORA-12089 and ORA-42016

    Hi all,
    I need a little help understanding and using DBMS_REDEFINITION.
    I have a table that I need to transform in a partitioned table, keeping all the indexes, constraints, primary and foreign keys unaltered. I found the DBMS_REDEFINITION and figured it is the best choice since I have to transform a table with more than 1 million records and a BLOB field. BTW I am working in a Windows 2003 R2 SP2 64bit environment on an Oracle 10.2.0.4 DB.
    To test the procedure I used a smaller table, with fewer rows. This is what I did:
    CREATE TABLE LONGO.ARRI_RICORSO as SELECT * from PRODUCTION.ARRI_RICORSO;
    CREATE TABLE "LONGO"."ARRI_RICORSO2" ( "ARRI_ID" NUMBER(12) NOT NULL , "ARVB_ID" NUMBER(12) NOT NULL , "ARIN_ID" NUMBER(12),
    "ARAV_ID" NUMBER(12), "ANAU_COD" VARCHAR2(4), "ANCO_ID" NUMBER(5), "ANNA_COD" CHAR(3), "ARRI_DATA" DATE,
    "ARRI_PROT" VARCHAR2(20), "ARRI_D_TRASM" DATE, "ARRI_F_ESITO" CHAR(1), "ARRI_D_ESITO" DATE, "ARRI_PROT_ESITO" VARCHAR2(20),
    "ERDO_ID_RICOR" NUMBER(12), "ERDO_ID_ESITO" NUMBER(12),
    "ERDO_ID_PROVV" NUMBER(12)) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 0K BUFFER_POOL DEFAULT)
    LOGGING PARTITION BY RANGE ("ARRI_DATA") (PARTITION "ARRI_RICORSO2_P1" VALUES LESS THAN (TO_DATE(' 2009-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS',
    'NLS_CALENDAR=GREGORIAN'))
    TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)
    LOGGING NOCOMPRESS , PARTITION "ARRI_RICORSO2_P2" VALUES LESS THAN (TO_DATE(' 2009-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS',
    'NLS_CALENDAR=GREGORIAN')) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE
    ( INITIAL 64K MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT) LOGGING NOCOMPRESS ,
    PARTITION "ARRI_RICORSO2_P3" VALUES LESS THAN (TO_DATE(' 2009-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)
    LOGGING NOCOMPRESS , PARTITION "ARRI_RICORSO2_P4" VALUES LESS THAN ...... ETC up to 60 partitions, one per MONTHSo I have the first table full and with constraints (a couple of NOT NULL values) and a second, completely empty, partitioned table.
    I started off with:
    exec dbms_redefinition.can_redef_table('LONGO', 'ARRI_RICORSO');that gave me the error
    ERROR at line 1:
    ORA-12089: cannot online redefine table "LONGO"."ARRI_RICORSO" with no primary
    key
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 137
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1479
    ORA-06512: at line 1So I modified the script with:
    exec dbms_redefinition.can_redef_table('LONGO', 'ARRI_RICORSO',dbms_redefinition.cons_use_rowid);
    PL/SQL procedure successfully completed.OK! After this I launched:
    SQL> exec dbms_redefinition.start_redef_table('LONGO', 'ARRI_RICORSO', 'ARRI_RICORSO2');
    BEGIN dbms_redefinition.start_redef_table('LONGO', 'ARRI_RICORSO', 'ARRI_RICORSO2'); END;
    ERROR at line 1:
    ORA-12089: cannot online redefine table "LONGO"."ARRI_RICORSO" with no primary
    key
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 50
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1343
    ORA-06512: at line 1Same problem I thought!
    SQL> exec dbms_redefinition.start_redef_table('LONGO', 'ARRI_RICORSO', 'ARRI_RICORSO2', dbms_redefinition.cons_use_rowid);
    BEGIN dbms_redefinition.start_redef_table('LONGO', 'ARRI_RICORSO', 'ARRI_RICORSO2', dbms_redefinition.cons_use_rowid); END;
    ERROR at line 1:
    ORA-12089: cannot online redefine table "LONGO"."ARRI_RICORSO" with no primary
    key
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 50
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1343
    ORA-06512: at line 1...ok... Now I am stuck! What have I done wrong? I also read various documents that explained how to use correctly the procedure, but I can't understand why I am getting this error!
    This is how the table is structured:
    SQL> desc arri_ricorso
    Name                                      Null?    Type
    ARRI_ID                                   NOT NULL NUMBER(12)
    ARVB_ID                                   NOT NULL NUMBER(12)
    ARIN_ID                                            NUMBER(12)
    ARAV_ID                                            NUMBER(12)
    ANAU_COD                                           VARCHAR2(4)
    ANCO_ID                                            NUMBER(5)
    ANNA_COD                                           CHAR(3)
    ARRI_DATA                                          DATE
    ARRI_PROT                                          VARCHAR2(20)
    ARRI_D_TRASM                                       DATE
    ARRI_F_ESITO                                       CHAR(1)
    ARRI_D_ESITO                                       DATE
    ARRI_PROT_ESITO                                    VARCHAR2(20)
    ERDO_ID_RICOR                                      NUMBER(12)
    ERDO_ID_ESITO                                      NUMBER(12)
    ERDO_ID_PROVV                                      NUMBER(12)ARRI_RICORSO2 is exactly the same, but with no data in it and with partitions....
    Please help! :)
    Thanks in advance!
    P.s. I also added a primary key to both the tables. That is when I got the ORA-42016 error while attempting the exec dbms_redefinition.start_redef_table process ant not the ORA-12089 anymore...
    Edited by: Phelit on 17-mag-2013 6.07

    >
    exec dbms_redefinition.start_redef_table('LONGO', 'ARRI_RICORSO', 'ARRI_RICORSO2', dbms_redefinition.cons_use_rowid);
    >
    Right idea, wrong implementation. You are passing the 'CONS_USE_ROWID' as the THIRD parameter instead of the FOURTH (col_mapping) parameter.
    See the DBMS_REDEFINITION doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_redefi.htm#i998726
    The 'OPTIONS_FLAG' is the THIRD parameter for the 'CAN_REDEF_TABLE' procedure
    >
    CAN_REDEF_TABLE Procedure
    This procedure determines if a given table can be redefined online. This is the first step of the online redefinition process. If the table is not a candidate for online redefinition, an error message is raised.
    Syntax
    DBMS_REDEFINITION.CAN_REDEF_TABLE (
    uname IN VARCHAR2,
    tname IN VARCHAR2,
    options_flag IN PLS_INTEGER := 1,
    part_name IN VARCHAR2 := NULL);
    >
    But the 'OPTIONS_FLAG' is the FOURTH parameter for the 'START_REDEF_TABLE' procedure
    >
    START_REDEF_TABLE Procedure
    Prior to calling this procedure, you must manually create an empty interim table (in the same schema as the table to be redefined) with the desired attributes of the post-redefinition table, and then call this procedure to initiate the redefinition.
    Syntax
    DBMS_REDEFINITION.START_REDEF_TABLE (
    uname IN VARCHAR2,
    orig_table IN VARCHAR2,
    int_table IN VARCHAR2,
    col_mapping IN VARCHAR2 := NULL,
    options_flag IN BINARY_INTEGER := 1,
    orderby_cols IN VARCHAR2 := NULL,
    part_name IN VARCHAR2 := NULL);
    >
    This works for me:
    exec dbms_redefinition.start_redef_table('SCOTT', 'ARRI_RICORSO', 'ARRI_RICORSO2', options_flag => dbms_redefinition.cons_use_rowid);

  • DBMS_REDEFINITION dependent objects issue , please help.....

    Hello Guru's,
    Today I have tried with DBMS_REDEFINITION package, I'm successfully partitioning the existing table, but there are some dependent objects are missing after completing the redefinition package.
    Im Using 11g R2.
    Please assist me , in which stage it went wrong, Actually my table is have around 12 dependent procedures, functions, Synonyms how ever, after completing the redefinition when i query the all_dependancies I m getting only 9 objects with correct status.
    Please suggest me that what happened to remaining 3 dependent objects.  Its a bit urgent.
    Steps I followed:
    1.Created a bkp table of same as existing table A.
    2.EXEC Dbms_Redefinition.Can_Redef_Table(USER, 'A');  ---No errors got.
    3.DBMS_REDEFINITION.start_redef_table(uname      => USER, orig_table => 'A',int_table  => 'A_BKP'); ----No errors
    4. dbms_redefinition.sync_interim_table(
        uname      => USER,       
        orig_table => 'A',
        int_table  => 'A_BKP');  ----No errors got.
    5.Manually Added constraints on A_BKP what ever constraints on A .--- No errors
    6. Manually Added Indexes on A_BKP what ever indexs are there on A columns  ----No errors
    7.EXEC DBMS_STATS.gather_table_stats(USER, 'A_BKP', cascade => TRUE);  ---No errors
    8.dbms_redefinition.finish_redef_table(
        uname      => USER,       
        orig_table => 'A',
        int_table  => 'A_BKP');  ----No errors
    9. Manually Droped A_BKP table
    10. Manually Renamed all constraints and Indexex to the original names  -----No errors
    11. Queried Select count(*) from A;
    Then I queried in all_dependencies, now there is mis match between before partitioned table dependencies and after ,
    Please tell me whats wrong with this steps , its a bit urgent, any fruther steps to be taken ?

    No I have checked that missing objects there are present in the DB and when i query in All_dependancies with that referenced name, it will giving less rows than original

  • Please answer these questions.....Urgent

    Q You are using Data Guard to ensure high availability. The directory structures on the primary and the standby hosts are different.
    Referring to the scenario above, what initialization parameter do you set up during configuration of the standby database?
    db_convert_dir_name
    db_convert_file_name
    db_dir_name_convert
    db_directory_convert
    db_file_name_convert
    Oracle 9i Administration, Question 1 of 12
    Q What facility does Oracle provide to detect chained and migrated rows after the proper tables have been created?
    The RDBMS cannot detect this. It must use regular export and import with compress=y to remove chained and migrated rows as part of the regular database.
    The UTLCHAIN utility
    The DBMS_REPAIR package
    The ANALYZE command with the LIST CHAINED ROWS option
    The DBMS_MIG_CHAIN built-in package
    Q While doing an export, the following is encountered:
    ORA-1628 ... max # extents ... reached for rollback segment ..
    Referring to the scenario above, what do you do differently so that the export is resumed even after getting the space allocation error?
    Use the RESUMABLE=Y option for the export.
    Run the export with the AUTO_ROLLBACK_EXTEND=Y option.
    Increase the rollback segment extents before running the export.
    Use THE RESUME=Y option for the export.
    Monitor the rollback segment usage while the export is running and increase it if it appears to be running out of space.
    Q
    The DBCA (Database Configuration Assistant) prompts the installer to enter the password for which default users?
    SYS and SYSTEM
    OSDBA and INTERNAL
    SYSOPER and INTERNAL
    SYS and INTERNAL
    SYSTEM and SYSDBA
    Q You are designing the physical database for an application that stores dates and times. This will be accessed by users from all over the world in different time zones. Each user needs to see the time in his or her time zone.
    Referring to the scenario above, what Oracle data type do you use to facilitate this requirement?
    DATE
    TIMESTAMP WITH TIME ZONE
    TIMESTAMP
    DATETIME
    TIMESTAMP WITH LOCAL TIME ZONE
    Q Which one of the following conditions prevents you from redefining a table online?
    The table has a composite primary key.
    The table is partitioned by range.
    The table's organization is index-organized.
    The table has materialized views defined on it.
    The table contains columns of data type LOB.
    Q An Oracle database administrator is upgrading from Oracle 8.1.7 to Oracle 9i.
    Referring to the scenario above, which one of the following scripts does the Oracle database administrator run after verifying all steps in the upgrade checklist?
    u8.1.7.sql
    u81700.sql
    u0900020.sql
    u0801070.sql
    u0817000.sql
    Q What command do you use to drop a temporary tablespace and the associated OS files?
    ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP;
    ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP;
    ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP INCLUDING DATAFILES;
    ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP CASCADE;
    ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP INCLUDING CONTEN
    Q You wish to use a graphical interface to manage database locks and to identify blocking locks.
    Referring to the scenario above, what DBA product does Oracle offer that provides this functionality?
    Oracle Expert, a tool in the Oracle Enterprise Manager product
    Lock Manager, a tool in the base Oracle Enterprise Manager (OEM) product, as well as the console
    Lock Manager, a tool in Oracle Enterprise Manager's Tuning Pack
    The console of Oracle Enterprise Manager
    Viewing the Lock Manager charts of the Oracle Performance Manager, a tool in the Diagnostics Pack add on
    Q CREATE DATABASE abc
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXDATAFILES 20
    MAXLOGHISTORY 100
    Referring to the code segment above, how do you change the MAX parameters shown?
    They can be changed using an ALTER SYSTEM command, but the database must be in the NOMOUNT state.
    The MAX parameters cannot be changed without exporting the entire database, re-creating it, and importing.
    They can be changed using an ALTER SYSTEM command while the database is open.
    They can be changed in the init.ora file, but the database must be restarted for the values to take effect.
    They cannot be changed unless you re-create your control file
    Q You need to change the archivelog mode of an Oracle database.
    Referring to the scenario above, what steps do you take before actually changing the archivelog mode?
    Execute the archive log list command
    Start up the instance and mount the database but do not open it.
    Start up the instance and mount and open the database in restricted mode.
    Kill all user sessions to ensure that there is no database activity that might trigger redolog activity.
    Take all tablespaces offline
    Q You are experiencing performance problems due to network traffic. One way to tune this is by setting the SDU size.
    Referring to the scenario above, why do you change the SDU size?
    A high-speed network is available where the data transmission effect is negligible.
    The application can be tuned to account for the delays.
    The requests to the database return small amounts of data as in an OLTP system.
    The data coming back from the server are fragmented into several packets.
    A large number of users are logged on concurrently to the system.
    Q When interpreting statistics from the v$sysstat, what factor do you need to keep in mind that can skew your statistics?
    Choice 1 The statistics are static and must be updated by running the analyze command to include the most recent activity.
    Choice 2 The statistics are only valid as a point in time snapshot of activity.
    Choice 3 The statistics gathered by v$sysstat include database startup activities and database activity that initially populates the database buffer cache and shared pool.
    Choice 4 The statistics do not include administrative users.
    Choice 5 The statistics gathered are based on individual sessions, so you must interpret them based on the activity and application in which the user was involved at the time you pull the statistics.
    Q When interpreting statistics from the v$sysstat, what factor do you need to keep in mind that can skew your statistics?
    Choice 1 The statistics are static and must be updated by running the analyze command to include the most recent activity.
    Choice 2 The statistics are only valid as a point in time snapshot of activity.
    Choice 3 The statistics gathered by v$sysstat include database startup activities and database activity that initially populates the database buffer cache and shared pool.
    Choice 4 The statistics do not include administrative users.
    Choice 5 The statistics gathered are based on individual sessions, so you must interpret them based on the activity and application in which the user was involved at the time you pull the statistics.
    Q You want to shut down the database, but you do not want client connections to lose any non-committed work. You also do not want to wait for every open session to disconnect.
    Referring to the scenario above, what method do you use to shut down the database?
    Choice 1 Shutdown abort
    Choice 2 Shutdown immediate
    Choice 3 Shutdown transactional
    Choice 4 Shutdown restricted sessions
    Choice 5 Shutdown normal
    Q What step or steps do you take to enable Automatic Undo Management (AUM)?
    Choice 1 Create the UNDO tablespace, then ALTER SYSTEM SET AUTO_UNDO.
    Choice 2 Use ALTER SYSTEM SET AUTO_UNDO; parameter.
    Choice 3 Add UNDO_MANAGEMENT=AUTO parameter to init.ora, stop/start the database.
    Choice 4 Add UNDO_AUTO to parameter to init.ora, stop/start the database, and create the UNDO tablespace.
    Choice 5 Add UNDO_MANAGEMENT=AUTO parameter to init.ora, create the UNDO tablespace, stop/start the database
    AUTOMATIC UNDO PARAMETER SETTINGS.
    Q What Oracle 9i feature allows the database administrator to create tablespaces, datafiles, and log groups WITHOUT specifying physical filenames?
    Choice 1 Dynamic SGA
    Choice 2 Advanced Replication
    Choice 3 Data Guard
    Choice 4 Oracle Managed Files
    Choice 5 External Tables
    Q What Oracle 9i feature allows the database administrator to create tablespaces, datafiles, and log groups WITHOUT specifying physical filenames?
    Choice 1 Dynamic SGA
    Choice 2 Advanced Replication
    Choice 3 Data Guard
    Choice 4 Oracle Managed Files
    Choice 5 External Tables
    Q What package is used to specify audit requirements for a given table?
    Choice 1 DBMS_TRACE
    Choice 2 DBMS_FGA
    Choice 3 DBMS_AUDIT
    Choice 4 DBMS_POLICY
    Choice 5 DBMS_OBJECT_AUDIT
    Q What facility does Oracle provide to detect chained and migrated rows after the proper tables have been created?
    Choice 1 The ANALYZE command with the LIST CHAINED ROWS option
    Choice 2 The RDBMS cannot detect this. It must use regular export and import with compress=y to remove chained and migrated rows as part of the regular database.
    Choice 3 The DBMS_MIG_CHAIN built-in package
    Choice 4 The DBMS_REPAIR package
    Choice 5 The UTLCHAIN utility
    Q What are the three functions of an undo segment?
    Choice 1 Rolling back archived redo logs, database recovery, recording user trace information
    Choice 2 The rollback segment has only one purpose, and that is to roll back transactions that are aborted.
    Choice 3 Rolling back uncommitted transactions, maintaining read consistency, logging processed SQL statements
    Choice 4 Rolling back transactions, maintaining read consistency, database recovery
    Choice 5 Rolling back transactions, recording Data Manipulation Language (DML) statements processed against the database, recording Data Definition Language (DDL) statements processed against the database
    Q Which one of the following describes locally managed tablespaces?
    Choice 1 Tablespaces within a Recovery Manager (RMAN) repository
    Choice 2 Tablespaces that are located on the primary server in a distributed database
    Choice 3 Tablespaces that use bitmaps within their datafiles, rather than data dictionaries, to manage their extents
    Choice 4 Tablespaces that are managed via object tables stored in the system tablespace
    Choice 5 External tablespaces that are managed locally within an administrative repository serving an Oracle distributed database or Oracle Parallel Server
    Q The schema in a database you are administering has a very complex and non-user friendly table and column naming system. You need a simplified schema interface to query and on which to report.
    Which one of the following mechanisms do you use to meet the requirement stated in the above scenario?
    Choice 1 Synonym
    Choice 2 Stored procedure
    Choice 3 Labels
    Choice 4 Trigger
    Choice 5
    View
    Q You need to change the archivelog mode of an Oracle database.
    Referring to the scenario above, what steps do you take before actually changing the archivelog mode?
    Choice 1 Start up the instance and mount the database but do not open it.
    Choice 2 Execute the archive log list command
    Choice 3 Kill all user sessions to ensure that there is no database activity that might trigger redolog activity.
    Choice 4 Take all tablespaces offline.
    Choice 5 Start up the instance and mount and open the database in restricted mode.
    Q The Oracle Internet Directory debug log needs to be changed to show the following events information.
    Given the Debug Event Types and their numeric values:
    Starting and stopping of different threads. Process related. - 4
    Detail level. Shows the spawned commands and the command-line arguments passed - 32
    Operations being performed by configuration reader thread. Configuration refresh events. - 64
    Actual configuration reading operations - 128
    Operations being performed by scheduler thread in response to configuration refresh events, and so on - 256
    What statement turns debug on for all of the above event types?
    Choice 1 oidctl server=odisrv debug=4 debug=32 debug=64 debug=128 debug=256 start
    Choice 2 oidctl server=odisrv debug="4,32,64,128,256" start
    Choice 3 oidctl server=odisrv flags="debug=4 debug=32 debug=64 debug=128 debug=256" start
    Choice 4 oidctl server=odisrv flags="debug=484" start
    Choice 5 oidctl server=odisrv flags="debug=4,32,64,128,256" start
    Q Which Data Guard mode has the lowest performance impact on the primary database?
    Choice 1 Instant protection mode
    Choice 2 Guaranteed protection mode
    Choice 3 Rapid protection mode
    Choice 4 Logfile protection mode
    Choice 5 Delayed protection mode
    Q In a DSS environment, the SALES data is kept for a rolling window of the past two years.
    Referring to the scenario above, what type of partitioning do you use for this data?
    Choice 1 Hash Partitioning
    Choice 2 Range Partitioning
    Choice 3 Equipartitioning
    Choice 4 List Partitioning
    Choice 5 Composite Partitioning
    Q What are the three main areas of the SGA?
    Choice 1 Log buffer, shared pool, database writer
    Choice 2 Database buffer cache, shared pool, log buffer
    Choice 3 Shared pool, SQL area, redo log buffer
    Choice 4 Log writer, archive log, database buffer
    Choice 5
    Database buffer cache, log writer, shared pool
    Q When performing full table scans, what happens to the blocks that are read into buffers?
    Choice 1 They are put on the MRU end of the buffer list by default.
    Choice 2 They are put on the MRU end of the buffer list if the NOCACHE clause was used while altering or creating the table.
    Choice 3 They are read into the first free entry in the buffer list.
    Choice 4 They are put on the LRU end of the buffer list if the CACHE clause was used while altering or creating the table.
    Choice 5 They are put on the LRU end of the buffer list by default
    Q Standard security policy is to force users to change their passwords the first time they log in to the Oracle database.
    Referring to the scenario above, how do you enforce this policy?
    Choice 1 Use the FORCE PASSWORD EXPIRE clause when the users are first created in the database.
    Choice 2 Ask the users to follow the standards and trust them to do so.
    Choice 3 Periodically compare the users' passwords with their initial password and generate a report of the users violating the standard.
    Choice 4 Use the PASSWORD EXPIRE clause when the users are first created in the database.
    Choice 5 Check the users' passwords after they first log in to see if they have changed it. If not, remind them to do so.
    Q What object privilege is necessary for a foreign key constraint to be created and enforced on the referenced table?
    Choice 1 References
    Choice 2 Alter
    Choice 3 Update
    Choice 4 Resource
    Choice 5 Select
    Q What command do you use to drop a temporary tablespace and the associated OS files?
    Choice 1 ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP INCLUDING CONTENTS
    Choice 2 ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP INCLUDING DATAFILES;
    Choice 3 ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP;
    Choice 4 ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP;
    Choice 5 ALTER DATABASE DATAFILE '/data/oracle/temp01.dbf' DROP CASCADE;
    Q You need to implement a failover strategy using TAF. You do not have enough resources to ensure that your backup Oracle instance will be up and running in parallel with the primary.
    Referring to the scenario above, what failover mode do you use?
    Choice 1 FAILOVER_MODE=manual
    Choice 2 FAILOVER_MODE=none
    Choice 3 FAILOVER_MODE=auto
    Choice 4 FAILOVER_MODE=basic
    Choice 5 FAILOVER_MODE=preconnect
    Q An Oracle database used for an OLTP application is encountering the "snapshot too old" error.
    Referring to the scenario above, which database object or objects do you query in order to set the OPTIMAL parameter for the rollback segments?
    Choice 1 V$ROLLNAME and V$ROLLSTAT
    Choice 2 V$ROLLNAME
    Choice 3 V$ROLLSTAT
    Choice 4 DBA_ROLL and DBA_ROLLSTAT
    Choice 5 DBA_ROLLBACK_SEG
    QWhat are five background processes that must always be running in a functioning Oracle Instance?
    Choice 1 SMON (system monitor), PMON (process monitor), RECO (recoverer process), ARCH (archive process), CKPT (checkpoint process)
    Choice 2 DBW0 (database writer), SMON (system monitor), PMON (process monitor), LGWR (log writer), CKPT (checkpoint process)
    Choice 3 DBW0 (database writer), SMON (system monitor), PMON (process monitor), D000 (Dispatcher process), CKPT (checkpoint process)
    Choice 4 DBW0 (database writer), CKPT (checkpoint process), RECO (recoverer process), LGWR (log writer), ARCH (archive process)
    Choice 5 DBW0 (database writer), LGWR (log writer), ARCH (archive process), CKPT (checkpoint process), RECO (recoverer process)
    You have two large tables with thousands of rows. To select rows from the table_1, which are not referenced by an indexed common column (e.g. col_1) in table_2, you issue the following statement:
    select * from table_1
    where col_1 NOT in (select col_1 from table_2);
    This statement is taking a very long time to return its result set.
    Referring to the scenario above, which equivalent statement returns much faster?
    Choice 1
    select * from table_1
    where not exists (select * from table_2)
    Choice 2
    select * from table_2
    where col_1 not in (select col_1 from table_1)
    Choice 3
    select * from table_1
    where col_1 in (select col_1 from table_2 where col_1 = table_1.col_1)
    Choice 4
    select * from table_1
    where not exists (select 'x' from table_2 where col_1 = table_1.col_1)
    Choice 5
    select table_1.* from table_1, table_2
    where table_1.col_1 = table_2.col_1 (+)
    Performance is poor during peak transaction periods on a database you administer. You would like to view some statistics on areas such as LGWR (log writer) waits.
    Referring to the scenario above, what performance view do you query to access these statistics?
    Choice 1
    DBA_CATALOG
    Choice 2
    V$SESS_IO
    Choice 3
    V$SYSSTAT
    Choice 4
    V$PQ_SYSSTAT
    Choice 5
    V$SQLAREA
    You need to assess the performance of your shared pool at instance startup, but you cannot restart the database.
    Referring to the scenario above, how do you empty your SGA?
    Choice 1
    Execute $ORACLE_HOME/bin/db_shpool_flush
    Choice 2
    ALTER SYSTEM FLUSH SHARED_POOL
    Choice 3
    ALTER SYSTEM CLEAR SHARED POOL
    Choice 4
    DELETE FROM SYS.V$SQLAREA
    Choice 5
    DELETE FROM SYS.V$SQLTEXT
    You are reading the explain plan of a problem query and notice that full table scans are used with a HASH join.
    Referring to the scenario above, in what instance is a HASH join beneficial?
    Choice 1
    When joining two small tables--neither having any primary keys or unique indexes
    Choice 2
    When no indexes are present
    Choice 3
    When using the parallel query option
    Choice 4
    When joining two tables where one table may be significantly larger than the other
    Choice 5
    Only when using the rule-based optimizer
    An Oracle database administrator is upgrading from Oracle 8.1.7 to Oracle 9i.
    Referring to the scenario above, which one of the following scripts does the Oracle database administrator run after verifying all steps in the upgrade checklist?
    Choice 1
    u0817000.sql
    Choice 2
    u0900020.sql
    Choice 3
    u8.1.7.sql
    Choice 4
    u81700.sql
    Choice 5
    u0801070.sql
    You have a large On-Line Transaction Processing (OLTP) database running in archive log mode with two redo log groups that have two members each.
    Referring to the above scenario, to avoid stalling during peak activity periods, which one of the following actions do you take?
    Choice 1
    Add a third member to each of the groups.
    Choice 2
    Increase your LOG_CHECKPOINT_INTERVAL setting.
    Choice 3
    Turn off archive logging.
    Choice 4
    Add a third redo log group.
    Choice 5
    Turn off redo log multiplexing
    What object does a database administrator create to store precompiled summary data?
    Choice 1
    Replicated Table
    Choice 2
    Archive Log
    Choice 3
    Temporary Tablespace
    Choice 4
    Cached Table
    Choice 5
    Materialized View
    Which one of the following statements do you execute in order to find the current default temporary tablespace?
    Choice 1
    SELECT property_name, property_value FROM v$database_properties
    Choice 2
    show parameter curr_default_temp_tablespace
    Choice 3
    SELECT property_name, property_value FROM all_database_properties
    Choice 4
    SELECT property_name, property_value FROM database_properties
    Choice 5
    SELECT property_name, property_value FROM dba_database_properties
    In which one of the following situations do you use a bitmap index?
    Choice 1
    With column values that are guaranteed to be unique
    Choice 2
    With column values having a high cardinality
    Choice 3
    With column values having a consistently uniform distribution
    Choice 4
    With column values having a low cardinality
    Choice 5
    With column values having a non-uniform distribution
    A table has more than two million rows and, if exported, will exceed 4 GB in size with data, indexes, and constraints. The UNIX you are using has a 2 GB limit on file sizes. This table needs to be backed up using Oracle EXPORT.
    There are two ways this table can be exported and split into multiple files. One way is to use the UNIX pipe, split, and compress commands in conjunction with the Oracle EXPORT utility to generate multiple equally-sized files.
    Referring to the scenario above, what is the other way that you can export and split into multiple files?
    Choice 1
    Export the data into one file and the index into another file.
    Choice 2
    Use a WHERE clause with the export to limit the number of rows returned.
    Choice 3
    Vertically partition the table into sizes of less than 2 GB and then export each partition as a separate file.
    Choice 4
    Specify the multiple files in the FILE parameter and specify the FILESIZE in the EXPORT parameter file.
    Choice 5
    Horizontally partition the table into sizes of less than 2 GB and then export each partition as a separate file.
    Which one of the following statements describes the PASSWORD_GRACE_TIME profile setting?
    Choice 1
    It specifies the grace period, in days, for changing the password once expired.
    Choice 2
    It specifies the grace period, in days, for changing the password from the time it is initially set and the time the account is made active.
    Choice 3
    It specifies the grace period, in minutes, for changing the password once expired.
    Choice 4
    It specifies the grace period, in days, for changing the password after the first successful login after the password has expired.
    Choice 5
    It specifies the grace period, in hours, for changing the password once expired.
    In OEM, what color and icon are associated with a warning?
    Choice 1
    Yellow hexagon
    Choice 2
    Yellow flag
    Choice 3
    Red flag
    Choice 4
    Gray flag
    Choice 5
    Red hexagon
    What parameter in the SQLNET.ORA file specifies the order of the naming methods to be used?
    Choice 1
    NAMES.SEARCH_ORDER
    Choice 2
    NAMES.DOMAIN_HINTS
    Choice 3
    NAMES.DIRECTORY_PATH
    Choice 4
    NAMES.DOMAINS
    Choice 5
    NAMES.DIRECTORY
    An Oracle 9i database instance has automatic undo management enabled. This allows you to use the Flashback Query feature of Oracle 9i.
    Referring to the scenario above, what UNDO parameter needs to be set so that this feature allows consistent queries of data up to 90 days old?
    Choice 1
    UNDO_TABLESPACE
    Choice 2
    UNDO_TIMELIMIT
    Choice 3
    UNDO_MANAGEMENT
    Choice 4
    UNDO_FLASHBACKTO
    Choice 5
    UNDO_RETENTION
    An Oracle 9i database instance has automatic undo management enabled. This allows you to use the Flashback Query feature of Oracle 9i.
    Referring to the scenario above, what UNDO parameter needs to be set so that this feature allows consistent queries of data up to 90 days old?
    Choice 1
    UNDO_TABLESPACE
    Choice 2
    UNDO_TIMELIMIT
    Choice 3
    UNDO_MANAGEMENT
    Choice 4
    UNDO_FLASHBACKTO
    Choice 5
    UNDO_RETENTION
    DB_BLOCK_SIZE=8192
    DB_CACHE_SIZE=128M
    DB_2K_CACHE_SIZE=64M
    DB_4K_CACHE_SIZE=32M
    DB_8K_CACHE_SIZE=16M
    DB_16K_CACHE_SIZE=8M
    Referring to the initialization parameter settings above, what is the size of the cache of standard block size buffers?
    Choice 1
    8 M
    Choice 2
    16 M
    Choice 3
    32 M
    Choice 4
    64 M
    Choice 5
    128 M
    DB_CREATE_FILE_DEST='/u01/oradata/app01'
    DB_CREATE_ONLINE_LOG_DEST_1='/u02/oradata/app01'
    Referring to the sample code above, which one of the following statements is NOT correct?
    Choice 1
    Data files created with no location specified are created in the DB_CREATE_FILE_DEST directory.
    Choice 2
    Control files created with no location specified are created in the DB_CREATE_ONLINE_LOG_DEST_1 directory.
    Choice 3
    Redolog files created with no location specified are created in the DB_CREATE_ONLINE_LOG_DEST_1 directory.
    Choice 4
    Control files created with no location specified are created in the DB_CREATE_FILE_DEST directory.
    Choice 5
    Temp files created with no location specified are created in the DB_CREATE_FILE_DEST directory.
    LogMiner GUI is a part of which one of the following?
    Choice 1
    Oracle Enterprise Manager
    Choice 2
    Oracle LogMiner Plug-In
    Choice 3
    Oracle Diagnostics Pack
    Choice 4
    Oracle Performance Tuning Pack
    Choice 5
    Oracle LogMiner StandAlone GUI
    The schema in a database you are administering has a very complex and non-user friendly table and column naming system. You need a simplified schema interface to query and on which to report.
    Which one of the following mechanisms do you use to meet the requirement stated in the above scenario?
    Choice 1
    View
    Choice 2
    Trigger
    Choice 3
    Stored procedure
    Choice 4
    Synonym
    Choice 5
    Labels
    alter index gl.GL_JE_LINES_N1 rebuild
    You determine that an index has too many extents and want to rebuild it to avoid fragmentation performance degradation.
    When you issue the above scenario, where is the rebuilt index stored?
    Choice 1
    In the default tablespace for the login name you are using
    Choice 2
    You cannot rebuild an index. You must drop the existing index and re-create it using the create index statement.
    Choice 3
    In the system tablespace
    Choice 4
    In the same tablespace as it is currently stored
    Choice 5
    In the index tablespace respective to the data table on which the index is built
    Which one of the following describes locally managed tablespaces?
    Choice 1
    Tablespaces within a Recovery Manager (RMAN) repository
    Choice 2
    External tablespaces that are managed locally within an administrative repository serving an Oracle distributed database or Oracle Parallel Server
    Choice 3
    Tablespaces that are located on the primary server in a distributed database
    Choice 4
    Tablespaces that use bitmaps within their datafiles, rather than data dictionaries, to manage their extents
    Choice 5
    Tablespaces that are managed via object tables stored in the system tablespace
    Which method of database backup supports true incremental backups?
    Choice 1
    Export
    Choice 2
    Operating System backups
    Choice 3
    Oracle Enterprise Backup Utility
    Choice 4
    Incremental backups are not supported. You must use full or cumulative backups.
    Choice 5
    Recovery Manager
    You are using Data Guard to ensure high availability. The directory structures on the primary and the standby hosts are different.
    Referring to the scenario above, what initialization parameter do you set up during configuration of the standby database?
    Choice 1
    db_dir_name_convert
    Choice 2
    db_convert_dir_name
    Choice 3
    db_convert_file_name
    Choice 4
    db_directory_convert
    Choice 5
    db_file_name_convert
    Tablespace APP_INDX is put in online backup mode when redo log 744 is current. When APP_INDX is taken out of online backup mode, redo log 757 is current.
    Referring to the scenario above, if the backup is restored, what are the start and end redo logs used, in order, to perform a successful point-in-time recovery of APP_INDX?
    Choice 1
    Start Redo Log 744, End Redo Log 757
    Choice 2
    Start Redo Log 743, End Redo Log 756
    Choice 3
    Start Redo Log 745, End Redo Log 756
    Choice 4
    Start Redo Log 744, End Redo Log 756
    Choice 5
    Start Redo Log 743, End Redo Log 757
    You want to make new data entered or changed in a table adhere to a given integrity constraint, but data exist in the table that violates the constraint.
    Referring to the scenario above, what do you do?
    Choice 1
    Use an enabled novalidate constraint.
    Choice 2
    Use an enabled validate constraint.
    Choice 3
    Use a deferred constraint.
    Choice 4
    Use a disabled constraint.
    Choice 5
    You cannot enforce this type of constraint
    In Oracle 9i, the connect internal command has been discontinued.
    Referring to the text above, how do you achieve a privileged connection in Oracle 9i?
    Choice 1
    CONNECT <username> AS SYSOPER where username has DBA privileges.
    Choice 2
    CONNECT <username> as SYSDBA.
    Choice 3
    Connect using Enterprise Manager.
    Choice 4
    CONNECT sys.
    Choice 5
    Use CONNECT <username> as normal but include the user in the external password file.
    How many partitions can a table have?
    Choice 1
    64
    Choice 2
    255
    Choice 3
    1,024
    Choice 4
    65,535
    Choice 5
    Unlimited
    In Cache Fusion, when does a request by one process for a resource owned by another process fail?
    Choice 1
    When a null mode resource request is made for a resource already owned in exclusive mode by another process
    Choice 2
    When a shared mode resource request is made for a resource already owned in shared mode by another process
    Choice 3
    When a shared mode resource request is made for a resource already owned in null mode by another process
    Choice 4
    When an exclusive mode resource request is made for a resource already owned in null mode by another process
    Choice 5
    When an exclusive mode resource request is made for a resource already owned in shared mode by another process
    The Oracle Internet Directory debug log needs to be changed to show the following events information.
    Given the Debug Event Types and their numeric values:
    Starting and stopping of different threads. Process related. - 4
    Detail level. Shows the spawned commands and the command-line arguments passed - 32
    Operations being performed by configuration reader thread. Configuration refresh events. - 64
    Actual configuration reading operations - 128
    Operations being performed by scheduler thread in response to configuration refresh events, and so on - 256
    What statement turns debug on for all of the above event types?
    Choice 1
    oidctl server=odisrv flags="debug=4 debug=32 debug=64 debug=128 debug=256" start
    Choice 2
    oidctl server=odisrv debug="4,32,64,128,256" start
    Choice 3
    oidctl server=odisrv flags="debug=4,32,64,128,256" start
    Choice 4
    oidctl server=odisrv flags="debug=484" start
    Choice 5
    oidctl server=odisrv debug=4 debug=32 debug=64 debug=128 debug=256 start
    A new OFA-compliant database is being installed using the Oracle installer. The mount point being used is /u02.
    Referring to the scenario above, what is the default value for ORACLE_BASE?
    Choice 1
    /usr/app/oracle
    Choice 2
    /u02/oracle
    Choice 3
    /u02/app/oracle
    Choice 4
    /u01/app/oracle
    Choice 5
    /u02/oracle_base
    You need to start the Connection Manager Gateway and the Connections Admin processes.
    Referring to the scenario above, what command do you execute?
    Choice 1
    CMCTL START CM
    Choice 2
    CMCTL START CMADMIN
    Choice 3
    CMCTL START CMAN
    Choice 4
    CMCTL START CMGW
    Choice 5
    CMCTL START CMGW CMADM
    When performing full table scans, what happens to the blocks that are read into buffers?
    Choice 1
    They are read into the first free entry in the buffer list.
    Choice 2
    They are put on the MRU end of the buffer list if the NOCACHE clause was used while altering or creating the table.
    Choice 3
    They are put on the LRU end of the buffer list if the CACHE clause was used while altering or creating the table.
    Choice 4
    They are put on the LRU end of the buffer list by default.
    Choice 5
    They are put on the MRU end of the buffer list by default.
    You wish to take advantage of the Oracle datatypes, but you need to convert your existing LONG or LONG RAW columns to Character Large Object (CLOB) and Binary Large Object (BLOB) datatypes.
    Referring to the scenario above, what is the quickest method to use to perform this conversion?
    Choice 1
    Use the to_lob function when selecting data from the existing table into a new table.
    Choice 2
    Use the ALTER TABLE statement and MODIFY the column to the new LOB datatype.
    Choice 3
    You must export the existing data to external files and then re-import them as BFILE external LOBS.
    Choice 4
    Create a new table with the same columns but with the LONG or LONG RAW column changed to a CLOB or BLOB type. The next step is to INSERT INTO newtable select * from oldtable.
    Choice 5
    LONG and LONG RAW datatypes are not compatible with LOBS and cannot be converted within the Oracle database.
    You need to redefine the JOURNAL table in the stress test environment. You want to check first to see if it is possible to redefine this table online.
    Referring to the scenario above, what statement do you execute that checks whether or not the JOURNAL table can be redefined online if you are connected as the table owner?
    Choice 1
    Execute DBMS_REDEFINITION.CHECK_TABLE_REDEF(USER,'JOURNAL');
    Choice 2
    Execute DBMS_REDEFINITION.VERIFY_REDEF_TABLE(USER,'JOURNAL');
    Choice 3
    Execute DBMS_REDEFINITION.CAN_REDEF_TABLE(USER,'JOURNAL');
    Choice 4
    Execute DBMS_REDEFINITION.START_REDEF_TABLE(USER,'JOURNAL');
    Choice 5
    Execute DBMS_REDEFINITION.SYNC_INTERIM_TABLE(USER,'JOURNAL');
    An Oracle 9i database instance has automatic undo management enabled. This allows you to use the Flashback Query feature of Oracle 9i.
    Referring to the scenario above, what UNDO parameter needs to be set so that this feature allows consistent queries of data up to 90 days old?
    Choice 1
    UNDO_TIMELIMIT
    Choice 2
    UNDO_MANAGEMENT
    Choice 3
    UNDO_RETENTION
    Choice 4
    UNDO_TABLESPACE
    Choice 5
    UNDO_FLASHBACKTO
    Which one of the following procedures is used for the extraction of the LogMiner dictionary?
    Choice 1
    DBMS_LOGMNR_D.EXTRACT
    Choice 2
    DBMS_LOGMNR.BUILD
    Choice 3
    DBMS_LOGMINER_D.BUILD
    Choice 4
    DBMS_LOGMNR_D.BUILD_DICT
    Choice 5
    DBMS_LOGMNR_D.BUILD
    set pause on;
    column sql_text format a35;
    select sid, osuser, username, sql_text
    from v$session a, v$sqlarea b
    where a.sql_address=b.address
    and a.sql_hash_value=b.hash_value
    Why is the SQL*Plus sample code segment above used?
    Choice 1
    To view full text search queries by issuing user
    Choice 2
    To list all operating system users connected to the database
    Choice 3
    To view SQL statements issued by connected users
    Choice 4
    To detect deadlocks
    Choice 5
    To view paused database sessions
    When dealing with very large tables in which the size greatly exceeds the size of the System Global Area (SGA) data block buffer cache, which one of the following operations must be avoided?
    Choice 1
    Group operations
    Choice 2
    Aggregates
    Choice 3
    Index range scans
    Choice 4
    Multi-table joins
    Choice 5
    Full table scans
    You are reading the explain plan of a problem query and notice that full table scans are used with a HASH join.
    Referring to the scenario above, in what instance is a HASH join beneficial?
    Choice 1
    Only when using the rule-based optimizer
    Choice 2
    When joining two small tables--neither having any primary keys or unique indexes
    Choice 3
    When no indexes are present
    Choice 4
    When joining two tables where one table may be significantly larger than the other
    Choice 5
    When using the parallel query option
    Performance is poor during peak transaction periods on a database you administer. You would like to view some statistics on areas such as LGWR (log writer) waits.
    Referring to the scenario above, what performance view do you query to access these statistics?
    Choice 1
    V$SQLAREA
    Choice 2
    V$SYSSTAT
    Choice 3
    V$SESS_IO
    Choice 4
    V$PQ_SYSSTAT
    Choice 5
    DBA_CATALOG
    What security feature allows the database administrator to monitor successful and unsuccessful attempts to access data?
    Choice 1
    Autotrace
    Choice 2
    Fine-Grained Auditing
    Choice 3
    Password auditing
    Choice 4
    sql_trace
    Choice 5
    tkprof
    You need to configure a default domain that is automatically appended to any unqualified net service name.
    What Oracle-provided network configuration tool do you use to accomplish the above task?
    Choice 1
    Oracle Names Control Utility
    Choice 2
    Configuration File Utility
    Choice 3
    Oracle Network Configuration Assistant
    Choice 4
    Listener Control Utility
    Choice 5
    Oracle Net Manager
    You are experiencing performance problems due to network traffic. One way to tune this is by setting the SDU size.
    Referring to the scenario above, why do you change the SDU size?
    Choice 1
    The requests to the database return small amounts of data as in an OLTP system.
    Choice 2
    The application can be tuned to account for the delays.
    Choice 3
    The data coming back from the server are fragmented into several packets.
    Choice 4
    A large number of users are logged on concurrently to the system.
    Choice 5
    A high-speed network is available where the data transmission effect is negligible.
    You have partitioned the table ORDER on the ORDERID column using range partitioning. You want to create a locally partitioned index on this table. You also want this index to be unique.
    Referring to the scenario above, what is required for the creation of this unique locally partitioned index?
    Choice 1
    A unique partitioned index on a table cannot be local.
    Choice 2
    There can be only one unique locally partitioned index on the table.
    Choice 3
    The index has to be equipartitioned.
    Choice 4
    The table's primary key columns should be included in the index key.
    Choice 5
    The ORDERID column has to be part of the index's key.
    You have a large On-Line Transaction Processing (OLTP) database running in archive log mode with two redo log groups that have two members each.
    Referring to the above scenario, to avoid stalling during peak activity periods, which one of the following actions do you take?
    Choice 1
    Turn off redo log multiplexing.
    Choice 2
    Increase your LOG_CHECKPOINT_INTERVAL setting.
    Choice 3
    Add a third member to each of the groups.
    Choice 4
    Add a third redo log group.
    Choice 5 Turn off archive logging
    When transporting a tablespace, the tablespace needs to be self-contained.
    Referring to the scenario above, in which one of the following is the tablespace self-contained?
    Choice 1 A referential integrity constraint points to a table across a set boundary.
    Choice 2 A partitioned table is partially contained in the tablespace.
    Choice 3 An index inside the tablespace is for a table outside of the tablespace.
    Choice 4 A corresponding index for a table is outside of the tablespace.
    Choice 5 A table inside the tablespace contains a LOB column that points to LOBs outside the tablespace.
    You have experienced a database failure requiring a full database restore. Downtime is extremely costly, as is any form of data loss. You run the database in archive log mode and have a full database backup from three days ago. You have a database export from last night. You are not running Oracle Parallel Server (OPS).
    Referring to the above scenario, how do you minimize downtime and data loss?
    Choice 1 Import the data from the export using direct-path loading.
    Choice 2 Create a standby database and activate it.
    Choice 3 Perform a restore of necessary files and use parallel recovery operations to speed the application of redo entries.
    Choice 4 Conduct a full database restore and bring the database back online immediately. Apply redo logs during a future maintenance window.
    Choice 5 Perform a restore and issue a recover database command
    You have two large tables with thousands of rows. To select rows from the table_1, which are not referenced by an indexed common column (e.g. col_1) in table_2, you issue the following statement:
    select * from table_1
    where col_1 NOT in (select col_1 from table_2);
    This statement is taking a very long time to return its result set.
    Referring to the scenario above, which equivalent statement returns much faster?
    Choice 1 select * from table_1
    where col_1 in (select col_1 from table_2 where col_1 = table_1.col_1)
    Choice 2 select * from table_2
    where col_1 not in (select col_1 from table_1)
    Choice 3 select * from table_1
    where not exists (select 'x' from table_2 where col_1 = table_1.col_1)
    Choice 4 select table_1.* from table_1, table_2
    where table_1.col_1 = table_2.col_1 (+)
    Choice 5 select * from table_1
    Which one of the following initialization parameters is obsolete in Oracle 9i?
    Choice 1 LOG_ARCHIVE_DEST
    Choice 2 GC_FILES_TO_LOCKS
    Choice 3 FAST_START_MTTR_TARGET
    Choice 4 DB_BLOCK_BUFFERS
    Choice 5 DB_BLOCK_LRU_LATCHES
    You find that one of your tablespaces is running out of disk space.
    Referring to the scenario above, which one of the following is NOT a valid option to increase the space available to the tablespace?
    Choice 1 Move some segments to other tablespaces.
    Choice 2 Resize an existing datafile in the tablespace.
    Choice 3 Add another datafile to the tablespace.
    Choice 4 Increase the MAX_EXTENTS for the tablespace.
    Choice 5 Turn AUTOEXTEND on for one or more datafiles in the tablespace.
    What tools or utilities do you use to transfer the data dictionary's structural information of transportable tablespaces?
    Choice 1 DBMS_TTS
    Choice 2 SQL*Loader
    Choice 3 Operating System copy commands
    Choice 4 DBMS_STATS
    Choice 5 EXP and IMP
    Which one of the following, if backed up, is potentially problematic to a complete recovery?
    Choice 1
    Control file
    Choice 2
    System Tablespace
    Choice 3
    Data tablespaces
    Choice 4
    Online Redo logs
    Choice 5
    All archived redologs after the last backup
    Your database warehouse performs frequent full table scans. Your DB_BLOCK_SIZE is 16,384.
    Referring to the scenario above, what parameter do you use to reduce disk I/O?
    Choice 1 LOG_CHECKPOINT_TIMEOUT
    Choice 2 DBWR_IO_SLAVES
    Choice 3 DB_FILE_MULTIBLOCK_READ_COUNT
    Choice 4 DB_WRITER_PROCESSES
    Choice 5 DB_BLOCK_BUFFERS
    Which one of the following describes the "Reset database to incarnation" command used by Recovery Manager?
    Choice 1 It performs a resynchronization of online redo logs to a given archive log system change number (SCN).
    Choice 2 It performs point-in-time recovery when using Recovery Manager.
    Choice 3 It restores the database to the initial state in which it was found when first backing it up via Recovery Manager.
    Choice 4 It restores the database to a save point as defined by the version control number or incarnation number of the database.
    Choice 5 It is used to undo the effect of a resetlogs operation by restoring backups of a prior incarnation of the database.
    You are using the CREATE TABLE statement to populate the data dictionary with metadata to allow access to external data, where /data is a UNIX writable directory and filename.dbf is an arbitrary name.
    Referring to the scenario above, which clause must you add to your CREATE TABLE statement?
    Choice 1
    organization external
    Choice 2 external file /data/filename.dbf
    Choice 3 ON /data/filename.dbf
    Choice 4 organization file
    Choice 5 file /data/filename.dbf
    Your business user has expressed a need to be able to revert back to data that are at most eight hours old. You decide to use Oracle 9i's FlashBack feature for this purpose.
    Referring to the scenario above, what is the value of UNDO_RETENTION that supports this requirement?
    Choice 1 480
    Choice 2 8192
    Choice 3 28800
    Choice 4 43200
    Choice 5 28800000
    Materialized Views constitute which data warehousing feature offered by Oracle?
    Choice 1 FlashBack Query
    Choice 2 Summary Management
    Choice 3 Dimension tables
    Choice 4 ETL Enhancements
    Choice 5 Updateable Multi-table Views
    DB_BLOCK_SIZE=8192
    DB_CACHE_SIZE=128M
    DB_2K_CACHE_SIZE=64M
    DB_4K_CACHE_SIZE=32M
    DB_8K_CACHE_SIZE=16M
    DB_16K_CACHE_SIZE=8M
    Referring to the initialization parameter settings above, what is the size of the cache of standard block size buffers?
    Choice 1 8 M
    Choice 2 16 M
    Choice 3 32 M
    Choice 4 64 M
    Choice 5 128 M
    You need to send listener log information to the Oracle Support Services. The listener name is LSNRORA1.
    Referring to the scenario above, which one of the following statements do you use in the listener.ora file to generate this log information?
    Choice 1 TRACE_LEVEL_LSNRORA1=debug
    Choice 2 TRACE_LEVEL_LSNRORA1=admin
    Choice 3 TRACE_LEVEL_LSNRORA1=5
    Choice 4 TRACE_LEVEL_LSNRORA1=support
    Choice 5 TRACE_LEVEL_LSNRORA1=on
    Which one of the following statements causes you to choose the NOARCHIVELOG mode for an Oracle database?
    Choice 1
    The database does not need to be available at all times.
    Choice 2
    The database is used for a DSS application, and updates are applied to it once in 48 hours.
    Choice 3
    The database needs to be available at all times.
    Choice 4
    It is unacceptable to lose any data if a disk failure damages some of the files that constitute the database.
    Choice 5
    There will be times when you will need to recover to a point-in-time that is not current.
    You are experiencing performance problems due to network traffic. One way to tune this is by setting the SDU size.
    Referring to the scenario above, why do you change the SDU size?
    Choice 1 A large number of users are logged on concurrently to the system.
    Choice 2 A high-speed network is available where the data transmission effect is negligible.
    Choice 3 The data coming back from the server are fragmented into several packets.
    Choice 4 The application can be tuned to account for the delays.
    Choice 5 The requests to the database return small amounts of data as in an OLTP system.

    Post a few if you need answers to a few.
    Anyway, my best shot:-
    Q. Directories are different
    A. Use db_file_name_convert why? read about it.
    Q What facility does Oracle provide to detect chained and migrated rows after the proper tables have been created?
    A.The ANALYZE command with the LIST CHAINED ROWS option
    Q While doing an export, the following is encountered:
    my best guess
    Use the RESUMABLE=Y option for the export.
    Q. The DBCA (Database Configuration Assistant) prompts the installer to enter the password for which default users?
    A. SYS and SYSTEM
    Q You are designing the physical database for an application that stores dates and times. This will be accessed by users from all over the world in different time zones. Each user needs to see the time in his or her time zone.
    A. TIMESTAMP WITH LOCAL TIME ZONE
    Q What command do you use to drop a temporary tablespace and the associated OS files?
    A. ALTER DATABASE TEMPFILE '/data/oracle/temp01.dbf' DROP INCLUDING DATAFILES;
    Q You wish to use a graphical interface to manage database locks and to identify blocking locks.
    A. Lock Manager, a tool in the base Oracle Enterprise Manager (OEM) product, as well as the console
    Q CREATE DATABASE abc
    A. They cannot be changed unless you re-create your control file
    Q You need to change the archivelog mode of an Oracle database.
    A. Execute the archive log list command
    Q When interpreting statistics from the v$sysstat, what factor do you need to keep in mind that can skew your statistics?
    A.
    Choice 3 The statistics gathered by v$sysstat include database startup activities and database activity that initially populates the database buffer cache and shared pool.
    Q You want to shut down the database, but you do not want client connections to lose any non-committed work. You also do not want to wait for every open session to disconnect.
    Choice 3 Shutdown transactional
    Q What step or steps do you take to enable Automatic Undo Management (AUM)?
    A.Choice 5 Add UNDO_MANAGEMENT=AUTO parameter to init.ora, create the UNDO tablespace, stop/start the database
    Q What Oracle 9i feature allows the database administrator to create tablespaces, datafiles, and log groups WITHOUT specifying physical filenames?
    A. Choice 4 Oracle Managed Files

  • Fast Updates for 8 million records..!!

    Hi All,
    I was wondering is there any fast method for updating 8 million records out of 10 million table?
    For eg :
    I am having a customer table of 10m records and columns are cust_id, cust_num and cust_name.
    i need to update 8m records out of 10m customer table as follows.
    update customer set cust_id=46 where cust_id=75;
    The above statement will update 8m records. And cust_id is indexed.
    But if i fire the above update statement we'll face rollback segment problem..
    Even if i use ROWNUM and commit after 100K records still its gonna take huge time and also i know CTAS will be lot lot faster but for this scenario i guess its not possible.. Right?
    Any help is much appreciated...
    Thanks.

    You didn't specify what version you're on, but have you looked at dbms_redefinition?
    create table cust (cust_num number, constraint cust_pk primary key (cust_num), cust_id number, name varchar2(10));
    create index cust_id_idx on cust(cust_id);
    insert into cust values( 1, 1, 'a');
    insert into cust values( 2, 2, 'b');
    insert into cust values( 3, 1, 'c');
    insert into cust values( 4, 4, 'd');
    insert into cust values( 5, 1, 'e');
    select * From cust;
    create table cust_int (cust_num number, cust_id number, name varchar2(10));
    exec dbms_redefinition.start_redef_table(user,'cust', 'cust_int', 'cust_num cust_num, decode(cust_id, 1, 99, cust_id) cust_id, name name');
    declare
    i pls_integer;
    begin
    dbms_redefinition.copy_table_dependents( user, 'cust', 'cust_int', copy_indexes=>dbms_redefinition.cons_orig_params, copy_triggers=>true, copy_constraints=>true, copy_privileges=>true, ignore_errors=>false, num_errors=>i);
    dbms_output.put_line('Errors: ' || i);
    end;
    exec dbms_redefinition.finish_redef_table(user, 'cust', 'cust_int');
    select * From cust;
    select table_name, index_name from user_indexes;
    You would probably want to run a sync_interim_table in there before the finish.
    Good luck.

  • Re-org of partitioned tables

    Is there a way to re-org a range partitioned table?
    I have a table which is range partitioned and till date of 2007 November.So the rest of the records are all in max partition.The size of the max is so huge (250 millions) it takes long time to split the max partition.And during the process of split the indexes on the table are getting invalid.So i am looking at a better way of doing the split.So is re-org possible on the max partition? During the process of re-org can i have the interim table with the new partitions?

    Hello,
    Can you post the link to the section you read this?
    h3. I just tested following scenarios in my test setup and it worked just fine. You should try this test as well.
    -- MASTER TABLE
    CREATE TABLE TEST_PART_AA
      KEY       VARCHAR2(23 BYTE)                       NULL,
      KEY_DATE  DATE                                    NULL
    PARTITION BY RANGE (KEY_DATE)
      PARTITION TEST_PART_A_200902 VALUES LESS THAN (TO_DATE(' 2009-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING
        NOCOMPRESS, 
      PARTITION TEST_PART_MAX VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX TMP$$_TEST_PART_A_PK0 ON TEST_PART_AA
    (KEY)
    LOGGING
    NOPARALLEL;
    ALTER TABLE TEST_PART_AA ADD (
      CONSTRAINT TMP$$_TEST_PART_A_PK0
    PRIMARY KEY
    (KEY));
    -- INTERIM TABLE
    CREATE TABLE TEST_PART_A
      KEY       VARCHAR2(23 BYTE)                       NULL,
      KEY_DATE  DATE                                    NULL
    PARTITION BY RANGE (KEY_DATE)
      PARTITION TEST_PART_A_200902 VALUES LESS THAN (TO_DATE(' 2009-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING
        NOCOMPRESS, 
         PARTITION TEST_PART_A_200903 VALUES LESS THAN (TO_DATE(' 2009-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING
        NOCOMPRESS, 
         PARTITION TEST_PART_A_200904 VALUES LESS THAN (TO_DATE(' 2009-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING
        NOCOMPRESS, 
      PARTITION TEST_PART_MAX VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    Insert into TEST_PART_AA
       (KEY, KEY_DATE)
    Values
       ('3', TO_DATE('02/08/2009 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into TEST_PART_AA
       (KEY, KEY_DATE)
    Values
       ('1', TO_DATE('04/08/2009 16:22:49', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into TEST_PART_AA
       (KEY, KEY_DATE)
    Values
       ('2', TO_DATE('03/08/2009 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;# redefintion pl/sql block
    DECLARE
       num_errors   NUMBER;
    BEGIN
       DBMS_REDEFINITION.can_redef_table ('USIUSER',
                                          'TEST_PART_AA',
                                          DBMS_REDEFINITION.cons_use_pk,
                                          NULL
       DBMS_REDEFINITION.start_redef_table ('USIUSER',
                                            'TEST_PART_AA',
                                            'TEST_PART_AC',
                                            NULL,
                                            DBMS_REDEFINITION.cons_use_pk,
                                            NULL,
                                            NULL
       DBMS_REDEFINITION.copy_table_dependents ('USIUSER',
                                                'TEST_PART_AA',
                                                'TEST_PART_AC',
                                                DBMS_REDEFINITION.cons_orig_params,
                                                TRUE,
                                                TRUE,
                                                TRUE,
                                                FALSE,
                                                num_errors,
                                                FALSE
       DBMS_OUTPUT.put_line('ERRORS OCCURED WHEN COPYING DEPENEDENTS OBJECTS '
                            || num_errors);
       DBMS_REDEFINITION.finish_redef_table ('USIUSER',
                                             'TEST_PART_AA',
                                             'TEST_PART_AC',
                                             NULL
    END;Regards
    Edited by: OrionNet on Apr 8, 2009 4:29 PM

  • Online redefinition timestamp to date column. Impossible ?

    Hi ,
    I'm trying to online redefine timestamp column to date column (cut off fractional seconds) but looks like this is
    impossible at least in 9.2 EE DB.
    SQL> desc t
    Name                                                                                      Null?    Type
    ID                                                                                        NOT NULL NUMBER
    DATA                                                                                               TIMESTAMP(6)
    SQL> desc t_interim
    Name                                                                                      Null?    Type
    ID                                                                                        NOT NULL NUMBER
    DATA                                                                                               DATE
    declare
    l_colmap varchar2(512);
    begin
    l_colmap := 'id , data cast(data as date)';
    dbms_redefinition.start_redef_table(user, 'T' , 'T_INTERIM', l_colmap);
    end;
    declare
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expected
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 8
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 146
    ORA-06512: at line 5Regards.
    Greg

    SQL> select to_timestamp_tz('2011-03-10T13:55:00.000-06:00','YYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') from dual
      2  /
    TO_TIMESTAMP_TZ('2011-03-10T13:55:00.000-06:00','YYYY-MM-DD"T"HH24:MI:SS.FF
    10-MAR-11 01.55.00.000000000 PM -06:00
    SQL>  SY.

  • Regarding TAble REdifinition

    Hi,
    ORA-42016: shape of interim table does not match specified column mapping
    How to resolve this error.

    Use DBMS_REDEFINITION.START_REDEF_TABLE to define how the old table maps to the new table. A couple of points to note - firstly (and probably obviously but it took a couple of failed attempts for the penny to drop), you need to specify all the columns. So, the parameter is a comma separated string like this:
    col_mapping => 'col1 col1, col2 col2, col3 col3 ...... TO_LOB(colN) colN'
    If you don’t get this right then you get:
    ORA-42016: shape of interim table does not match specified column mapping
    Secondly, there is an options_flag parameter which indicates how the mapping mechanism is done. There seem to be two methods - by primary key or by rowid with the former seemingly preferred over the latter where possible.

  • 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

  • Partition an Non Partition Table in 11.2.0.1

    Hi Friends,
    I am using Oracle 11.2.0.1 Oracle Database.
    I have a table with 10 Million records and it's a Non Partitioned Table.
    1) I would like to partition the table (with partition by range ) without creating new table . I should do it in the existing table itself (not sure DBMS_REDEFINITION is the only option ) (or) can i use alter table ...?
    2) Add one partition which will have data for the unspecified range.
    Please let me know the inputs on the above
    Regards,
    DB

    Hi,
    what is the advantage of using DBMS_REDEFINITION over normal method (create partition table,grant access,insert records)You can't just add a partition in a non-partitioned table. You need to recreate existing table to have it partitioned (you can't just start adding new partitions to existing non-partitioned table). Advantage of dbms_redefinition is that it is online operation to re-create an existing table and and your data always remains available during table recreation
    I would like to know how to copy the object privileges,constraints,indexes from Non Partitioned table (sales) to Partitioned table (sales_part) which i am creating. will >DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS help on this?First you need to tell us what method you are using to partition an existing table? If you are using dbms_redifiniiton, you really don't need to worry about triggers, indexex or constraints at all. Just follow any document which explains how to use dbms_redifinition. Dr. Tim has done a lot of work for dummys like us by writing documents for us. Follow this document.
    http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php
    If so can i use DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS alone for copying the table dependents alone after i create partition table (or) it should be used along with >DBMS_REDEFINITION.START_REDEF_TABLE only?See above document which i mentioned.
    Salman

  • DDL for table & all its dependent objects

    Hi,
    I'm trying to perform online_redefinition of a table in Oracle 11g. After this the depedent objects like indexes & Primary Keys & Foreign Keys are missing. Can anyone help with a detailed step by step procedure to perform this online_redefinition.
    I've performed the below steps
    1) check whether table can be redefined online or not.
    2) create the duplicate empty table using CTAS where 1=2 condition.
    3) start the online redefiniton.
    4) do the interim sync.
    5) end the redifinition.
    6) drop the duplicate table.
    Regards
    Surya

    Hi,
    here are steps to consider:
    1) check first if the table can be redefined online by using: DBMS_REDEFINITION.CAN_REDEF_TABLE
    2) Create an intermediary table
    3) Start the redefinition of the table using : DBMS_REDEFINITION.START_REDEF_TABLE
    4) Copy  dependents from the original table to the intermediary table using: DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
    5) synchronize between the original and intermediate table : DBMS_REDEFINITION.SYNC_INTERIM_TABLE
    6) Finish the redefinition of the intermediary table using: DBMS_REDEFINITION.FINISH_REDEF_TABLE
    7) compare the "new" original table (used to be intermediary  ) to the intermediary table (used to be old original)
    8) Drop the intermediary table
    I hope this helps you.
    Regards,

  • Change partitioned column range in range partioning in 11g

    Hi All,
    First of all , i am thankful to all of you for your help and suggestions in past. I have one new issue. I am using Oracle 11. There is one new functionality in 11g to do range paritioning while table creation and do daily partitioning.
    CREATE TABLE TEST(
    DUE_DAY DATE,
    ID VARCHAR2(10 BYTE),
    NAME VARCHAR2(25 BYTE)
    PARTITION BY RANGE (DUE_DAY)
    INTERVAL( NUMTODSINTERVAL(1,'DAY'))
    PARTITION FIRST VALUES LESS THAN (TO_DATE('2012-02-05 12:00:00', 'SYYYY-MM-DD HH24:MI:SS')));
    Now I found i create the partition range wrong so each partition has data from previous day 12:00 afternoon to today 12:00 afternoon instead of daily data from 00:00 am to 11:59 pm because i mentioned wrong range in partition.
    I supposed to do like this:
    CREATE TABLE TEST(
    DUE_DAY DATE,
    ID VARCHAR2(10 BYTE),
    NAME VARCHAR2(25 BYTE)
    PARTITION BY RANGE (DUE_DAY)
    INTERVAL( NUMTODSINTERVAL(1,'DAY'))
    PARTITION FIRST VALUES LESS THAN (TO_DATE('2012-02-05 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')));
    My question is: Is there any way i can change it now as table already has huge data in it, so i cant go with creation of another partitioned table with correct partition range? Please let me know your suggestions and comments to resolve this issue.
    Regards
    Dev
    Edited by: Keen2Learn on Feb 10, 2012 9:12 AM

    Keen2Learn wrote:
    My question is: Is there any way i can change it now as table already has huge data in it, so i cant go with creation of another partitioned table with correct partition range? Please let me know your suggestions and comments to resolve this issue.Nope.
    I don't think it is possible to achieve this without creating a new/an intermediate table.
    If you can afford down-time, you should create new table, load data into it (in parallel with nologging), drop original table and rename new table.
    If you want this switchover as online operation, you can use DBMS_REDEFINITION as follows:
    SQL> select * from v$version ;
    BANNER                                                                                                                                                                    
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production                                                                                                    
    PL/SQL Release 11.2.0.2.0 - Production                                                                                                                                    
    CORE     11.2.0.2.0     Production                                                                                                                                                
    TNS for Linux: Version 11.2.0.2.0 - Production                                                                                                                            
    NLSRTL Version 11.2.0.2.0 - Production                                                                                                                                    
    SQL> CREATE TABLE TEST(
      2  DUE_DAY DATE,
      3  ID VARCHAR2(10 BYTE),
      4  NAME VARCHAR2(25 BYTE)
      5  )
      6  PARTITION BY RANGE (DUE_DAY)
      7  INTERVAL( NUMTODSINTERVAL(1,'DAY'))
      8  (
      9  PARTITION FIRST VALUES LESS THAN (TO_DATE('2012-02-01 12:00:00', 'SYYYY-MM-DD HH24:MI:SS')));
    Table created.
    SQL> insert into test(due_day, id) select (trunc(sysdate, 'MM')+(10/24)) + ((5*level)/24), level from dual connect by level <= 12 ;
    12 rows created.
    SQL> commit ;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats(user, 'TEST');
    PL/SQL procedure successfully completed.
    SQL> select partition_name, num_rows from user_tab_partitions where table_name = 'TEST' ;
    PARTITION_NAME                   NUM_ROWS                                                                                                                                 
    FIRST                                   0                                                                                                                                 
    SYS_P115                                5                                                                                                                                 
    SYS_P116                                4                                                                                                                                 
    SYS_P117                                3                                                                                                                                 
    SQL> SELECT * FROM TEST PARTITION (FIRST) ;
    no rows selected
    SQL> SELECT * FROM TEST PARTITION (SYS_P115) ;
    DUE_DAY              ID         NAME                                                                                                                                      
    01-FEB-2012 15:00:00 1                                                                                                                                                    
    01-FEB-2012 20:00:00 2                                                                                                                                                    
    02-FEB-2012 01:00:00 3                                                                                                                                                    
    02-FEB-2012 06:00:00 4                                                                                                                                                    
    02-FEB-2012 11:00:00 5                                                                                                                                                    
    SQL> SELECT * FROM TEST PARTITION (SYS_P116);
    DUE_DAY              ID         NAME                                                                                                                                      
    02-FEB-2012 16:00:00 6                                                                                                                                                    
    02-FEB-2012 21:00:00 7                                                                                                                                                    
    03-FEB-2012 02:00:00 8                                                                                                                                                    
    03-FEB-2012 07:00:00 9                                                                                                                                                    
    SQL> SELECT * FROM TEST PARTITION (SYS_P117);
    DUE_DAY              ID         NAME                                                                                                                                      
    03-FEB-2012 12:00:00 10                                                                                                                                                   
    03-FEB-2012 17:00:00 11                                                                                                                                                   
    03-FEB-2012 22:00:00 12                                                                                                                                                   
    SQL> exec DBMS_REDEFINITION.CAN_REDEF_TABLE('hr','TEST',DBMS_REDEFINITION.CONS_USE_ROWID);
    PL/SQL procedure successfully completed.
    SQL> CREATE TABLE INTR_TEST(
      2  DUE_DAY DATE,
      3  ID VARCHAR2(10 BYTE),
      4  NAME VARCHAR2(25 BYTE)
      5  )
      6  PARTITION BY RANGE (DUE_DAY)
      7  INTERVAL( NUMTODSINTERVAL(1,'DAY'))
      8  (
      9  PARTITION FIRST VALUES LESS THAN (TO_DATE('2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS')));
    Table created.
    SQL> exec DBMS_REDEFINITION.START_REDEF_TABLE('hr', 'TEST', 'INTR_TEST', 'due_day due_day, id id, name name', dbms_redefinition.cons_use_rowid);
    PL/SQL procedure successfully completed.
    SQL> exec DBMS_REDEFINITION.SYNC_INTERIM_TABLE('hr', 'TEST', 'INTR_TEST');
    PL/SQL procedure successfully completed.
    SQL> exec DBMS_REDEFINITION.FINISH_REDEF_TABLE('hr', 'TEST', 'INTR_TEST');
    PL/SQL procedure successfully completed.
    SQL> exec dbms_stats.gather_table_stats(user, 'TEST');
    PL/SQL procedure successfully completed.
    SQL> select partition_name, num_rows from user_tab_partitions where table_name = 'TEST' ;
    PARTITION_NAME                   NUM_ROWS                                                                                                                                 
    FIRST                                   0                                                                                                                                 
    SYS_P118                                2                                                                                                                                 
    SYS_P119                                5                                                                                                                                 
    SYS_P120                                5                                                                                                                                 
    SQL> SELECT * FROM TEST PARTITION (FIRST) ;
    no rows selected
    SQL> SELECT * FROM TEST PARTITION (SYS_P118) ;
    DUE_DAY              ID         NAME                                                                                                                                      
    01-FEB-2012 15:00:00 1                                                                                                                                                    
    01-FEB-2012 20:00:00 2                                                                                                                                                    
    SQL> SELECT * FROM TEST PARTITION (SYS_P119);
    DUE_DAY              ID         NAME                                                                                                                                      
    02-FEB-2012 01:00:00 3                                                                                                                                                    
    02-FEB-2012 06:00:00 4                                                                                                                                                    
    02-FEB-2012 11:00:00 5                                                                                                                                                    
    02-FEB-2012 16:00:00 6                                                                                                                                                    
    02-FEB-2012 21:00:00 7                                                                                                                                                    
    SQL> SELECT * FROM TEST PARTITION (SYS_P120);
    DUE_DAY              ID         NAME                                                                                                                                      
    03-FEB-2012 02:00:00 8                                                                                                                                                    
    03-FEB-2012 07:00:00 9                                                                                                                                                    
    03-FEB-2012 12:00:00 10                                                                                                                                                   
    03-FEB-2012 17:00:00 11                                                                                                                                                   
    03-FEB-2012 22:00:00 12                                                                                                                                                   
    SQL> select dbms_metadata.get_ddl('TABLE','TEST') from dual ;
    DBMS_METADATA.GET_DDL('TABLE','TEST')                                                                                                                                     
      CREATE TABLE "HR"."TEST"                                                                                                                                                
       (     "DUE_DAY" DATE,                                                                                                                                                      
         "ID" VARCHAR2(10),                                                                                                                                                       
         "NAME" VARCHAR2(25)                                                                                                                                                      
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255                                                                                                                        
      STORAGE(                                                                                                                                                                
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)                                                                                                       
      TABLESPACE "USERS"                                                                                                                                                      
      PARTITION BY RANGE ("DUE_DAY") INTERVAL (NUMTODSINTERVAL(1,'DAY'))                                                                                                      
    (PARTITION "FIRST"  VALUES LESS THAN (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM                                                                                          
    -DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) SEGMENT CREATION DEFERRED                                                                                                     
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING                                                                                                        
      STORAGE( BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)                                                                                              
      TABLESPACE "USERS" )                                                                                                                                                    
    SQL> drop table intr_test purge ;
    Table dropped.
    SQL> drop table test purge ;
    Table dropped.
    SQL> spool offHope this helps.

Maybe you are looking for