DROPING A TABLESPACE

Dear all,
can you please tell me how to drop a tablespace which has materialized views.I tried the following
drop tablespace portal including contents and datafiles;
but i get the following error message
SQL> drop tablespace portal including contents and datafiles;
drop tablespace portal including contents and datafiles
ERROR at line 1:
ORA-23515: materialized views and/or their indices exist in the tablespace
there are about 200 indices in the tablespace dropping the all one by one is very cumbersome.Is there any other way i can do this and drop the tablespace.Thanks in advance.
Regards
Prasanna.N

Hey!!!
SQL> alter tablespace <tbname> offline;
Tablespace altered
SQL> drop tablespace <tbname> including contents;
drop tablespace BLUH including contents
ORA-23515: materialized views and/or their indices exist in the tablespace
Try the below script...
SQL> select ‘drop materialized view ‘||owner||’.'||name||’ PRESERVE TABLE;’ from dba_registered_snapshots where name in (select table_name from dba_tables where tablespace_name = ‘tbname’);
drop materialized view ABC.CB_BLUH_DM_DATE_VW PRESERVE TABLE;
drop materialized view ABC.CB_BLUH_ROLE_VW PRESERVE TABLE;
drop materialized view ABC.CB_BLUH_DM_INTER_VW PRESERVE TABLE;
[After MVs were dropped]
SQL> drop tablespace <tbname> including contents
ORA-02449: unique/primary keys in table referenced by foreign keys
SQL> drop tablespace tbname including contents and datafiles CASCADE CONSTRAINTS;
Tablespace dropped
Regards,
Hari
Edited by: user8658506 on Oct 19, 2010 3:15 AM

