Drop tablespace Example in Oracle 9i

I have used Oracle 9i (9.2) database in my P.C. Today my database(ORCL) not open due to corruption of
EXAMPLE01.dbf datafile. Now I want to drop the tablespace EXAMPLE associated with EXAMPLE01.dbf
file. My database now in mount stage, so i can not drop this tablespace using the following command.
'DROP TABLESPACE EXAMPLE' ;
message comes 'DATABASE NOT OPEN'.
how could i solve this problem.

Hi,
Is this your test database?
I recommend you backup your database in a state what it is now before procedding to any of the mentioned solution here.
And before procedding below do you like to post where it shows that datafiles got corrupted?
You need to offline your datafile at the mount stage.
alter database datafile 'datafile name' offline
alter database open
drop tablespace <tablespace name> drop including contentsRegards
Anurag
PS: All the above commands are irrecoverable if you do not have a backup.

Similar Messages

  • Step to drop tablespace example

    Dear all,
    When i drop tablespace example i got error as below:
    SQL> drop tablespace EXAMPLE INCLUDING CONTENTS;
    ERROR at line 1:
    ORA-24008: queue table QS.QS_ORDERS_PR_MQTAB must be dropped first
    Could you pls provide the step to drop example tablespace?
    Thanks for advance !
    Chara

    Thanks for your replied.After i execute i got error as below:
    SQL> execute DBMS_AQADM.DROP_QUEUE_TABLE ;
    BEGIN DBMS_AQADM.DROP_QUEUE_TABLE ; END;However, the previously message said about running the procedure against the specfied table. That would seems to say that you need to run the procedure and givent at least the table name as parameter.
    And why not take a look to the doc by yourself : quick search results into the Oracle doc
    Nicolas.

  • Dropping Tablespaces  ORA 23515 Error

    Hi
    I am trying to drop a tablespace
    DROP TABLESPACE EXAMPLE INCLUDING CONTENTS AND DATAFILES;
    I get ORA 23515 Error " Materialized Views and /or their indices exist in the Tablespace"
    How to find out which Materialized views and /or indices are to be dropped? Is there a way to find them?

    You can find materialized views from the database using the following select
    select object_name,object_type from dba_objects where owner='xxxxx' and object_type='MATERIALIZED VIEW';
    and then drop the MV using command
    drop materialized view xxxxx;

  • Drop tablespace in Oracle 8i

    I want to know how to drop tablespace in Oracle 8i.
    Actually i read on internet that we cannot drop tablespace in oracle 8i.
    Is that true?
    How can i drop the tablespace in 8i?
    Thanks,

    8i does have a DROP TABLESPACE command. What it does not have is the "AND DATAFILES" clause. Thus, it will not remove the datafiles at the OS layer (eg filesystem).

  • Auditing drop tablespace in Oracle 10.1

    Hi all,
    I want to audit the drop table and drop tablespace statement for all users in the oracle database 10.1. So, could someone gives me a help to do this?
    The audit_trail is already set to db in the database.
    Regards

    When I try to create and drop a table there was no rows selected from
    select username, action_name from dba_audit_trail;
    This is my audit option
    AUDIT_OPTION SUCCESS FAILURE
    ALTER TABLESPACE BY ACCESS BY ACCESS
    CREATE TABLESPACE BY ACCESS BY ACCESS
    DROP ANY TABLE BY ACCESS BY ACCESS
    DROP TABLESPACE BY ACCESS BY ACCESS
    audit_trail = db
    Why this drop table is not stored in the view dba_audit_trail
    Regards

  • TSPITR - Recover a Dropped Tablespace aborting due dependency over XDB.

    I found an issue using TSPITR to Recover a Dropped Tablespace when XML DB (XDB) is installed on a different tablespace from "SYSAUX".
    During execution of TSPITR RMAN use Data Pump to export/import Tablespace Metadata as Data Pump has dependency over XDB views and related objects and XDB is installed on a set of tablespace not included on dummy database then EXPDP fails.
    Errors raised ORA-39123, ORA-00376, ORA-01110.
    I didn't found any limitation about XDB location on documentation or MoS.
    This looks like a Oracle Bug.
    See this:
    XDB installed on TABLESPACE XDB.
    SQL> select owner,tablespace_name
        from dba_segments
        where owner='XDB'
         GROUP BY owner,tablespace_name ;
    OWNER                          TABLESPACE_NAME
    XDB                            XDBDropping Tablespace SOE.
    SQL> select to_char(sysdate,'dd-mm-yyyy hh24:mi:ss') actual_date from dual;
    ACTUAL_DATE
    17-12-2012 11:57:44
    SQL> drop tablespace SOE including contents and datafiles;
    Tablespace dropped.Restoring Dropped Tablespace.
    RMAN> list backup tag TAG20121217T112226;
    List of Backup Sets
    ===================
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    69      Full    995.61M    DISK        00:02:41     17-12-2012 11:25:07
            BP Key: 69   Status: AVAILABLE  Compressed: YES  Tag: TAG20121217T112226
            Piece Name: +DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947
      List of Datafiles in backup set 69
      File LV Type Ckp SCN    Ckp Time            Name
      1       Full 1628648    17-12-2012 11:22:26 +DS8000_DG/prod/datafile/system.349.799325249
      2       Full 1628648    17-12-2012 11:22:26 +DS8000_DG/prod/datafile/sysaux.348.799325249
      3       Full 1628648    17-12-2012 11:22:26 +DS8000_DG/prod/datafile/undotbs1.347.799325251
      4       Full 1628648    17-12-2012 11:22:26 +DS8000_DG/prod/datafile/users.335.799325251
      5       Full 1628648    17-12-2012 11:22:26 +DS8000_DG/prod/datafile/audit_aux.287.799330083
      6       Full 1628648    17-12-2012 11:22:26
      7       Full 1628648    17-12-2012 11:22:26 +DS8000_DG/prod/datafile/xdb.311.801410833
    RMAN>
    run{
    SET NEWNAME FOR DATAFILE 6 TO "+DS8000_DG";
    RECOVER TABLESPACE SOE
    UNTIL TIME "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')"
    AUXILIARY DESTINATION '/u01/app/oracle/flash_recovery_area01/stage_area_tspitr';
    executing command: SET NEWNAME
    Starting recover at 17-12-2012 12:01:29
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=18 device type=DISK
    RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
    List of tablespaces expected to have UNDO segments
    Tablespace SYSTEM
    Tablespace UNDOTBS1
    Creating automatic instance, with SID='FCox'
    initialization parameters used for automatic instance:
    db_name=PROD
    db_unique_name=FCox_tspitr_PROD
    compatible=11.2.0.0.0
    db_block_size=8192
    db_files=200
    sga_target=280M
    processes=50
    db_create_file_dest=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr
    log_archive_dest_1='location=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr'
    #No auxiliary parameter file used
    starting up automatic instance PROD
    Oracle instance started
    Total System Global Area     292278272 bytes
    Fixed Size                     2220880 bytes
    Variable Size                109055152 bytes
    Database Buffers             176160768 bytes
    Redo Buffers                   4841472 bytes
    Automatic instance created
    List of tablespaces that have been dropped from the target database:
    Tablespace SOE
    contents of Memory Script:
    # set requested point in time
    set until  time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')";
    # restore the controlfile
    restore clone controlfile;
    # mount the controlfile
    sql clone 'alter database mount clone database';
    # archive current online log
    sql 'alter system archive log current';
    # avoid unnecessary autobackups for structural changes during TSPITR
    sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
    executing Memory Script
    executing command: SET until clause
    Starting restore at 17-12-2012 12:01:46
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=16 device type=DISK
    channel ORA_AUX_DISK_1: starting datafile backup set restore
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/autobackup/2012_12_17/s_802265113.276.802265115
    channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/autobackup/2012_12_17/s_802265113.276.802265115 tag=TAG20121217T112513
    channel ORA_AUX_DISK_1: restored backup piece 1
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:05
    output file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/controlfile/o1_mf_8dy9ghpz_.ctl
    Finished restore at 17-12-2012 12:01:52
    sql statement: alter database mount clone database
    sql statement: alter system archive log current
    sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
    contents of Memory Script:
    # set requested point in time
    set until  time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')";
    # set destinations for recovery set and auxiliary set datafiles
    set newname for clone datafile  1 to new;
    set newname for clone datafile  3 to new;
    set newname for clone datafile  2 to new;
    set newname for clone tempfile  1 to new;
    set newname for datafile  6 to
    "+DS8000_DG";
    # switch all tempfiles
    switch clone tempfile all;
    # restore the tablespaces in the recovery set and the auxiliary set
    restore clone datafile  1, 3, 2, 6;
    switch clone datafile all;
    executing Memory Script
    executing command: SET until clause
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    renamed tempfile 1 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_temp_%u_.tmp in control file
    Starting restore at 17-12-2012 12:01:58
    using channel ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: starting datafile backup set restore
    channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_%u_.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_%u_.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_%u_.dbf
    channel ORA_AUX_DISK_1: restoring datafile 00006 to +DS8000_DG
    channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947
    channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947 tag=TAG20121217T112226
    channel ORA_AUX_DISK_1: restored backup piece 1
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:09:15
    Finished restore at 17-12-2012 12:11:13
    datafile 6 switched to datafile copy
    input datafile copy RECID=5 STAMP=802267873 file name=+DS8000_DG/prod/datafile/soe.487.802267321
    datafile 1 switched to datafile copy
    input datafile copy RECID=6 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_8dy9gs09_.dbf
    datafile 3 switched to datafile copy
    input datafile copy RECID=7 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_8dy9ov17_.dbf
    datafile 2 switched to datafile copy
    input datafile copy RECID=8 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_8dy9hxsc_.dbf
    contents of Memory Script:
    # set requested point in time
    set until  time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')";
    # online the datafiles restored or switched
    sql clone "alter database datafile  1 online";
    sql clone "alter database datafile  3 online";
    sql clone "alter database datafile  2 online";
    sql clone "alter database datafile  6 online";
    # recover and open resetlogs
    recover clone database tablespace  "SOE", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
    alter clone database open resetlogs;
    executing Memory Script
    executing command: SET until clause
    sql statement: alter database datafile  1 online
    sql statement: alter database datafile  3 online
    sql statement: alter database datafile  2 online
    sql statement: alter database datafile  6 online
    Starting recover at 17-12-2012 12:11:14
    using channel ORA_AUX_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 15 is already on disk as file +DG_16M/prod/archivelog/2012_12_17/thread_1_seq_15.277.802267317
    channel ORA_AUX_DISK_1: starting archived log restore to default destination
    channel ORA_AUX_DISK_1: restoring archived log
    archived log thread=1 sequence=14
    channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/backupset/2012_12_17/annnf0_tag20121217t112512_0.264.802265113
    channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/backupset/2012_12_17/annnf0_tag20121217t112512_0.264.802265113 tag=TAG20121217T112512
    channel ORA_AUX_DISK_1: restored backup piece 1
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
    archived log file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/1_14_801941068.dbf thread=1 sequence=14
    channel clone_default: deleting archived log(s)
    archived log file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/1_14_801941068.dbf RECID=141 STAMP=802267877
    archived log file name=+DG_16M/prod/archivelog/2012_12_17/thread_1_seq_15.277.802267317 thread=1 sequence=15
    media recovery complete, elapsed time: 00:00:01
    Finished recover at 17-12-2012 12:11:19
    database opened
    contents of Memory Script:
    # make read only the tablespace that will be exported
    sql clone 'alter tablespace  SOE read only';
    # create directory for datapump import
    sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
    /u01/app/oracle/flash_recovery_area01/stage_area_tspitr''";
    # create directory for datapump export
    sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
    /u01/app/oracle/flash_recovery_area01/stage_area_tspitr''";
    executing Memory Script
    sql statement: alter tablespace  SOE read only
    sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/flash_recovery_area01/stage_area_tspitr''
    sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/flash_recovery_area01/stage_area_tspitr''
    Performing export of metadata...
       EXPDP> Starting "SYS"."TSPITR_EXP_FCox":
       EXPDP> ORA-39123: Data Pump transportable tablespace job aborted
    ORA-00376: file 7 cannot be read at this time
    ORA-01110: data file 7: '+DS8000_DG/prod/datafile/xdb.311.801410833'
    Removing automatic instance
    shutting down automatic instance
    database closed
    database dismounted
    Oracle instance shut down
    Automatic instance removed
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_temp_8dyb0qok_.tmp deleted
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_3_8dyb0kfp_.log deleted
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_2_8dyb0fm9_.log deleted
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_1_8dyb07xv_.log deleted
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_8dy9hxsc_.dbf deleted
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_8dy9ov17_.dbf deleted
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_8dy9gs09_.dbf deleted
    auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/controlfile/o1_mf_8dy9ghpz_.ctl deleted
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 12/17/2012 12:12:19
    RMAN-06962: Error received during export of metadata
    RMAN-06965: Datapump job has stopped
    RMAN-06960:    EXPDP> Job "SYS"."TSPITR_EXP_FCox" stopped due to fatal error at 12:12:02
    RMAN>If I drop tablespace SOE and XDB on Target database and try to restore both (SOE,XDB) export will succeeds but during IMPORT Metadata RMAN will faill due XDB dependency.
    In my view, they (mean Oracle) need find way to include XDB Tablespace at DUMMY database only to export (EXPDP) Metadata purposes.
    If someone get a workaround for this error will be grateful.
    P.S: This is not a Production environment and will soon open a SR on Oracle Support.

    Hi Michael,
    I did not find solution to use TSPITR to recover dropped tablespace if XML DB is installed in a non-default tablespace (i.e outside of SYSAUX).
    As far I could understand, the only way to perform this RESTORE is using the old fashion. By creating clone database excluding all unnecessary tablespace, exporting and importing metadata from desired tablespace manually.
    Since Oracle has not solved the issue I created my own workaround.
    @All
    If someone is able to use TSPITR to restore dropped tablespace when XDB is installed in a non-default tablespace, please let me know!!!
    The procedure below is supported on All Oracle Version since 10.1 until 11.2.
    I DON'T RECOMMEND to create AUXILIARY (clone) database using the same server from TARGET because you can damage the TARGET database.
    On this example I'm using same server.
    See this example:
    ### ON TARGET DATABASE
    SQL> select count(1) SEG_COUNT from dba_segments where tablespace_name='SOE';
      SEG_COUNT
            32
    SQL> ! date
    Wed Dec 19 15:08:11 GMT-02:00 2012
    SQL> drop tablespace soe including contents and datafiles;
    Tablespace dropped.
    ### CHECK TABLESPACE TO BE EXCLUDED FROM RESTORE
    SQL> select tablespace_name
        from dba_tablespaces
         where tablespace_name not in ('SYSTEM','SYSAUX','UNDOTBS1','SOE','XDB','TEMP');
    TABLESPACE_NAME
    USERS
    AUDIT_AUX
    ### CHECK BACKUP ON TARGET DATABASE
    RMAN> list backup completed between "sysdate-1" and "sysdate";
    List of Backup Sets
    ===================
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    95      Full    986.56M    DISK        00:03:18     19-12-2012 14:41:59
            BP Key: 95   Status: AVAILABLE  Compressed: YES  Tag: TAG20121219T143840
            Piece Name: /fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp
      List of Datafiles in backup set 95
      File LV Type Ckp SCN    Ckp Time            Name
      1       Full 1675258    19-12-2012 14:38:42 +DS8000_DG/prod/datafile/system.349.799325249
      2       Full 1675258    19-12-2012 14:38:42 +DS8000_DG/prod/datafile/sysaux.348.799325249
      3       Full 1675258    19-12-2012 14:38:42 +DS8000_DG/prod/datafile/undotbs1.347.799325251
      4       Full 1675258    19-12-2012 14:38:42 +DS8000_DG/prod/datafile/users.335.799325251
      5       Full 1675258    19-12-2012 14:38:42 +DS8000_DG/prod/datafile/audit_aux.287.799330083
      6       Full 1675258    19-12-2012 14:38:42
      7       Full 1675258    19-12-2012 14:38:42 +DS8000_DG/prod/datafile/xdb.311.801410833
    BS Key  Size       Device Type Elapsed Time Completion Time
    96      1.16M      DISK        00:00:00     19-12-2012 14:42:08
            BP Key: 96   Status: AVAILABLE  Compressed: YES  Tag: TAG20121219T144208
            Piece Name: /fra/PROD/backupset/2012_12_19/o1_mf_annnn_TAG20121219T144208_8f3vm0k3_.bkp
      List of Archived Logs in backup set 96
      Thrd Seq     Low SCN    Low Time            Next SCN   Next Time
      1    8       1675198    19-12-2012 14:38:25 1675365    19-12-2012 14:42:07
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    97      Full    7.52M      DISK        00:00:02     19-12-2012 14:42:11
            BP Key: 97   Status: AVAILABLE  Compressed: NO  Tag: TAG20121219T144209
            Piece Name: /fra/PROD/autobackup/2012_12_19/o1_mf_s_802449729_8f3vm2cc_.bkp
      SPFILE Included: Modification time: 19-12-2012 14:36:30
      SPFILE db_unique_name: PROD
      Control File Included: Ckp SCN: 1675376      Ckp time: 19-12-2012 14:42:09
    RMAN>
    ### PREPARING ENV
    cp $ORACLE_HOME/dbs/orapwprod $ORACLE_HOME/dbs/orapwtspitr
    cd $ORACLE_HOME/dbs
    ## Creating INIT from TSPITR Instance
    vi inittspitr.ora
    DB_NAME=prod
    DB_UNIQUE_NAME=tspitr
    CONTROL_FILES=/stage_area_tspitr/PROD/controlfile/control01.ctl
    REMOTE_LOGIN_PASSWORDFILE=exclusive
    COMPATIBLE =11.2.0
    DB_BLOCK_SIZE=8192
    memory_target=700M
    streams_pool_size=100M
    ### creating stage area to deploy database
    mkdir -p  /fra/stage_area_tspitr/PROD
    cd /fra/stage_area_tspitr/PROD
    mkdir controlfile datafile onlinelog
    #### RESTORING DATABASE TSPITR
    export ORACLE_SID=tspitr
    $ rman target /
    RMAN> startup nomount
    Oracle instance started
    Total System Global Area     730714112 bytes
    Fixed Size                     2225088 bytes
    Variable Size                553651264 bytes
    Database Buffers             167772160 bytes
    Redo Buffers                   7065600 bytes
    RMAN> restore controlfile from '/fra/PROD/autobackup/2012_12_19/o1_mf_s_802449729_8f3vm2cc_.bkp';
    Starting restore at 19-12-2012 15:16:27
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=146 device type=DISK
    channel ORA_DISK_1: restoring control file
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
    output file name=/fra/stage_area_tspitr/PROD/controlfile/control01.ctl
    Finished restore at 19-12-2012 15:16:31
    RMAN> startup mount
    database is already started
    database mounted
    released channel: ORA_DISK_1
    ### REPORT SCHEMA TO GET DATAFILE NUMBER TO BE RESTORED
    RMAN> report schema;
    RMAN-06139: WARNING: control file is not current for REPORT SCHEMA
    Report of database schema for database with db_unique_name TSPITR
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace           RB segs Datafile Name
    1    700      SYSTEM               ***     +DS8000_DG/prod/datafile/system.349.799325249
    2    600      SYSAUX               ***     +DS8000_DG/prod/datafile/sysaux.348.799325249
    3    200      UNDOTBS1             ***     +DS8000_DG/prod/datafile/undotbs1.347.799325251
    4    5        USERS                ***     +DS8000_DG/prod/datafile/users.335.799325251
    5    100      AUDIT_AUX            ***     +DS8000_DG/prod/datafile/audit_aux.287.799330083
    6    0        SOE                  ***     +DS8000_DG/tspitr/datafile/soe.368.802445265
    7    100      XDB                  ***     +DS8000_DG/prod/datafile/xdb.311.801410833
    List of Temporary Files
    =======================
    File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
    1    385      TEMP                 32767       +DS8000_DG/prod/tempfile/temp.300.799325437
    RMAN>
    ### GET LOGFILE NAME to RENAME to new location.
    $ sqlplus / as sysdba
    SQL> select member from v$logfile;
    MEMBER
    +DS8000_DG/prod/onlinelog/group_1.330.802352807
    +DS8000_DG/prod/onlinelog/group_2.331.802352815
    +DS8000_DG/prod/onlinelog/group_3.321.802352821
    run {
    set newname for datafile 1 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
    set newname for datafile 2 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
    set newname for datafile 3 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
    set newname for datafile 7 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
    set newname for datafile 6 to "+DS8000_DG";
    restore datafile 1,2,3,7,6 from tag 'TAG20121219T143840' ;
    switch datafile 1;
    switch datafile 2;
    switch datafile 3;
    switch datafile 7;
    switch datafile 6;
    switch tempfile all;
    set until time "to_date('19-12-2012 14:42:00','dd-mm-yyyy hh24:mi:ss')";
    recover database SKIP TABLESPACE  "USERS", "AUDIT_AUX" delete archivelog;
    ## Renaming ONLINELOG
    sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_1.330.802352807'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group1.rdo''";
    sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_2.331.802352815'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group2.rdo''";
    sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_3.321.802352821'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group3.rdo''";
    alter database open resetlogs;
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting restore at 19-12-2012 15:32:13
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile backup set restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_DISK_1: restoring datafile 00001 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1
    channel ORA_DISK_1: restoring datafile 00002 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSAUX_FNO-2
    channel ORA_DISK_1: restoring datafile 00003 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-UNDOTBS1_FNO-3
    channel ORA_DISK_1: restoring datafile 00007 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-XDB_FNO-7
    channel ORA_DISK_1: restoring datafile 00006 to +DS8000_DG
    channel ORA_DISK_1: reading from backup piece /fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp
    channel ORA_DISK_1: piece handle=/fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp tag=TAG20121219T143840
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:12:35
    Finished restore at 19-12-2012 15:44:48
    datafile 1 switched to datafile copy
    input datafile copy RECID=6 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1
    datafile 2 switched to datafile copy
    input datafile copy RECID=8 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSAUX_FNO-2
    datafile 3 switched to datafile copy
    input datafile copy RECID=10 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-UNDOTBS1_FNO-3
    datafile 7 switched to datafile copy
    input datafile copy RECID=12 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-XDB_FNO-7
    datafile 6 switched to datafile copy
    input datafile copy RECID=14 STAMP=802453489 file name=+DS8000_DG/tspitr/datafile/soe.304.802452733
    renamed tempfile 1 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-TEMP_FNO-1 in control file
    executing command: SET until clause
    Starting recover at 19-12-2012 15:44:49
    using channel ORA_DISK_1
    Executing: alter database datafile 4 offline
    Executing: alter database datafile 5 offline
    starting media recovery
    archived log for thread 1 with sequence 8 is already on disk as file +DS8000_DG/prod/onlinelog/group_2.331.802352815
    archived log file name=+DS8000_DG/prod/onlinelog/group_2.331.802352815 thread=1 sequence=8
    media recovery complete, elapsed time: 00:00:02
    Finished recover at 19-12-2012 15:44:55
    sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_1.330.802352807'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group1.rdo''
    sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_2.331.802352815'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group2.rdo''
    sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_3.321.802352821'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group3.rdo''
    database opened
    ## Exporting Tablespace Metadata
    RMAN >
    run {
    sql 'alter tablespace  SOE read only';
    # create directory for datapump export
    sql  "create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''";
    # grant on directory to SYSTEM
    sql "grant read,write on directory TSPITR_DIROBJ_DPDIR to system";
    # exporting metadata
    host "expdp system/oracle@localhost:1521/tspitr DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_FULL_CHECK=Y TRANSPORT_TABLESPACES=SOE";
    using target database control file instead of recovery catalog
    sql statement: alter tablespace  SOE read only
    sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''
    sql statement: grant read,write on directory TSPITR_DIROBJ_DPDIR to system
    Export: Release 11.2.0.3.0 - Production on Wed Dec 19 15:53:02 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP,
    Data Mining, Oracle Database Vault and Real Application Testing options
    Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01":  system/********@localhost:1521/tspitr DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_FULL_CHECK=Y TRANSPORT_TABLESPACES=SOE
    Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
    Processing object type TRANSPORTABLE_EXPORT/TABLE
    Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
    Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
    Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is:
      /fra/stage_area_tspitr/exp_transport_soe.dmp
    Datafiles required for transportable tablespace SOE:
      +DS8000_DG/tspitr/datafile/soe.304.802452733
    Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 15:54:28
    host command complete
    ## Stop Database and destroy it to make sure that Datafile 6 will not be used by this database;
    RMAN>
    run {
    shutdown immediate;
    ## removing controlfile and SYSTEM Tablespace to make sure that database will not be opened
    host "rm -f /fra/stage_area_tspitr/PROD/controlfile/control01.ctl /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1";
    database closed
    database dismounted
    Oracle instance shut down
    host command complete
    ## TARGET Database
    ## Plugging Tablespace on TARGET database.
    $ export ORACLE_SID=prod
    $ rman target /
    run {
    # create directory for datapump import
    sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''";
    # grant on directory to SYSTEM
    sql "grant read,write on directory TSPITR_DIROBJ_DPDIR to system";
    host "impdp system/oracle@localhost:1521/prod DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_DATAFILES=''+DS8000_DG/tspitr/datafile/soe.304.802452733''";
    sql "alter tablespace soe read write";
    sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''
    sql statement: grant read,write on directory TSPITR_DIROBJ_DPDIR to system
    Import: Release 11.2.0.3.0 - Production on Wed Dec 19 16:09:30 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP,
    Data Mining, Oracle Database Vault and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/********@localhost:1521/prod DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_DATAFILES=+DS8000_DG/tspitr/datafile/soe.304.802452733
    Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
    Processing object type TRANSPORTABLE_EXPORT/TABLE
    Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
    Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 16:10:03
    host command complete
    sql statement: alter tablespace soe read write
    ### Recompiling Invalid Objects and Checking objects from  tablespace SOE
    $ sqlplus / as sysdba
    SQL>  @$ORACLE_HOME/rdbms/admin/utlrp.sql
    TIMESTAMP
    COMP_TIMESTAMP UTLRP_BGN  2012-12-19 16:10:34
    OBJECTS WITH ERRORS
                      0
    ERRORS DURING RECOMPILATION
                              0
    Function created.
    PL/SQL procedure successfully completed.
    Function dropped.
    PL/SQL procedure successfully completed.
    SQL> select count(1) SEG_COUNT from dba_segments where tablespace_name='SOE';
      SEG_COUNT
            32
    SQL> SELECT COUNT(1) OBJ_INVALID FROM DBA_OBJECTS WHERE STATUS != 'VALID';
    OBJ_INVALID
              0
    ## PERFORM A FULL BACKUP AFTER RESTORE TABLESPACE.Regards,
    Levi Pereira

  • How to drop Tablespace containg materilized views

    Hi friends,
    I am trying to drop a tablespace but gives an error
    SQL> drop tablespace tabs_name including contents and datafiles cascade constraints;
    drop tablespace tabs_name including contents and datafiles cascade constraints
    ERROR at line 1:
    ORA-23515: materialized views and/or their indices exist in the tablespace
    Please tell me the solution
    Regards,
    Neeraj Goel

    ORA-23515: materialized views and/or their indices exist in the tablespace
    Cause: An attempt was made to drop a tablespace which contains materialized views and/or their indices.
    Action: Drop the materialized views in this tablespace. Also, find indices belonging to materialized views in this tablespace and drop then. Then try dropping the tablespace.
    Examples
    Dropping a Materialized View: Examples The following statement drops the materialized view emp_data in the sample schema hr:
    DROP MATERIALIZED VIEW emp_data;
    The following statement drops the sales_by_month_by_state materialized view and the underlying table of the materialized view, unless the underlying table was registered in the CREATE MATERIALIZED VIEW statement with the ON PREBUILT TABLE clause:
    DROP MATERIALIZED VIEW sales_by_month_by_state;
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8019.htm

  • Tablespace Reorganisation in Oracle 10g Database

    Dear All,
    I'm planning of doing a carrying out a Tablespace Reorganisation of the schema tablespace on the production server. I need your views regarding the process to be taken and tuning that is required before carrying out such an activity. For your information, the size of the tablespace is around 3TB. Also, since it is the production server, we can't have an outage for more than 24hrs. Hence, I would like some help from all of you in order to carry out this activity successfully in the time frame.
    Regarding the process :
    I have some ideas about how to do the tablespace reorganisation in oracle 10g. But, if I carry out the activity my way, its going it to take atleast 3-4 days to complete (which won't be acceptable).
    Areas of concern :
    1) Steps to perform the tablespace reorganisation in Oracle 10g DB.
    2) Size of the temporary tablespace before starting the Reorg.
    3) Any further suggestions / recomendations regarding tuning up of Oracle Parameters for enhancement of speed and acuracy of the activity.
    System Specifications :
    SAP - BI 7.0 (SAP NetWeaver 2004s)
    DB - Oracle 10.2.0.2.0, DBSL Patch Level - 158
    OS - AIX 5.3
    Looking forward to some good and prompt suggestions from all of you !!
    Please provide your valuable inputs.
    NOTE :: We have successfully performed the reorganization in the rest of the landscape on the same schema tablespace without any issues.
    Thanks and Regards,
    Deoraj Alok.

    It is quite an old thread, but let me put in my view points, which could help others.
    1. The Size of PSAPTEMP and PSAPUNDO tablespace should be 1.5*largest Table Size.
    2. Another Important thing is , if the time is in an issue, what you can do is to reorg. only top 50 largest tables where maximum space is being wasted. Folowing is the query to determine the TOP 50 tables which has the highest WASTED size.
    SELECT * FROM
    (SELECT
    SUBSTR(TABLE_NAME, 1, 21) TABLE_NAME,
    NUM_ROWS,
    AVG_ROW_LEN ROWLEN,
    BLOCKS,
    +ROUND((AVG_ROW_LEN + 1) * NUM_ROWS / 1000000, 0) NET_MB,+
    +ROUND(BLOCKS * (8000 - 23 * INI_TRANS) *+
    (1 - PCT_FREE / 100) / 1000000, 0) GROSS_MB,
    ROUND((BLOCKS * (8000 - 23 * INI_TRANS) * (1 - PCT_FREE / 100) -
    +(AVG_ROW_LEN + 1) * NUM_ROWS) / 1000000) "WASTED_MB",+
    Tablespace_Name
    FROM DBA_TABLES
    WHERE
    NUM_ROWS IS NOT NULL AND
    OWNER LIKE 'SAP%' AND
    PARTITIONED = 'NO' AND
    (IOT_TYPE != 'IOT' OR IOT_TYPE IS NULL)
    ORDER BY 7 DESC)
    WHERE ROWNUM <=50;
    I am sure that, only these 50 tables will reduce the maximum space and you can ignore rest of the tables.
    3. Even you can find out all the Tables which are having LONG and LONG RAW fields by using this query
    Select Distinct TABLE_NAME From dba_tab_cols Where Owner='SAPYSP' and (DATA_TYPE='LONG' OR DATA_TYPE='LONG RAW');
    Now, from the results of this query you can see how many Tables are present in the Top 50 Tables. There will be a few only and you can export/import these few tables in offline mode.
    4. After reorg, fi you want to claim the free disk space also, it would not be that easy because of the high water mark present in datafiles but you can try with
    Alter datafile <datafile id> resize <Size>M
    5. If free disk space is the first priority the you need to create another Table space (which should have size as big as it can have all the tables) and you re-organize in this new tablespace. After Reorg, drop the old tablespace and rename the new Table space with the old one (Rename Tablespace Command will work only in Oracle 10g).
    I hope this information helps all those who are going to do reorg in their respective projects. However, You can further put your question if in doubt and I will try to answer them.

  • Snapshot too old error during drop tablespace

    Hi Experts
    When we are doing BW reorg and steps followed are
    1. created a newtablespace with source tablespace TABART class reference.
    2. Export the source tablespace to the filesystem level.
    3. DROP the source tablespace now.
    4. Rename the new tablespace to source tablespace name.
    5. Import
    Here in the third step i have received snapshot too old error.
    BR0301E SQL error -604 at location BrSqlExecute-1, SQL statement:
    '/* BRSPACE */ drop tablespace PSAPADSOLD including contents and datafiles cascade constraints'
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01555: snapshot too old: rollback segment number 0 with name "SYSTEM" too small
    BR1017E Execution of SQL statement 'drop tablespace PSAPADSOLD including contents and datafiles cascade constraints' failed
    so i tried to rename the tablespace and set to offline and tried to import only 240 tables were imported compared to 24057 tables.Still the PSAPADS - Source tablespace shows 65000 elements.
    my queries:
    1. After Export of the tablespace how come the Source tablespace retain the tables.
    2. why i could not able to drop the tablespace
    I had increased the UNDO_RETENTION to 86400 my oracle version is 10.2.04.
    Source table space PSAPADS is 80 GB and has only 30 GB data and the remaining are free.
    PSAPUNDO was 17GB in size.
    Kinldy suggest
    Regards
    Bala

    Hi Stefa
    Thanks for your reply.
    how to find the System undo is still active.How to track which Undo which is active and their steps.
    As per the metalink note our PSAPUNDO is Locally Managed Tablepsace hence the second workaround is applicable..
    How to validate this will not give a problem again while i am doing reorganization.
    When i checked a sap note 1039060 this note is applicable to windows i dont how it can be impleneted.
    Whether any merge fix will help on this
    Regards
    Bala

  • 11gR2 DBCA ORA-00959: tablespace 'EXAMPLE' does not exist

    Hello everyone,
    I have searched for this specific error but found nothing on it (wonder why I am always the only one having those weird problem!!!)
    When I use DBCA, interactive graphical tool, to create a database the process won't end normally if I include example schema.
    Somewhere during the process I have an error message with the following : ORA-00959: tablespace 'EXAMPLE' does not exist. <-- well, the reason why it doesn't exist is because YOU are supposed to create it .... duh!
    Anyone have experienced the same problem?
    Database, Oracle 11gR2
    OS : Solaris 10 release 10/08
    Hardware : sparc, Sun E450
    Thank you for your time and support

    up

  • ORA-00959: tablespace 'EXAMPLE' does not exist

    hi ! i want to import hr schema to my application server 10g from oracle 10g database.
    oracle application server:
    [oracle@apps ~]$ sqlplus / as sysdba
    SQL> SQL> SELECT * FROM V$VERSION ;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Prod
    PL/SQL Release 10.1.0.4.2 - Production
    CORE 10.1.0.4.0 Production
    TNS for Linux: Version 10.1.0.4.0 - Production
    NLSRTL Version 10.1.0.4.2 - Production
    oracle database 10g;
    [oracle@test ~]$ sqlplus / as sysdba
    SQL> SELECT * FROM V$VERSION ;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    exporting schema in oracle database 10g.................
    [oracle@test dpdump]$ expdp DIRECTORY=DATA_PUMP_DIR DUMPFILE=hrschema.dmp logfile=hrschema.log SCHEMAS=hr version=10.1.0.4.2
    Export: Release 10.2.0.1.0 - Production on Friday, 30 April, 2010 9:45:30
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Username: sys as sysdba
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Starting "SYS"."SYS_EXPORT_SCHEMA_01": sys/******** AS SYSDBA DIRECTORY=DATA_PUMP_DIR DUMPFILE=hrschema.dmp logfile=hrschema.log SCHEMAS=hr version=10.1.0.4.2
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 448 KB
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/COMMENT
    Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
    Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
    Processing object type SCHEMA_EXPORT/VIEW/VIEW
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "HR"."COUNTRIES" 6.085 KB 25 rows
    . . exported "HR"."DEPARTMENTS" 6.632 KB 27 rows
    . . exported "HR"."EMPLOYEES" 15.76 KB 107 rows
    . . exported "HR"."JOBS" 6.609 KB 19 rows
    . . exported "HR"."JOB_HISTORY" 6.585 KB 10 rows
    . . exported "HR"."LOCATIONS" 7.710 KB 23 rows
    . . exported "HR"."REGIONS" 5.289 KB 4 rows
    Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
    /d01/app/oracle/product/10.2.0/db/admin/orcl/dpdump/hrschema.dmp
    ^[[AJob "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at 09:45:50
    *transfering the schema dump file to appliaction server..............................*
    [oracle@test dpdump]$ scp hrschema.dmp apps:/d01/backupdp/hrschema.dmp
    oracle@apps's password:
    hrschema.dmp 100% 596KB 596.0KB/s 00:00
    [oracle@test dpdump]$
    Now importing datapump schema from that dump file............................
    [oracle@apps backupdp]$ ls
    example01.dbf hrschema.dmp
    [oracle@apps backupdp]$ impdp DIRECTORY=backupdp DUMPFILE=hrschema.dmp logfile=hrschema.log SCHEMAS=hr
    Import: Release 10.1.0.4.2 - Production on Friday, 30 April, 2010 9:54
    Copyright (c) 2003, Oracle. All rights reserved.
    Username: sys as sysdba
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Production
    With the Partitioning, OLAP and Data Mining options
    Master table "SYS"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
    Starting "SYS"."SYS_IMPORT_SCHEMA_01": sys/******** AS SYSDBA DIRECTORY=backupdp DUMPFILE=hrschema.dmp logfile=hrschema.log SCHEMAS=hr
    Processing object type SCHEMA_EXPORT/USER
    ORA-31684: Object type USER:"HR" already exists
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."COUNTRIES" ("COUNTRY_ID" CHAR(2) CONSTRAINT "COUNTRY_ID_NN" NOT NULL ENABLE, "COUNTRY_NAME" VARCHAR2(40), "REGION_ID" NUMBER, CONSTRAINT "COUNTRY_C_ID_PK" PRIMARY KEY ("COUNTRY_ID") ENABLE) ORGANIZATION INDEX NOCOMPRESS PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."REGIONS" ("REGION_ID" NUMBER CONSTRAINT "REGION_ID_NN" NOT NULL ENABLE, "REGION_NAME" VARCHAR2(25)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "EXAMPLE"
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."LOCATIONS" ("LOCATION_ID" NUMBER(4,0), "STREET_ADDRESS" VARCHAR2(40), "POSTAL_CODE" VARCHAR2(12), "CITY" VARCHAR2(30) CONSTRAINT "LOC_CITY_NN" NOT NULL ENABLE, "STATE_PROVINCE" VARCHAR2(25), "COUNTRY_ID" CHAR(2)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELI
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."DEPARTMENTS" ("DEPARTMENT_ID" NUMBER(4,0), "DEPARTMENT_NAME" VARCHAR2(30) CONSTRAINT "DEPT_NAME_NN" NOT NULL ENABLE, "MANAGER_ID" NUMBER(6,0), "LOCATION_ID" NUMBER(4,0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."JOBS" ("JOB_ID" VARCHAR2(10), "JOB_TITLE" VARCHAR2(35) CONSTRAINT "JOB_TITLE_NN" NOT NULL ENABLE, "MIN_SALARY" NUMBER(6,0), "MAX_SALARY" NUMBER(6,0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "EXAMPL
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."EMPLOYEES" ("EMPLOYEE_ID" NUMBER(6,0), "FIRST_NAME" VARCHAR2(20), "LAST_NAME" VARCHAR2(25) CONSTRAINT "EMP_LAST_NAME_NN" NOT NULL ENABLE, "EMAIL" VARCHAR2(25) CONSTRAINT "EMP_EMAIL_NN" NOT NULL ENABLE, "PHONE_NUMBER" VARCHAR2(20), "HIRE_DATE" DATE CONSTRAINT "EMP_HIRE_DATE_NN" NOT NULL ENABLE, "JOB_ID" VARCHAR2(10) CONSTRAINT "EMP_JOB_NN" NOT NULL ENABLE, "SALARY" NUM
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."JOB_HISTORY" ("EMPLOYEE_ID" NUMBER(6,0) CONSTRAINT "JHIST_EMPLOYEE_NN" NOT NULL ENABLE, "START_DATE" DATE CONSTRAINT "JHIST_START_DATE_NN" NOT NULL ENABLE, "END_DATE" DATE CONSTRAINT "JHIST_END_DATE_NN" NOT NULL ENABLE, "JOB_ID" VARCHAR2(10) CONSTRAINT "JHIST_JOB_NN" NOT NULL ENABLE, "DEPARTMENT_ID" NUMBER(4,0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type OBJECT_GRANT:"HR" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    ORA-39112: Dependent object type INDEX:"HR"."REG_ID_PK" skipped, base object type TABLE:"HR"."REGIONS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."LOC_ID_PK" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."LOC_CITY_IX" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."LOC_STATE_PROVINCE_IX" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."LOC_COUNTRY_IX" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."DEPT_ID_PK" skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."DEPT_LOCATION_IX" skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."JOB_ID_PK" skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."EMP_EMAIL_UK" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."EMP_EMP_ID_PK" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."EMP_DEPARTMENT_IX" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."EMP_JOB_IX" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."EMP_MANAGER_IX" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."EMP_NAME_IX" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."JHIST_EMP_ID_ST_DATE_PK" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."JHIST_JOB_IX" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."JHIST_EMPLOYEE_IX" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type INDEX:"HR"."JHIST_DEPARTMENT_IX" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    ORA-39112: Dependent object type CONSTRAINT:"HR"."REG_ID_PK" skipped, base object type TABLE:"HR"."REGIONS" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."LOC_ID_PK" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."DEPT_ID_PK" skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."JOB_ID_PK" skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."EMP_SALARY_MIN" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."EMP_EMAIL_UK" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."EMP_EMP_ID_PK" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."JHIST_DATE_INTERVAL" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type CONSTRAINT:"HR"."JHIST_EMP_ID_ST_DATE_PK" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."REG_ID_PK" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."LOC_ID_PK" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."LOC_CITY_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."LOC_STATE_PROVINCE_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."LOC_COUNTRY_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."DEPT_ID_PK" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."DEPT_LOCATION_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."JOB_ID_PK" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."EMP_EMAIL_UK" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."EMP_EMP_ID_PK" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."EMP_DEPARTMENT_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."EMP_JOB_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."EMP_MANAGER_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."EMP_NAME_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."JHIST_EMP_ID_ST_DATE_PK" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."JHIST_JOB_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."JHIST_EMPLOYEE_IX" creation failed
    ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type INDEX:"HR"."JHIST_DEPARTMENT_IX" creation failed
    Processing object type SCHEMA_EXPORT/TABLE/COMMENT
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type COMMENT skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
    Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
    ORA-39082: Object type ALTER_PROCEDURE:"HR"."ADD_JOB_HISTORY" created with compilation warnings
    Processing object type SCHEMA_EXPORT/VIEW/VIEW
    ORA-39082: Object type VIEW:"HR"."EMP_DETAILS_VIEW" created with compilation warnings
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."COUNTR_REG_FK" skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."LOC_C_ID_FK" skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."DEPT_MGR_FK" skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."DEPT_LOC_FK" skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."EMP_MANAGER_FK" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."EMP_JOB_FK" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."EMP_DEPT_FK" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."JHIST_DEPT_FK" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."JHIST_EMP_FK" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    ORA-39112: Dependent object type REF_CONSTRAINT:"HR"."JHIST_JOB_FK" skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
    ORA-39112: Dependent object type TRIGGER:"HR"."SECURE_EMPLOYEES" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type TRIGGER:"HR"."UPDATE_JOB_HISTORY" skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"HR"."REGIONS" creation failed
    ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"HR"."COUNTRIES" creation failed
    ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"HR"."LOCATIONS" creation failed
    ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"HR"."DEPARTMENTS" creation failed
    ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"HR"."JOBS" creation failed
    ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"HR"."EMPLOYEES" creation failed
    ORA-39112: Dependent object type TABLE_STATISTICS skipped, base object type TABLE:"HR"."JOB_HISTORY" creation failed
    Job "SYS"."SYS_IMPORT_SCHEMA_01" completed with 123 error(s) at 09:55
    [oracle@apps backupdp]$ ls
    example01.dbf hrschema.dmp hrschema.log
    *[oracle@apps backupdp]$ more hrschema.log*
    Import: Release 10.1.0.4.2 - Production on Friday, 30 April, 2010 9:54
    Copyright (c) 2003, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Producti
    on
    With the Partitioning, OLAP and Data Mining options
    Master table "SYS"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
    Starting "SYS"."SYS_IMPORT_SCHEMA_01": sys/******** AS SYSDBA DIRECTORY=backupdp
    DUMPFILE=hrschema.dmp logfile=hrschema.log SCHEMAS=hr
    Processing object type SCHEMA_EXPORT/USER
    ORA-31684: Object type USER:"HR" already exists
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    ORA-39083: Object type TABLE failed to create with error:
    *ORA-00959: tablespace 'EXAMPLE' does not exist*
    Failing sql is:
    CREATE TABLE "HR"."COUNTRIES" ("COUNTRY_ID" CHAR(2) CONSTRAINT "COUNTRY_ID_NN" NOT
    NULL ENABLE, "COUNTRY_NAME" VARCHAR2(40), "REGION_ID" NUMBER, CONSTRAINT "COUNTR
    Y_C_ID_PK" PRIMARY KEY ("COUNTRY_ID") ENABLE) ORGANIZATION INDEX NOCOMPRESS PCTFRE
    E 10 INITRANS 2 MAXTRANS 255 NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTEN
    TS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST
    ORA-39083: Object type TABLE failed to create with error:
    ORA-00959: tablespace 'EXAMPLE' does not exist
    Failing sql is:
    CREATE TABLE "HR"."REGIONS" ("REGION_ID" NUMBER CONSTRAINT "REGION_ID_NN" NOT NULL
    [oracle@apps backupdp]$
    [oracle@apps backupdp]$
    now it is giving error that EXAMPLE tablespace doesnot exist .....so now should i use transporatble tablespace for to trasport example tablepsace from oracle 10g to application server 10g.
    please help.......

    Then i use Transportable tablespaces for transporting example tablespace to application server from oracle 10g.....................
    exported in oracle 10g;
    [oracle@test orcl]$ sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 30 10:08:06 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL>
    SQL> alter tablespace example read only;
    alter tablespace example read only
    ERROR at line 1:
    ORA-01644: tablespace 'EXAMPLE' is already read only
    [oracle@test dpdump]$ expdp DIRECTORY=DATA_PUMP_DIR DUMPFILE=exampletbs.dmp transport_tablespaces=example logfile=exampletbs.log version=10.1.0.4.2;
    Export: Release 10.2.0.1.0 - Production on Friday, 30 April, 2010 10:03:29
    Copyright (c) 2003, 2005, Oracle. All rights reserved.
    Username: sys as sysdba
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Starting "SYS"."SYS_EXPORT_TRANSPORTABLE_01": sys/******** AS SYSDBA DIRECTORY=DATA_PUMP_DIR DUMPFILE=exampletbs.dmp transport_tablespaces=example logfile=exampletbs.log version=10.1.0.4.2
    Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
    Processing object type TRANSPORTABLE_EXPORT/TYPE/TYPE_SPEC
    Processing object type TRANSPORTABLE_EXPORT/TABLE
    Processing object type TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT
    Processing object type TRANSPORTABLE_EXPORT/INDEX
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/COMMENT
    Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
    Processing object type TRANSPORTABLE_EXPORT/TRIGGER
    Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
    Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
    Processing object type TRANSPORTABLE_EXPORT/DOMAIN_INDEX/INDEX
    Processing object type TRANSPORTABLE_EXPORT/MATERIALIZED_VIEW
    Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PROCACT_INSTANCE
    Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PROCDEPOBJ
    Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
    Master table "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_TRANSPORTABLE_01 is:
    /d01/app/oracle/product/10.2.0/db/admin/orcl/dpdump/exampletbs.dmp
    Job "SYS"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 10:04:01
    transfer the example datafile to application server.............
    [oracle@test dpdump]$ scp exampletbs.dmp apps:/d01/backupdp/exampletbs.dmp
    oracle@apps's password:
    exampletbs.dmp 100% 3528KB 3.5MB/s 00:00
    [oracle@test dpdump]$
    [oracle@test dpdump]$
    Import in oracle application server................
    [oracle@apps backupdp]$ ls
    exampletbs.dmp hrschema.dmp hrschema.log
    [oracle@apps backupdp]$ impdp DIRECTORY=backupdp DUMPFILE=exampletbs.dmp transport_datafiles='/d01/backupdp/example01.dbf' logfile=exampletbs.log;
    Import: Release 10.1.0.4.2 - Production on Friday, 30 April, 2010 10:20
    Copyright (c) 2003, Oracle. All rights reserved.
    Username: sys as sysdba
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Production
    With the Partitioning, OLAP and Data Mining options
    Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_03" successfully loaded/unloaded
    Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_03": sys/******** AS SYSDBA DIRECTORY=backupdp DUMPFILE=exampletbs.dmp transport_datafiles=/d01/backupdp/example01.dbf logfile=exampletbs.log
    Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
    ORA-39123: Data Pump transportable tablespace job aborted
    ORA-00721: changes by release 10.2.0.1.0 cannot be used by release 10.1.0.2.0
    Job "SYS"."SYS_IMPORT_TRANSPORTABLE_03" stopped due to fatal error at 10:21
    [oracle@apps backupdp]$
    [oracle@apps backupdp]$ more exampletbs.log
    Import: Release 10.1.0.4.2 - Production on Friday, 30 April, 2010 10:20
    Copyright (c) 2003, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Producti
    on
    With the Partitioning, OLAP and Data Mining options
    Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_03" successfully loaded/unloaded
    Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_03": sys/******** AS SYSDBA DIRECTORY=ba
    ckupdp DUMPFILE=exampletbs.dmp transport_datafiles=/d01/backupdp/example01.dbf log
    file=exampletbs.log
    Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
    ORA-39123: Data Pump transportable tablespace job aborted
    ORA-00721: changes by release 10.2.0.1.0 cannot be used by release 10.1.0.2.0
    Job "SYS"."SYS_IMPORT_TRANSPORTABLE_03" stopped due to fatal error at 10:21
    [oracle@apps backupdp]$
    please can anybody help........................

  • Secure drop Tablespace without any dictionary reference

    Hi all,
    I need some help to drop tablespaces without any object reference to them or without any segment into them.
    I wrote below select statement to obtain those tablespaces:
    select tablespace_name, sum(cnt) cnt from
    select tablespace_name, count(0) cnt from dba_tables group by tablespace_name
    union all
    select tablespace_name, count(0) cnt from dba_indexes group by tablespace_name
    union all
    select tablespace_name, count(0) cnt from dba_tab_partitions group by tablespace_name
    union all
    select tablespace_name, count(0) cnt from dba_ind_partitions group by tablespace_name
    union all
    select tablespace_name, 0 cnt from dba_tablespaces
    group by tablespace_name
    order by cnt
    /Can you give any advise if I am missing another type of segment?
    Oracle Database 11g 11.2.0.1
    Thanks in advance.
    Juan M
    Edited by: johnxjean on Aug 23, 2012 11:40 AM

    johnxjean wrote:
    Hi all,
    I need some help to drop tablespaces without any object reference to them or without any segment into them.
    I wrote below select statement to obtain those tablespaces:
    select tablespace_name, sum(cnt) cnt from
    select tablespace_name, count(0) cnt from dba_tables group by tablespace_name
    union all
    select tablespace_name, count(0) cnt from dba_indexes group by tablespace_name
    union all
    select tablespace_name, count(0) cnt from dba_tab_partitions group by tablespace_name
    union all
    select tablespace_name, count(0) cnt from dba_ind_partitions group by tablespace_name
    union all
    select tablespace_name, 0 cnt from dba_tablespaces
    group by tablespace_name
    order by cnt
    /Can you give any advise if I am missing another type of segment?
    Oracle Database 11g 11.2.0.1
    Thanks in advance.
    Juan M
    Edited by: johnxjean on Aug 23, 2012 11:40 AMSELECT TABLESPACE_NAME FROM DBA_TABLEPACES
    MINUS
    SELECT TABLESPACE_NAME FROM DBA_SEGMENTS;
    -- above produces list of tablespaces that contain no objects

  • How to a drop tablespace ?????

    Hi Expert !!
    I am living my life in ORA errors. To describe the complete picture:
    1) We have a partitioned table whose partitions reside in multiple tablespaces.
    2) One of the datafiles got corrupted where one old partition resides.
    3) We are not interested in restoring the corrupt datafile and no more require that partition.
    4) How do I drop the partition or tablespace?
    Well, I have tried the following but no success:
    startup mount
    alter database datafile 'C:\MYDB\DATA\SALES_2005_TS1.DBF' offline;
    alter database open;
    conn sales/sales
    SQL> ALTER TABLE sales_range DROP PARTITION sales_2005 update global indexes;
    ALTER TABLE sales_range DROP PARTITION sales_2005 update global indexes
    ERROR at line 1:
    ORA-00376: file 7 cannot be read at this time
    ORA-01110: data file 7: 'C:\MYDB\DATA\SALES_2005_TS1.DBF'
    SQL> conn /as sysdba
    Connected.
    SQL> drop tablespace sales_2005_ts including contents;
    drop tablespace sales_2005_ts including contents
    ERROR at line 1:
    ORA-14404: partitioned table contains partitions in a different tablespace
    SQL> alter tablespace SALES_2005_TS offline;
    alter tablespace SALES_2005_TS offline
    ERROR at line 1:
    ORA-01191: file 7 is already offline - cannot do a normal offline
    ORA-01110: data file 7: 'C:\MYDB\DATA\SALES_2005_TS1.DBF'
    SQL> alter tablespace SALES_2005_TS offline immediate;
    Tablespace altered.
    SQL> drop tablespace SALES_2005_TS including contents;
    drop tablespace SALES_2005_TS including contents
    ERROR at line 1:
    ORA-14404: partitioned table contains partitions in a different tablespace
    I did search on net and metalink but unfortunately couldn't find anything useful. I did try metalink note 267125.1 but again no luck.
    Could any of you shed some light on this?
    Regards

    What about the following :
    SQL> create tablespace test1 datafile 'E:\oracle\oradata\DEMO102\test01.dbf' size 1m;
    Tablespace created.
    SQL> create tablespace test2 datafile 'E:\oracle\oradata\DEMO102\test02.dbf' size 1m;
    Tablespace created.
    SQL> create table x ( x number not null, y number not null ) partition by list (y) ( partition p1 va
    lues (1,2,3) tablespace test1, partition p2 values (4,5,6) tablespace test2);
    Table created.
    SQL> insert into x values (1,3);
    1 row created.
    SQL> insert into x values (2,6);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from x;
             X          Y
             1          3
             2          6
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> host del E:\oracle\oradata\DEMO102\test02.dbf
    SQL> startup
    ORACLE instance started.
    Total System Global Area  272629760 bytes
    Fixed Size                  1290084 bytes
    Variable Size             234881180 bytes
    Database Buffers           29360128 bytes
    Redo Buffers                7098368 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
    ORA-01110: data file 10: 'E:\ORACLE\ORADATA\DEMO102\TEST02.DBF'
    SQL> alter database datafile 'E:\oracle\oradata\DEMO102\test02.dbf' offline;
    Database altered.
    SQL> alter database open;
    Database altered.
    SQL> select * from x;
    ERROR:
    ORA-00376: file 10 cannot be read at this time
    ORA-01110: data file 10: 'E:\ORACLE\ORADATA\DEMO102\TEST02.DBF'
    no rows selected
    --At this point, I reproduced your problem
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area  272629760 bytes
    Fixed Size                  1290084 bytes
    Variable Size             239075484 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                7098368 bytes
    Database mounted.
    SQL> alter database datafile 'E:\oracle\oradata\DEMO102\test02.dbf' offline drop;
    Database altered.
    SQL> alter database open;
    Database altered.
    SQL> drop tablespace test2 including contents;
    drop tablespace test2 including contents
    ERROR at line 1:
    ORA-14404: partitioned table contains partitions in a different tablespace
    SQL> alter table x drop partition p2;
    Table altered.
    SQL> drop tablespace test2;
    Tablespace dropped.
    SQL> create table x1 as select * from x;
    Table created.
    SQL> select * from x;
             X          Y
             1          3
    SQL> Nicolas.

  • Restore the dropped tablespace using RMAN?

    Hello,
    I have done a oracle tablespace re-org for PSAPPOOLD,PSAPPOOLI. Now I want to restore only the OLD PSAPPOOLD,PSAPPOOLI tablespace using TAPE backup via RMAN. 
    The probelm is I have dropped the old tablespace during re-org which is a part of the re-org. Is it possible to restore the dropped tablespace using RMAN?
    My Oracle version is 9.2.05
    if anyone has done this before, please share your valuable ideas.
    I wrote the below script for the restore.
    run {
    allocate channel ch1 type sbt_tape;
    startup nomount
    restore controlfile; -
    >(I guess,if I restore old control file, I might get old structure which help the restore of TB)
    alter database mount ;
    restore tablespace PSAPPOOLD,PSAPPOOLI;
    recover tablespace PSAPPOOLD,PSAPPOOLI;;
    release channel ch1;
    Thanks,
    Arjun
    Edited by: Arjun Venkateswarlu on Jul 31, 2009 6:40 PM

    > I have done a oracle tablespace re-org for PSAPPOOLD,PSAPPOOLI. Now I want to restore only the OLD PSAPPOOLD,PSAPPOOLI tablespace using TAPE backup via RMAN. 
    >
    > The probelm is I have dropped the old tablespace during re-org which is a part of the re-org. Is it possible to restore the dropped tablespace using RMAN?
    Hello Arjun,
    why would you want to do this?
    What is is you want to achieve by this action?
    BTW: it's not possible to do that.
    Check [Performing RMAN Tablespace Point-in-Time Recovery|http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmtspit.htm].
    You want a "Tablespace point in time recovery" (TSPITR) for a dropped tablespace and that is just not possible with RMAN.
    So, the easiest way for you to get this tablespace back would be to restore and recover the database to a different host.
    Ah, while we're at it: using RMAN outside the BRTOOLS is not supported by SAP - so you better be a wiz with it because there won't be much help in case anything does not work.
    regards,
    Lars

  • Automatic deleting of datafiles after DROP TABLESPACE

    Lazy junior dba question. How can i order oracle to delete files automaticly after deleting them from control file (like drop tablespace command)?
    What technology/approach should I use? Can ASM help me?
    Thnaks.

    Well, ideally after issuing
    DROP TABLESPACE <TBS_NAME> INCLUDING CONTENTS AND DATAFILES; the datafiles corresponding to that tablespace should get deleted automatically. Although, in my case, sometimes it gets deleted automatically, but sometimes it doesn't(Windows Server).
    Comments from others will be useful.
    Regards,
    Anand

Maybe you are looking for

  • Image processing - doubling frequency?

    There's some image processing commands in photoshop, like high pass and blur (i.e. low pass). I want more. Is there a way to achieve frequency doubling, or better yet, frequency x N where N is any number the user can specify? This may be useful for m

  • Trouble Connecting To My Router.

    Sorry people of Mac. This is actually a question regarding my Windows desktop but I'm asking here since everyone here is so speedy and smart I installed a new Netgear wireless PCI adaptor onto my desktop (the previous one broke). My older adaptor (Be

  • Bill required for warranty?

    is bill required for warranty?

  • Please tell me anything wrong in this query please help me follwing query

    SELECT o100161.ORG_STRUCTURE_VERSION_ID as E100351,AVG(o100163.PLANNED) as E100360_AVG,AVG(o100163.ACTUAL) as E100180_AVG,( SUM(fx102) )-( SUM(fx103) ) as C_1,( SUM(fx105) )-( SUM(fx106) ) as C_2,( SUM(fx108) )-( SUM(fx109) ) as C_3 FROM ( SELECT o10

  • Converting a two system landscape to three system landscape

    Currently, I have a two system landscape: DEV (development)  and PRD (production) in STMS I would like to add a QAS system so I will end up with DEV-QAS-PRD in STMS I would like to keep all data the way it is. I don't want to lose any logs or files i