Cannot drop tablespace

I cannot drop the tablespace create earlier today by me. The tablespace have 2 files and they are empty. Here is the case.
Thansk a lot,mj
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
SYSTEM
UNDOTBS1
SYSAUX
TEMP
ADDR_IX2
CFG_DATA
CFG_IX
TS_ATTR_IX
TS_Nums_DT
TS_NAME_DT
TS_INSERT_ONLY_DT
11 rows selected.
Elapsed: 00:00:00.01
SQL> drop tablespace TS_Nums_DT INCLUDING CONTENTS and datafiles;
drop tablespace TS_Nums_DT INCLUDING CONTENTS and datafiles
ERROR at line 1:
ORA-00959: tablespace 'TS_NUMS_DT' does not exist

As Aron says, there may be other, non-printing, characters in the name. You can check this by running:
SELECT DUMP(tablespace_name)
FROM dba_tablespaces
WHERE tablespace_name like 'TS\_N%' ESCAPE '\'Which will give you the ascii values of the characters in the tablespace name like this:
SQL> SELECT DUMP(tablespace_name)
  2  FROM dba_tablespaces
  3  WHERE tablespace_name = 'ONECALL';
DUMP(TABLESPACE_NAME)
Typ=1 Len=7: 79,78,69,67,65,76,76
              O  N  E  C  A  L  LHTH
John