Similar Messages

  • Error while Droping Undo Tablespace.

    Hi,
    I come across following error while droping UNDO tablesapce-
    ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping tablespace
    Before droping above tablespace I created a new tablespace and set UNDO_TABLESPACE=<new Tablespace>.
    I even tried to drop the UNDO tablespace after restarting instance, but no vail.
    Any workaround?
    Thanks,

    the problem's details :
    SVRMGR> select segment_name,status,tablespace_name from dba_rollback_segs where
    status='NEEDS RECOVERY';
    SEGMENT_NAME STATUS TABLESPACE_NAME
    OKRBS NEEDS RECOVERY TS_OKRBS
    1 row selected.
    SVRMGR> drop rollback segment OKRBS;
    drop rollback segment OKRBS
    ORA-01545: rollback segment 'OKRBS' specified not available
    SVRMGR> select segment_name,status,tablespace_name from dba_rollback_segs;
    SEGMENT_NAME STATUS TABLESPACE_NAME
    SYSTEM ONLINE SYSTEM
    RBS0 ONLINE RBS
    RBS1 ONLINE RBS
    RBS2 ONLINE RBS
    RBS3 ONLINE RBS
    RBS4 ONLINE RBS
    RBS5 ONLINE RBS
    RBS6 ONLINE RBS
    ASTEK_RBS1 ONLINE TS_ROLLBKS
    ASTEK_RBS2 ONLINE TS_ROLLBKS
    ASTEK_RBS3 ONLINE TS_ROLLBKS
    OKRBS NEEDS RECOVERY TS_OKRBS
    12 rows selected.
    SVRMGR> select file_name,TABLESPACE_NAME,status from dba_data_files;
    FILE_NAME
    TABLESPACE_NAME STATUS
    /home/oracle/oradata/wil7/drsys01.dbf
    DRSYS AVAILABLE
    /home/oracle/oradata/wil7/indx01.dbf
    INDX AVAILABLE
    /home/oracle/oradata/wil7/users01.dbf
    USERS AVAILABLE
    /home/oracle/oradata/wil7/temp01.dbf
    TEMP AVAILABLE
    /home/oracle/oradata/wil7/rbs01.dbf
    RBS AVAILABLE
    /home/oracle/oradata/wil7/tools01.dbf
    TOOLS AVAILABLE
    /home/oracle/oradata/wil7/system01.dbf
    SYSTEM AVAILABLE
    /data1/oradata/907/INDEKS01.ORA
    TS_INDEKS AVAILABLE
    /data1/oradata/907/INDEKS02.ORA
    TS_INDEKS AVAILABLE
    /data2/oradata/907/IURAN01.ORA
    TS_IURAN AVAILABLE
    /data2/oradata/907/IURAN02.ORA
    TS_IURAN AVAILABLE
    /data2/oradata/907/JURNAL01.ORA
    TS_JURNAL AVAILABLE
    /data2/oradata/907/DATAPDK01.ORA
    TS_PDK AVAILABLE
    /data2/oradata/907/ROLLBKS01.ORA
    TS_ROLLBKS AVAILABLE
    /data1/oradata/907/SIMKJ01.ORA
    TS_SIMKJ AVAILABLE
    /data1/oradata/907/SIMKJ02.ORA
    TS_SIMKJ AVAILABLE
    /data2/oradata/907/TMPSIMKJ01.ORA
    TS_TMPSIMKJ AVAILABLE
    /data2/oradata/907/TMPSIMKJ02.ORA
    TS_TMPSIMKJ AVAILABLE
    /data2/oradata/907/UPAH01.ORA
    TS_UPAH AVAILABLE
    /data1/oradata/907/GLDATA01.ORA
    TSGL_DATA AVAILABLE
    /data1/oradata/907/GLBACKUP01.ORA
    TSGL_BACKUP AVAILABLE
    /data1/oradata/907/GLINDEX01.ORA
    TSGL_INDEX AVAILABLE
    /data2/oradata/907/SDM01.ORA
    TS_PERSONALIA AVAILABLE
    /data2/oradata/907/SDMIND01.ORA
    TS_PERSOIND AVAILABLE
    /data2/oradata/907/SDMPDK01.ORA
    TS_PERSOPDK AVAILABLE
    /data2/oradata/907/SDMROLL01.ORA
    TS_PERSOROLL AVAILABLE
    /data2/oradata/907/SDMTEMP01.ORA
    TS_PERSOTEMP AVAILABLE
    /data6/analisa/ANALISA.ORA
    TS_ANALISA AVAILABLE
    /data4/TS_OKTMP.ORA
    TS_OKTMP AVAILABLE
    /home/oracle/oradata/wil7/system02.dbf
    SYSTEM AVAILABLE
    /data4/TS_OKRBS.ORA
    TS_OKRBS AVAILABLE
    /data4/TS_OKIDX.ORA
    TS_OKIDX AVAILABLE
    /data5/TS_OKDTA1.ORA
    TS_OKDTA AVAILABLE
    /data5/TS_ODSSNP1.ORA
    TS_ODSSNP AVAILABLE
    /data6/TS_ODSSNP2.ORA
    TS_ODSSNP AVAILABLE
    /data6/TS_OKDTA2.ORA
    TS_OKDTA AVAILABLE
    /data2/oradata/907/ROLLBK02.ORA
    TS_ROLLBKS AVAILABLE
    /data1/oradata/907/SIMKJ03.ORA
    TS_SIMKJ AVAILABLE
    /data1/oradata/907/INVEN01.ORA
    TS_INVEN AVAILABLE
    /data2/oradata/907/INVENIND01.ORA
    TS_INVENIND AVAILABLE
    /data1/oradata/907/INVENTEMP01.ORA
    TS_INVENTEMP AVAILABLE
    /data1/oradata/907/GLBACKUP02.ORA
    TSGL_BACKUP AVAILABLE
    /data2/oradata/907/DATAPDK02.ORA
    TS_PDK AVAILABLE
    /data2/tssipa_data01.ora
    TSSIPA_DATA AVAILABLE
    /data2/tssipa_index01.ora
    TSSIPA_INDEX AVAILABLE
    /data2/tssipa_tmp01.ora
    TSSIPA_TMP AVAILABLE
    /data2/tssipa_backup01.ora
    TSSIPA_BACKUP AVAILABLE
    /data1/oradata/907/GLDATA02.ORA
    TSGL_DATA AVAILABLE
    /data1/oradata/907/GLINDEX02.ORA
    TSGL_INDEX AVAILABLE
    /data2/tsdpkp_data01.ora
    TSDPKP_DATA AVAILABLE
    /data2/tsdpkp_index01.ora
    TSDPKP_INDEX AVAILABLE
    /data2/TSKBL_DATA.ora
    TSKBL_DATA AVAILABLE
    /data2/TSKBL_INDEX.ora
    TSKBL_INDEX AVAILABLE
    /data2/TSKBL_BACKUP.ora
    TSKBL_BACKUP AVAILABLE
    /data2/SILHKDATA01.ORA
    TS_SILHK_DATA AVAILABLE
    /data2/SILHKINDEX01.ORA
    TS_SILHK_INDEX AVAILABLE
    /data2/SILHKPDK01.ORA
    TS_SILHK_PDK AVAILABLE
    /data2/tsdpkp_backup01.ora
    TSDPKP_BACKUP AVAILABLE
    58 rows selected.
    SVRMGR>

  • Droping TEMP tablespace

    hi folks,
    i have a production database in a high traffic environment base on oracle 8.1.7.0.0
    i lost TEMP tablespace's datafile because of that i just offlined the tablespace ( just one datafile per tablespace TEMP ) but i can not drop or add a datafile to this tablespace.
    i just added a TEMPX tablespace and changed TEMPORARY TABLESPACE of users to use this new temporary tablespace.
    really how can i renew TEMP tablespace?
    thanks in advanced

    Well, the tablespace's offline. ok. Is it a TEMPORARY TABLESPACE or a PERMANENT with TEMPORARY option?
    Can you issue the queries:select tablespace_name,file_name from dba_temp_files where tablespace_name='TEMP';
    select tablespace_name,file_name from dba_data_files where tablespace_name='TEMP';to check this?
    OEM show the used space because it checks in some data dictionary views which still contains info about the TEMP tablespace.
    You should really try dropping the datafile/tempfile first via "ALTER DATABASE DATAFILE 'filename' OFFLINE DROP" before dropping the tablespace.
    You should also check the status of the session in which you drop the tablespace before cancelling. It may take some time to complete.

  • Droping old tablespace after upgrade

    Hi All,
    I have finished upgrading ERP6 from ERP5.
    In guide it asks to drop the old tablespace.
    I have a tablespace PSAP<SID>640 which is showing 0% used.
    There is new tablespace PSAP<SID>700 has been added there and it is filled
    So when I was trying to drop the tablespace throught BRSPACE, it gives error that the tablespace contains 690 segments. And to use "force" option to drop it.
    Now I want to know if we have to drop that tablespace and if yes then should I use the force option or can i do something about those 690 segments?
    I would really appreciate your help.
    Regards,
    Tajinder

    Hi Sachin,
    My DB is Oracle 10.2
    The log is written below:-
    BR0657I Input menu 310 - please check/enter input values
                                                                                    Options for dropping of tablespace PSAPRD1640
    *1 * Number of files in tablespace (files) . [13]*
    *2 * Total tablespace size in MB (size) .... [26000]*
    3 - Force tablespace drop (force) ......... [no]
    4 - SQL command (command) ................. [drop tablespace PSAPRD1640]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
                                                                                    BR0662I Enter your choice:
                                                                                    BR0280I BRSPACE time stamp: 2009-02-19 17.50.54
    BR0663I Your choice: 'c'
                                                                                    BR0259I Program execution will be continued...
    BR0280I BRSPACE time stamp: 2009-02-19 17.50.54
    BR1070I Searching for segments in tablespace PSAPRD1640...
    BR0285I This function can take several seconds/minutes - be patient...
    BR0280I BRSPACE time stamp: 2009-02-19 17.50.55
    BR1072E Tablespace PSAPRD1640 contains 690 segment(s) - please use 'force' option to drop it
    BR0669I Cannot continue due to previous warnings or errors - you can go back to repeat the last action
    But the space used is 0%
    Regards,
    Tajinder

  • About Tablespaces (Urgent)

    Hi Fellows,
    I created a tablespace with a datafile. I droped that tablespace and the datafile. But when I issue a command (select * from dba_tablespaces) the deleted tablespace doesnt show but when I query the view "user_tablespaces" it is always there. What should I do to remove the contents of removed tablespace from "user_tablespaces"
    I will apprecieate any quick response.
    Thanks in advance
    Mustafa
    null

    It may be possible that you still have quota on the dropped tablespace or it was your default tablespace. If you check the USER_TABLESPACES view the STATUS column will show INVALID because the tablespace doesnt exist. The DBA_TABLESPACE or the V$TABLESPACE views show the existing tablespaces in the database. Do the following I hope this might help:
    ALTER USER <USERNAME>
    QUOTA 0 ON <NAME OF DROPPED TABLESPACE>;
    or if it was your default tablespace then:
    ALTER USER <USERNAME>
    DEFAULT TABLESPACE <NAME OF NEW TABLESPACE>;
    null

  • Error while installing J2EE Add- In to the ABAP system

    Error while installing J2EE Add-In to the ABAP system 
    We are installing J2EE Add-In to the ECC5 System in the new hardware.
    When are getting Error while installing J2EE Add-In to the ABAP system.
    Transaction Begin*****************************
    ERROR 2005-08-10 14:58:28
    CJSlibModule::writeLogEntry()
    CJS-20011 J2EE engine configuration error. DIAGNOSIS: Error when
    configuring J2EE Engine. See output of
    logfile /usr/sap/QSS/install/batchconfig.log: 'My Library Path
    is: /usr/j2se/jre/lib/sparcv9/server:/usr/j2se/jre/lib/sparcv9:/usr/j2se/jre/../lib/sparcv9:/tmp/sapinst_exe.13084.1123702275:/usr/lib::/usr/openwin/lib:/usr/sap/QSS/SYS/exe/run:/oracle/QSS/920_64/lib:/oracle/QSS/920_64/lib32:/usr/lib
    ElementInfoTask has finished successfully on dispatcher
    ConsoleLogsTask has finished successfully on dispatcher
    ChangeManagerPropsTask has finished successfully. Manager:
    LockingManager on dispatcher
    ChangeManagerPropsTask has finished successfully. Manager:
    ClusterManager on dispatcher
    ElementInfoTask has finished successfully on server
    ConsoleLogsTask has finished successfully on server
    ChangeManagerPropsTask has finished successfully. Manager:
    LockingManager on server
    ChangeManagerPropsTask has finished successfully. Manager:
    ClusterManager on server
    ChangeServicePropsTask has finished successfully. Service: dbpool on
    server
    ChangePasswordsTask finished successfully.
    Error occured while connecting to database (UploadFile). Msg: No such
    algorithm: DESede
    Transaction end***********************************
    We tried twice clean installation, after removing j2ee dir, SCS and
    resp profiles and droping PSAPQSSDB tablespace and SAPQSSDB user.
    I have also confirmed the passwords in ABAP system/000 for SAPJSF, DDIC, J2EE_ADMIN, J2EE_GUEST.
    We are getting the same error in both tries.
    Kindly advice us to resolve the problem.
    Thanks and Regards,
    Srinivas

    Ananda,
    you saved my day!  I've been banging my head against the wall with this same problem during a J2EE add-in installation for SRM 4.0 on Windows, in preparation of an LAC 2.0 installation.  I had tried deleting the schema first, but that didn't work.  After I removed the sys\global\security folder as well, it worked perfectly.
    Thank you.

  • Corrupted ROLLBACK segment

    Hi,
    on 8.1.7 I have the following in alertlog :
    Errors in file u:\oradata\MYDB\bdump\MYDBSMON.TRC:
    ORA-01578: ORACLE data block corrupted (file # 2, block # 348131)
    ORA-01110: data file 2: 'T:\ORADATA\MYDB\01_RBS_01.DBF'
    Can I drop this file and add another to ROLLBACK tablespace ?
    If not any other solution ?
    Many thanks.

    It depends, if your rollback segment is required to perform a recovery action, then it is not possible.
    If you have your database configured in archivelog mode and your backup is valid, then simply perform a complete recovery operation with the rollback tablespace. Otherwise you will have to perform a procedure that involves declaring the rollback segments unavailable by declaring this instance parameter:
    offlinerollback_segments=RBS01, RBS02, RBS03, RBS04, RBS05, RBS06, RBS07, RBS08, RBS09, RBS10
    rollback_segments=SYSTEM, SYSROL
    (depending on the rollback segments you have declared in this tablespace).
    I have documented the procedure here --> Re: Error while Droping Undo Tablespace.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • UrgentCan't restore/ORA-19723:Cannot recreate plugged in read-onlydatafile

    I created this rman backup before I droped the tablespace and used the tansportable tablespaces to plug in two tablespaces.
    Later on I wanted to use the backup with tag "before_drop_tablespace" to bring back the databases but got following errors.
    creating datafile fno=5 name=/u01/app/oracle/oradata1/REQTST02/req_index_ts01.dbf
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 04/30/2008 15:17:21
    ORA-19723: Cannot recreate plugged in read-only datafile 5
    ORA-01110: data file 5: '/u01/app/oracle/oradata1/REQTST02/req_index_ts01.dbf'

    You are getting this error because your tablespace is read only. If you want to bring the database to a state before you dropped the tablespace, you need to perform point-in-time recovery.

  • Drop TS

    SQL>drop tablespace tablespace_name including contents;
    SQL>drop tablespace tablespace_name including contents and datafile;
    What is the difference between including contents and including contents and datafiles while droping the tablespace.
    Thankx....

    If no object is housing in tablespace you directly say...
    SQL> drop tablespace dummy;
    Tablespace dropped;
    If it houses objects then oracle will complain with
    ORA-01549: tablespace not empty, use INCLUDING CONTENTS option
    While dropping tablespace if you also want to delete the corresponding os files then you will add and datafile.
    Please experiment...

  • Oracle 9i - Rollback Segment Needs Recovery

    I have been noticing for a few days that my UNDO tablespace has been growing in size for no apparent reason. My datafiles have only increased by 400 Meg over last 4 days, but UNDO tablespace has grown from 100 Meg - 5.6 Gig....
    I decided to create a new UNDO tablespace and drop the old one.....
    I created a new tablespace, changed the UNDO configuration to point to new tablespace and bounced the instance. The instance came back up fine, using the new UNDO tablespace....I then went to take the old tablespace offline and drop it....It went offline fine, but when I went to remove it, I received an Oracle error saying tablespaces was using rollback segment _SYSSMU24$.....
    I looked in the alert log and I'm getting a message:
    SMON: about to recover undo segment 24
    SMON: mark undo segment 24 as needs recovery
    When I query the dba_rollback_segs table, it shows that all rollback segments prior to _SYSSMU24$ are online, 24 & 25 are listed as NEEDS RECOVERY, and all others below that are offline....
    Any help on resolving this issue would be appreciated....

    Metalink overrides any thing said, adviced, or written in this forum, if you have already opened a Service Request, as suggested by Daniel Morgan.
    Just in case this may be helpful to you or others facing a similar situation, I suggest you to check this case Re: Error while Droping Undo Tablespace.
    Make sure you have a full useful database backup as well as the required archive log files.
    ~ Madrid

  • Droping a datafile from a tablespace

    I want to drop a datafile from a tablespace by using the query
    SQL> alter tablespace TS1 drop datafile 'OS path\df1';
    This query drops the datafile. But physically the datafile is present in the OS path. how to delete the datafile completely from the disk.

    Version:-
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    Although it's dropped on database level, I can't delete.If dropped data file from ORACLE, it deletes from OS level too. By any other processes being locked like antivirus and so on?
    SQL> select file_name from dba_data_files where tablespace_name='USERS';
    FILE_NAME
    C:\ORACLE\ORADATA\ORCL\USERS01.DBF
    C:\ORACLE\ORADATA\ORCL\USERS02.DBF
    SQL> alter tablespace users add datafile 'c:\oracle\oradata\orcl\users03.dbf' size 10m;
    Tablespace altered.
    SQL> host
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\bn2676>cd c:\Oracle\oradata\orcl
    c:\Oracle\oradata\orcl>dir users*
    Volume in drive C is System
    Volume Serial Number is 1853-3E21
    Directory of c:\Oracle\oradata\orcl
    02/15/2012  11:25 PM         5,251,072 USERS01.DBF
    02/16/2012  09:04 PM        10,493,952 USERS02.DBF
    02/16/2012  09:05 PM        10,493,952 USERS03.DBF
                   3 File(s)     26,238,976 bytes
                   0 Dir(s)  177,196,707,840 bytes free
    c:\Oracle\oradata\orcl>exit
    SQL> alter tablespace users drop datafile 'c:\oracle\oradata\orcl\users03.dbf';
    Tablespace altered.
    SQL> select file_name from dba_data_files where tablespace_name='USERS';
    FILE_NAME
    C:\ORACLE\ORADATA\ORCL\USERS01.DBF
    C:\ORACLE\ORADATA\ORCL\USERS02.DBF
    SQL> host
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Users\bn2676>cd c:\Oracle\oradata\orcl\
    c:\Oracle\oradata\orcl>dir user*
    Volume in drive C is System
    Volume Serial Number is 1853-3E21
    Directory of c:\Oracle\oradata\orcl
    02/15/2012  11:25 PM         5,251,072 USERS01.DBF
    02/16/2012  09:04 PM        10,493,952 USERS02.DBF
                   2 File(s)     15,745,024 bytes
                   0 Dir(s)  177,207,398,400 bytes free
    c:\Oracle\oradata\orcl>

  • Droping an undo tablespace ????????????????

    Hi Gurus,
    How to drop an undo tablespace in oracle 10.2.
    when i issue drop tablespace undo including contents
    it shows like "ORA-30013: undo tablespace 'UNDO' is currently in use"
    Pls help it out......
    Regards
    Rajesh

    The reason why you cannot drop this tablespace is because it has been declared as the undo tablesapace for the database by means of the UNDO_TABLESPACE instance parameter.
    You have to create a new undo tablespace and change the undo_tablespace instance parameter value to point to the new undo tablespace:
    ALTER SYSTEM SET UNDO_TABLESPACE=<N EW UNDO TS>;
    Afterwards you will have to wait for a while before you are able to drop the current tablespace if there are active transactions or if the information is still required to perform flashback queries (it depends on the UNDO_RETENTION instance parameter), so it is suggested to temporarily reduce this value so you can perform the switch to the new tablespace and you can get rid of the current tablespace.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Tablespace droped and objects moved

    hi
    I have
    1) move tablespace(A) objects ( Tables and indexes ) to differant tablespace (B).
    2) Drop tablespace(A) .
    3) Recreate tablespace(A)
    4) Again move objects(Tables and indexes) to tablesapce A.
    does it work same as export and import or it will corrept my tablespace(A).
    Please suggest.
    Edited by: Anil1 T on Mar 1, 2012 1:35 AM
    version 9.2.0.7 with DWH database , i am planning to do that , please suggest what would be the effact

    Hi;
    Please see:
    Moving objects from one tablespace to other tablespace
    how to move schema objects from one tablespace to another tablespace?????
    Regard
    Helios

  • Tablespace/datafile droping error..

    HI guys,
    I am getting below error when trying to drop tablespace "PROD2"..
    drop TABLESPACE PROD2 including contents;
    The following error has occurred:
    ORA-01122: database file 56 failed verification check
    ORA-01110: data file 56: '/u02/oradata/EXPRESS/prod2EXPRESS01.dbf'
    ORA-01251: Unknown File Header Version read for file number 56
    when I am going to /u02/oradata/EXPRESS/ directory then there is no datafile with name "prod2EXPRESS01.db".
    It was there but i need to create tablespace "PROD2" again so i dropped by deleting datafile one by one from directory "/u02/oradata/EXPRESS/"
    there was 10 datafile in "PROD2".
    kindly help me ..

    PC wrote:
    HI guys,
    I am getting below error when trying to drop tablespace "PROD2"..
    drop TABLESPACE PROD2 including contents;
    The following error has occurred:
    ORA-01122: database file 56 failed verification check
    ORA-01110: data file 56: '/u02/oradata/EXPRESS/prod2EXPRESS01.dbf'
    ORA-01251: Unknown File Header Version read for file number 56
    when I am going to /u02/oradata/EXPRESS/ directory then there is no datafile with name "prod2EXPRESS01.db".
    It was there but i need to create tablespace "PROD2" again so i dropped by deleting datafile one by one from directory "/u02/oradata/EXPRESS/"
    there was 10 datafile in "PROD2".
    kindly help me ..First find datafile which belong this tablespace from dba_data_files and alter database datafile 'datafile-_name' offline drop then execute  drop tablespace PROD2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Droping and renaming tablespace druing hot user managed backup

    Will dropping and renaming of tablespace will have any effect if hot user managed backup of that db is in progress ?
    thanks in advance

    However, you will encounter a more serious issue because of the way DROP TABLESPACE works.
    Even if the DROP fails, the "INCLUDING CONTENTS" causes all segments to be dropped !!
    SQL> drop table ASSM_TABLE purge;
    Table dropped.
    SQL> create table ASSM_TABLE (pk_col number not null, descr_col  varchar2(30)) tablespace ASSM_TBS;
    Table created.
    SQL> create unique index ASSM_TABLE_PK on ASSM_TABLE (pk_col) tablespace ASSM_TBS;
    Index created.
    SQL> select segment_name, segment_type from user_segments where tablespace_name = 'ASSM_TBS';
    SEGMENT_NAME                   SEGMENT_TYPE
    ASSM_TABLE_PK                  INDEX
    ASSM_TABLE                     TABLE
    SQL> insert into ASSM_TABLE select rownum, 'ABCD ' || rownum from dual connect by level < 10;
    9 rows created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> connect / as sysdba
    Connected.
    SQL>
    SQL> alter tablespace ASSM_TBS begin backup;
    Tablespace altered.
    SQL> drop tablespace ASSM_TBS including contents and datafiles;
    drop tablespace ASSM_TBS including contents and datafiles
    ERROR at line 1:
    ORA-01150: cannot prevent writes - file 7 has online backup set
    ORA-01110: data file 7:
    'filename'
    SQL> connect hemant/hemant
    Connected.
    SQL> select segment_name, segment_type from user_segments where tablespace_name = 'ASSM_TBS';
    no rows selected
    SQL>  alter tablespace ASSM_TBS end backup
      2  /
    Tablespace altered.
    SQL>The DROP TABLESPACE failed but the contents did get dropped !
    Hemant K Chitale
    Edited by: Hemant K Chitale on Oct 7, 2011 2:41 PM

Maybe you are looking for