Similar Messages

  • 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).

  • Cannot drop old undo tablespace. Cause: active rollback segment

    dear all.
    db: oracle 10.2.0.1
    os: rhel as version 5 64 bits.
    This is a testing database. And my database is online and open. But i can free the external usb disk that contains my ols undotbs.
    I want to drop old undo tablespace but this is not possible.
    1.- In order to open my database i had my datafile( '/mnt/hdext/back_plelds/undotbs02.dbf') offline drop, and then i can to open my database.
    2.- When i try to delete my old undo tablespace im getting this error:
    SQL> drop tablespace undotbs1 including contents and datafiles;
    drop tablespace undotbs1 including contents and datafiles
    ERROR at line 1:
    ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping
    tablespace
    3.- My default undo_tablespace is another that i was created before step 1.
    SQL> sho parameter undo_ta
    NAME TYPE VALUE
    undo_tablespace string UNDOTMP
    SQL>
    Well i search in metalink ORA-01548 code error and in 18947.1 doc whows me that the solution is:
    Action: Shut down instances that use the active rollback segments in the
    tablespace and then drop the tablespace.
    4.- I try to shutdown but im getting:
    SQL> shutdown immediate;
    ORA-00376: file 10 cannot be read at this time
    ORA-01110: data file 10: '/mnt/hdext/back_plelds/undotbs02.dbf'
    SQL>
    This /mnt/hdext is an external USB disk and i have all permissions. I exported tables without any problem and i can read all files.
    i search un metalink again ora codes (ORA-00376 ORA-01110) and the doc id: 427801.1 shows in the solution:
    Drop the old undo tablespace instead of making it offline.
    but when i try to drop the tablespace it shows the error describe in the step 2.
    Facts:
    - my tablespace UNDOTBS1 is ONLINE. I put in offline and this is not the solution.
    - This is the status of my rollback segments:
    SQL> select segment_name, status from dba_rollback_segs where
    2 tablespace_name='UNDOTBS1';
    SEGMENT_NAME STATUS
    _SYSSMU1$                      NEEDS RECOVERY
    _SYSSMU2$                      NEEDS RECOVERY
    _SYSSMU3$                      NEEDS RECOVERY
    _SYSSMU4$                      NEEDS RECOVERY
    _SYSSMU5$                      NEEDS RECOVERY
    _SYSSMU6$                      NEEDS RECOVERY
    _SYSSMU7$                      NEEDS RECOVERY
    _SYSSMU8$                      NEEDS RECOVERY
    _SYSSMU9$                      NEEDS RECOVERY
    _SYSSMU10$                     NEEDS RECOVERY
    _SYSSMU11$                     OFFLINE
    SEGMENT_NAME STATUS
    _SYSSMU12$                     OFFLINE
    12 rows selected.
    SQL>
    - I have the note (Unable to drop und tablespace In this article describe the problem but this is not the same. The difference is that i cannot drop the rollback segment that describe in step 2.
    SQL> drop rollback segment "_SYSSMU1$";
    drop rollback segment "_SYSSMU1$"
    ERROR at line 1:
    ORA-30025: DROP segment '_SYSSMU1$' (in undo tablespace) not allowed
    in metalink the doc id: 173696.1 shows the solution:
    Action:     Check the undo segment name and reissue statement if necessary.
    i cannot drop the rollback_segment
    What can i do ???
    thanks a lot.

    in step 4 did you try with shutdown abort?
    If its still does not work then create another new table space with new file and then swtich to that tablespace http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm#sthref1504Khurram

  • Cannot drop undo tablespace with Active extents but no active sessions

    Hi all,
    I am running on 10gr2 oracle database in a Linux 32 bit environment.
    I have a corrupted undo datafile. I've been able to recover the datafile but still the alert logs is still showing that it is corrupted.
    Now what I'm trying to do is to drop the old undo tablespace like the one discussed here Change undo tablespace in Oracle - Switch Oracle's Undo tablespace.
    My problem is I have an Active extent but no active session corresponding to it:
    SYS@ccasdb AS SYSDBA > SELECT a.name,b.status
    FROM   v$rollname a,v$rollstat b
    WHERE  a.usn = b.usn
    AND    a.name IN (
                      SELECT segment_name
                      FROM dba_segments
                      WHERE tablespace_name = 'UNDOTBS1'
                     );  2    3    4    5    6    7    8
    NAME                           STATUS
    _SYSSMU18$                     PENDING OFFLINE
    SYS@ccasdb AS SYSDBA > SELECT a.name,b.status , d.username , d.sid , d.serial#
      2  FROM   v$rollname a,v$rollstat b, v$transaction c , v$session d
      3  WHERE  a.usn = b.usn
      4  AND    a.usn = c.xidusn
      5  AND    c.ses_addr = d.saddr
      6  AND    a.name IN (
      7               SELECT segment_name
      8               FROM dba_segments
      9               WHERE tablespace_name = 'UNDOTBS1'
    10              );
    no rows selected
    but still cannot drop the undotablespace.
    SYS@ccasdb AS SYSDBA > drop tablespace UNDOTBS1 including contents and datafiles;
    drop tablespace UNDOTBS1 including contents and datafiles
    ERROR at line 1:
    ORA-30013: undo tablespace 'UNDOTBS1' is currently in use
    Regards,
    Tim

    Yes i was able to recover the datafile but the alert_log kept on prompting that it is still corrupted. The datafile's status is online.
    I want to kill the session/s contributing to the PENDING OFFLINE status of the rollback segment so I can already drop the undotablespace and so
    that the alert log will stop prompting for that corrupted datafile in that UNDOTABLESPACE.
    Can i Just alter the tablespace's datafiles to offline drop then just drop it. Then I drop the tablespace?

  • Cannot drop undo tablespace

    Hello:
    I've created a new undo tablespace undotbs2. I've set it to the default undo tablespace. When I've tried to drop the old one, I get the following error:
    SQL> conn / as sysdba
    Connected.
    SQL> DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES;
    DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES
    ERROR at line 1: ORA-01548: active rollback segment '_SYSSMU7$' found, terminate dropping tablespace
    This is a production database. The service is down because the partition with the Oracle tablespaces: system, undo, temp, etc is full.
    After shutting down the database the problem persist: I cannot drop the old undo tablespace because of the same error.
    I've followed the note 1321093.1. Here the query results:
    Select segment_name, status, tablespace_name, rs.segment_id
    from dba_rollback_segs rs
    where status not in ('ONLINE','OFFLINE');
    _SYSSMU7$ PARTLY AVAILABLE UNDOTBS1 7
    SELECT KTUXEUSN, KTUXESLT, KTUXESQN, /* Transaction ID */ KTUXESTA Status, KTUXECFL Flags
    FROM x$ktuxe
    WHERE ktuxesta !='INACTIVE' AND ktuxeusn =7;
    7 47 382687 ACTIVE DEAD
    SELECT LOCAL_TRAN_ID,GLOBAL_TRAN_ID,STATE,MIXED,COMMIT# FROM DBA_2PC_PENDING;
    No rows
    SELECT LOCAL_TRAN_ID,IN_OUT,DATABASE,INTERFACE FROM dba_2pc_neighbors;
    No rows
    As you can see, there is no pending transactions. No application is connected to the database (service is down), however the database is appling rollbacks since 2 days.
    A lot of archivelogs are being created at rolling back (30 GB archivelogs per hour). Here a tail of the alertlog file:
    Wed Apr 17 06:19:53 2013
    Thread 1 advanced to log sequence 7382
    Current log# 5 seq# 7382 mem# 0: /ora2/origlogs/webfrbr/redo05_m1.log
    Current log# 5 seq# 7382 mem# 1: /ora3/mirrorlogs/webfrbr/redo05_m2.log
    Wed Apr 17 06:21:16 2013
    Thread 1 advanced to log sequence 7383
    Current log# 6 seq# 7383 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
    Current log# 6 seq# 7383 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
    Wed Apr 17 06:22:41 2013
    Thread 1 advanced to log sequence 7384
    Current log# 4 seq# 7384 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
    Current log# 4 seq# 7384 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
    Wed Apr 17 06:24:02 2013
    Thread 1 advanced to log sequence 7385
    Current log# 5 seq# 7385 mem# 0: /ora2/origlogs/webfrbr/redo05_m1.log
    Current log# 5 seq# 7385 mem# 1: /ora3/mirrorlogs/webfrbr/redo05_m2.log
    Wed Apr 17 06:25:24 2013
    Thread 1 advanced to log sequence 7386
    Current log# 6 seq# 7386 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
    Current log# 6 seq# 7386 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
    Wed Apr 17 06:26:46 2013
    Thread 1 advanced to log sequence 7387
    Current log# 4 seq# 7387 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
    Current log# 4 seq# 7387 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
    Oracle Database - Enterprise Edition 10.2.0.3
    Linux x86-64 Oracle Linux 5
    Please, consider the output of the following queries too:
    select * from V$FAST_START_TRANSACTIONS
    USN 7 -- Undo segment number of the transaction
    SLT 47 -- Slot within the rollback segment
    SEQ 382687 -- Incarnation number of the slot
    STATE RECOVERING --
    UNDOBLOCKSDONE 0 -- Number of undo blocks completed on the transaction
    UNDOBLOCKSTOTAL 2079151 -- Total number of undo blocks that need recovery
    PID 15 -- ID of the current server it has been assigned to
    CPUTIME 1153 -- Time for which recovery has progressed (in seconds)
    PARENTUSN 0 -- Undo segment number of the parent transaction in PDML
    PARENTSLT 0 -- Slot of the parent transaction in PDML
    PARENTSEQ 0 -- Sequence number of the parent transaction in PDML
    XID 07002F00DFD60500 -- Transaction ID
    PXID 0000000000000000 -- Parent transaction ID
    RCVSERVERS 1 -- Number of servers used in the last recovery
    select * from x$ktuxe where ktuxecfl = 'DEAD';
    ADDR 00002B3E808B9BD8
    INDX 145
    INST_ID 1
    KTUXEUSN 7
    KTUXESLT 47
    KTUXESQN 382687
    KTUXERDBF 2
    KTUXERDBB 2080076
    KTUXESCNB 424110769
    KTUXESCNW 0
    KTUXESTA ACTIVE
    KTUXECFL DEAD
    KTUXEUEL 3739
    KTUXEDDBF 0
    KTUXEDDBB 0
    KTUXEPUSN 0
    KTUXEPSLT 0
    KTUXEPSQN 0
    KTUXESIZ 2079151
    select * from v$fast_start_servers;
    RECOVERING 0 15 07002F00DFD60500
    IDLE 0 16 0000000000000000
    IDLE 0 17 0000000000000000
    IDLE 0 18 0000000000000000
    IDLE 0 19 0000000000000000
    IDLE 0 20 0000000000000000
    IDLE 0 21 0000000000000000
    IDLE 0 22 0000000000000000
    IDLE 0 25 0000000000000000
    IDLE 0 26 0000000000000000
    IDLE 0 27 0000000000000000
    IDLE 0 28 0000000000000000
    IDLE 0 29 0000000000000000
    IDLE 0 30 0000000000000000
    IDLE 0 31 0000000000000000
    IDLE 0 32 0000000000000000
    Any ideas to solve this issue?
    Thank you in advance
    Edited by: albrotar on Apr 17, 2013 1:48 AM
    Edited by: albrotar on Apr 17, 2013 1:49 AM
    Edited by: albrotar on Apr 17, 2013 1:51 AM
    Edited by: albrotar on Apr 17, 2013 1:52 AM
    Edited by: albrotar on Apr 17, 2013 1:54 AM

    I've found some errors in alert log file occurred at shutting down the database:
    +...+
    Control autobackup written to DISK device
    handle '/orabck/rman/webfrbr/ora_cfc-3587726327-20130414-00'
    Completed: CREATE UNDO TABLESPACE undotbs2 DATAFILE '/orabck/undo/undotbs02.dbf'
    SIZE 500M reuse autoextend ON NEXT 5M maxsize 32767M
    Sun Apr 14 15:46:43 2013
    Successfully onlined Undo Tablespace 5.
    Undo Tablespace 1 moved to Pending Switch-Out state.
    *** active transactions found in undo tablespace 1 during switch-out.
    Sun Apr 14 15:46:44 2013
    ALTER SYSTEM SET undo_tablespace='UNDOTBS2' SCOPE=BOTH;
    Sun Apr 14 16:11:42 2013
    ALTER ROLLBACK SEGMENT "_SYSSMU7$" offLINE
    Sun Apr 14 16:11:42 2013
    Completed: ALTER ROLLBACK SEGMENT "_SYSSMU7$" offLINE
    Sun Apr 14 16:12:36 2013
    DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES
    Sun Apr 14 16:12:36 2013
    +...+
    Thread 1 advanced to log sequence 5107
    Current log# 4 seq# 5107 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
    Current log# 4 seq# 5107 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
    Sun Apr 14 19:00:28 2013
    Stopping background process CJQ0
    Sun Apr 14 19:00:29 2013
    Stopping background process QMNC
    Sun Apr 14 19:00:31 2013
    Stopping background process MMNL
    Sun Apr 14 19:00:32 2013
    Stopping background process MMON
    Sun Apr 14 19:00:34 2013
    Shutting down instance (immediate)
    License high water mark = 31
    Sun Apr 14 19:00:34 2013
    Stopping Job queue slave processes
    Sun Apr 14 19:00:34 2013
    Job queue slave processes stopped
    All dispatchers and shared servers shutdown
    Sun Apr 14 19:00:42 2013
    ALTER DATABASE CLOSE NORMAL
    Sun Apr 14 19:04:28 2013
    +...+
    Thread 1 advanced to log sequence 5118
    Current log# 6 seq# 5118 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
    Current log# 6 seq# 5118 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
    Sun Apr 14 20:11:21 2013
    Errors in file /ora1/admin/webfrbr/bdump/webfrbr_smon_4629.trc:
    +ORA-07445: exception encountered: core dump [_intel_fast_memcpy.A()+10] [SIGSEGV] [Invalid permissions for mapped object] [0x2B6B66003000] [] []+*
    Sun Apr 14 20:11:21 2013
    Errors in file /ora1/admin/webfrbr/bdump/webfrbr_smon_4629.trc:
    ORA-00600: internal error code, arguments: [999], [0x107C14015], [], [], [], [], [], []*
    +ORA-07445: exception encountered: core dump [_intel_fast_memcpy.A()+10] [SIGSEGV] [Invalid permissions for mapped object] [0x2B6B66003000] [] []+*
    Sun Apr 14 20:11:22 2013
    +...+
    Sun Apr 14 20:11:48 2013
    Errors in file /ora1/admin/webfrbr/bdump/webfrbr_pmon_4617.trc:
    ORA-00474: SMON process terminated with error
    Sun Apr 14 20:11:48 2013
    +...+
    The instance could start up, but after this, it is recovering undo and generating redo since 2 days

  • Cannot drop old undo tablespace.

    Hello friends ,
    i Cannot drop old undo tablespace. While dropping the old undo tablespace we get an error
    ERROR at line 1:
    ORA-01548: active rollback segment '_SYSSMU77$' found, terminate dropping
    tablespace
    Please help
    Thanks

    Here's a blog post that may help you:
    http://davidalejomarcos.wordpress.com/2010/11/09/ora-01548-active-rollback-segment-syssmu1xxxx-found-terminate-dropping-tablespace-while-deleting-undotbs/

  • 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

  • Cannot drop or resıze datafile

    Hi
    My tablespace has 6 datafiles, and I moved every object to other segments.
    However there are still objects, in this tablespace and I cannot make the datafile smaller or drop the datafile because of these objects.
    What should I do?
    select
    owner,
    file_id,
    block_id end_block,
    round(block_id * &m_block_size/1048576) possible_hwm,
    segment_type,
    segment_name,
    partition_name
    from
    dba_extents
    where
    tablespace_name = 'DATA_AR'
    order by
    file_id, block_id
    file_id end_block hwm segment_type segment_name
    16,1889,15,LOBSEGMENT,SYS_LOB0000069294C00046$$,
    16,1897,15,LOBINDEX,SYS_IL0000069294C00046$$,
    16,1937,15,LOBSEGMENT,SYS_LOB0000069299C00002$$,
    16,1945,15,LOBSEGMENT,SYS_LOB0000069299C00002$$,
    16,1953,15,LOBINDEX,SYS_IL0000069299C00002$$,
    16,2605825,20,358,LOBSEGMENT,SYS_LOB0000071665C00003$$,
    16,2605833,20,358,LOBSEGMENT,SYS_LOB0000071665C00003$$,
    16,2605841,20,358,LOBINDEX,SYS_IL0000071665C00003$$,
    16,2619665,20,466,TABLE,PLAN_TABLE,
    16,2619673,20,466,TABLE,PLAN_TABLE,
    16,2619769,20,467,LOBSEGMENT,SYS_LOB0000071702C00014$$,
    16,2619777,20,467,LOBINDEX,SYS_IL0000071702C00014$$,
    16,2619881,20,468,TABLE,SQLN_EXPLAIN_PLAN,
    16,2619889,20,468,TABLE,SQLN_EXPLAIN_PLAN,One thing I also didnt understand that all objects are in file_id 16 but I cannot drop other datafiles or resize other datafiles in this tablespace
    since they are empty!!

    You also may want to read the following Metalink note :
    How to move LOB Data to Another Tablespace Doc ID: Note:130814.1
    Or the LOB parameter of the ALTER TABLE statement.
    Nicolas.

  • 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.

  • Need help--drop tablespace

    all,
    I need to drop a tablespace but got the error from oracle:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00376: file 3 cannot be read at this time
    ORA-01110: data file 3: 'C:\ORACLE\ORADATA\LOCALRED\UNDOTBS02.DBF'

    Try the commands:
    1 - startup mount
    2 - alter database datafile
    'C:\ORACLE\ORADATA\LOCALRED\UNDOTBS02.DBF' offline drop
    3 - alter database open
    4 - drop tablespace <tablespace> including contents [cascade constraints]

  • Unable to drop datafile after dropping tablespace

    Hi All,
    Trying to Drop tablespace with Datafile, command used is as below
    drop tablespace tims_db including contents and datafiles;
    this was executed successfully, but still the datafile exists... tried dropping from OS, but unable to delete the file... associated trace alert logs are as below
    Dump file c:\oracle\admin\ocprd\udump\ocprd_ora_4236.trc
    Mon Feb 06 03:40:58 2012
    ORACLE V9.2.0.6.0 - Production vsnsta=0
    vsnsql=12 vsnxtr=3
    Windows 2000 Version 5.0 Service Pack 4, CPU type 586
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    Windows 2000 Version 5.0 Service Pack 4, CPU type 586
    Redo thread mounted by this instance: 1
    Oracle process number: 14
    Windows thread id: 4236, image: ORACLE.EXE
    *** 2012-02-06 03:40:58.562
    *** SESSION ID:(52.7127) 2012-02-06 03:40:58.500
    ORA-01259: unable to delete datafile E:\ORACLE\ORADATA\OCPRD\TIMSDB01.DBF
    ORA-27056: skgfrdel: could not delete file
    OSD-04024: Unable to delete file.
    O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.
    OS : Windows 2000
    DB : Oracle 9i
    Please help
    Thanks

    user1687821 wrote:
    As this is a production instance, we need approval to bounce it, If you are sure this file isn't needed - unlock with unlocker and move to some place for a while. Then kill it or kill it immediatly.
    Secondly will the database ask for missing datafile when restarted the database even if it is not listed in dba_data_files...?If your tbs drop was successfull - everything will be fine

  • Possible drop tablespace PSAPSR3702 after upgrade EHP5

    Hi experts,
    Can I drop tablespace PSAPSR3702 after upgrade EHP5? I cannot found this point in EHP5 installation documents as in the EHP4 documents
    My system is running on Oracle
    Thanks & Regards,
    Luong
    Edited by: LuongDK on Aug 25, 2011 4:40 AM

    Hi LuongDK,
    If you see clearly after refresh your DB size stat, you should see PSAPSR3701 is empty OR with very small size compare to PSAPSR3702.
    Therefore, you should drop PSAPSR3701 and NOT PSAPSR3702. You can confirm by ensuring no entry for PSAPSR3701 in table TAORA & IAORA.
    Thanks,
    Nicholas Chang

  • ORA-00604 error occured at recursive level1,ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,ORA-06512

    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad

    26bffcad-f9a2-4dcf-afa0-e1e33d0281bf wrote:
    Dear All,
         I created one table like
    create table cls_lrn_tab_unique (F_no number unique UK_F_NO );
    after performing some operations I want to delete the same.
    At that time i got following error. Please help me and tell what is the reason for the error.
    ORA-00604 error occured at recursive level1
    ORA-20123 Insufficient privileges: you cannot drop table cls_lrn_tab_unique TABLE,
    ORA-06512 at line no 2
    Thanks and Regards
    Prasad
    ORA-20123 is a localized/customized error code & message; therefore any solution depends upon what is unique inside your DB now.
    I suspect that some sort of TRIGGER exists, which throws posted error, but this is just idle speculation on my part.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Cannot drop table

    Versions are Oracle 11.2.0.1.0 and SQL Developer 4.0.0.12 on Windows 7 Ultimate SP1.
    Hi
    I'm following the CBT Nuggets SQL Fundementals training (video #11) and cannot drop a table I have just created.  The command executed and error are:
    drop table newprods;
    Error starting at line : 1 in command -
    drop table newprods
    Error report -
    SQL Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-20000: Cannot drop object
    ORA-06512: at line 2
    00604. 00000 -  "error occurred at recursive SQL level %s"
    *Cause:    An error occurred while processing a recursive SQL statement
               (a statement applying to internal dictionary tables).
    *Action:   If the situation described in the next error on the stack
               can be corrected, do so; otherwise contact Oracle Support.
    As the HR user I created two tables and created a FK constraint between them.  After truncating the table with this FK, I am unable to drop it.  Even if I remove the FK, the error is the same.  Issing the command in SQL*Plus gives the same error.
    This is the first time I have created any tables since installing Oracle on this machine and is my first attempt at dropping a table.  I have not created any sequences, triggers or views based on these newly created tables.
    Does anyone have any ideas?
    Cheers

    C:\Oracle>sqlplus hr@orcl
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Sep 4 18:58:55 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> CREATE TABLE table1 (column1 VARCHAR2(20 BYTE));
    Table created.
    SQL> select * from table1;
    no rows selected
    SQL> drop table table1;
    drop table table1
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20000: Cannot drop object
    ORA-06512: at line 2
    SQL>
    Can I run a query to see if there are any triggeres on the table?
    EDIT: Ok it looks like no triggers:
    SQL> show user
    USER is "SYS"
    SQL> select * from DBA_TRIGGERS where table_name like '%table1%';
    no rows selected
    SQL> select * from USER_TRIGGERS where table_name like '%table1%';
    no rows selected

  • Undable to drop tablespace ORA-01561: failed to remove all objects in the

    hi,
    i am unable to drop table tablespace how can i do that??
    please advise
    DROP TABLESPACE tbs_tp2 INCLUDING CONTENTS AND datafiles
    ERROR at line 1:
    ORA-01561: failed to remove all objects in the tablespace specified
    Thanks in advance
    siva
    chennai

    Have you tried dropping the objects individually? You can see which objects still belong to this tablespace by using the DBA_SEGMENTS view as shown below:
    SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME
    FROM DBA_SEGMENTS
    WHERE TABLESPACE_NAME=tbs_tp2;HTH!

Maybe you are looking for

  • Transfer of Contacts

    I would like to move contacts and personal calendars from a personal iphone to a work iphone.  However, when doing the transfer of contacts I DO NOT want to delete my exsiting contacts or work calendar that are currently stored on the work iPhone. An

  • Photoshop Elements Organizer won't open on Windows 7

    It was working fine one day, I was adding pictures and actually was ordering prints through Shutterfly and came back to computer and organizer wouldn't open.  Any suggestions with out reloading software? Pam

  • Can't see some tables name from connection navigation

    I use sql developer to connect 10g database, I have 50 tables within a user, but it only shows 27 tables. I don't know why. Can anyone tell me ? Thx

  • No FireWire after 10.5.6 update

    my LaCie external HD cannot be mount after 10.5.6 update. i.e. can't mount by firewire 400/800 only work for USB do U know how to solve it?

  • Trouble with ebay

    Major problems with eBay using Firefox - error message =forbidden or sends me to Chinese site have had multiple problems accessing eBay with Firefox No problems with Explorer - prefer Firefox though