Drop empty tablespaces after OATM in 11.5.9
Hi All,
In 11.5.9 we don't have the option of "Generate script to drop empty tablespaces". Could you suggest a best way to generate this in 11.5.9?
Thanks
Hussein,
Could you please confirm the steps for moving the below objects from APPLSYSD after OATM
SQL> select segment_name, segment_type from dba_segments
where tablespace_name ='APPLSYSD'; 2
SEGMENT_NAME
SEGMENT_TYPE
SYS_IL0002020632C00006$$
LOBINDEX
SYS_LOB0002020632C00006$$
LOBSEGMENT
SQL>
SQL> select OWNER, TABLE_NAME, COLUMN_NAME, SEGMENT_NAME from dba_lobs where SEGMENT_NAME like '%SYS_LOB0002020632C00006$$%';
OWNER TABLE_NAME
COLUMN_NAME
SEGMENT_NAME
APPLSYS AQ$_WF_CONTROL_D
RSUBS
SYS_LOB0002020632C00006$$
SQL>
SQL> select OWNER, TABLE_NAME, COLUMN_NAME, SEGMENT_NAME from dba_lobs where INDEX_NAME like '%SYS_IL0002020632C00006$$%';
OWNER TABLE_NAME
COLUMN_NAME
SEGMENT_NAME
APPLSYS AQ$_WF_CONTROL_D
RSUBS
SYS_LOB0002020632C00006$$
SQL>
SQL> select OWNER, TABLESPACE_NAME from dba_tables where TABLE_NAME like '%AQ$_WF_CONTROL_D%';
OWNER TABLESPACE_NAME
APPLSYS
SQL>
alter table AQ$_WF_CONTROL_D move tablespace APPLSYSD
lob(RSUBS) store as SYS_LOB0002020632C00006$$(tablespace APPS_TS_QUEUES);
Thanks
Similar Messages
-
Drop rollback tablespace after using UNDO
I have switched to using UNDO instead of using rollback segments. The UNDO works fine, and I have sucessfully dropped all rollback segments. Now I try to drop rollback tablespace. Can I simplely issue drop tablespace command to drop it? the reason I hesitate to simply drop it is that before I do drop, I placed the rollback tablespace offline. And there are errors during transaction since some tables somehow still checking on this tablespace. Can I simplely drop rollback tablespace, and Oracle would clean this internally, and everything would be finr?
thanks for your input.Hi,
This is the steps to migration from rollback tablespace to undo tablespace (from 8i to 9i migration by manual upgrade) :
SQL>alter system set undo_management=auto scope=spfile;
SQL>create UNDO tablespace UNDOTBS datafile d:\database\mydb\system\undotbs01.dbf size 500M;
SQL>alter system set undo_tablespace= UNDOTBS scope=spfile;
SQL>shutdown immediate
SQL>startup
SQL>select SEGMENT_NAME,TABLESPACE_NAME,STATUS from dba_rollback_segs; --Verirify creation and usage UNDO tablespace
SQL>drop tablespace rbs including contents and datafiles;
SQL>create pfile=d:\database\mydb\system\pfile\init.ora from spfile;No need to drop old rollback segment.
Nicolas. -
OATM- dropping old tablespaces
Hi,
After the OATM migration completes with the status report showing 100%, how should I go ahead with removing the old tablespaces?How to decide which tablespaces can be dropped and which cannot?
Regards,
Sandeep SulakheHi,
If you are on 11.5.10.2:
1) Run OATM migration utility-> perl $FND_TOP/bin/fndtsmig.pl
2) Choose "6" -> "Run Post Migration Steps"
3) Choose "4" -> "Generate script to drop empty tablespaces"
4) Execute the script generated
else (not 11.5.10.2):
You should drop old tablespaces manually.
Anyway take a full backup before.
Regards,
Aviad -
Drop Normal Tablespace Taking several hours
Hi,
In my 1TB database there is one tablespace size (38.5 GB / used 4 GB) which we used for objects backup purpose and i am trying to drop this tablespace using every option like bring tablespace offline and drop with DROP TABLESPACE TBS_NAME INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS
but Drop Tablespace Taking several hours (24 + hrs)
I tried with drop objects from the tablespace but that is also taking lot of time to drop and then i tried to drop empty tablespace and again it is taking several hours.
Database version :- 10.2.0.3 and 10.2.0.4
Operation System Version :- Solaris 5.10
ERP 11.5.10
Please suggest what could be the problem.So, till now you have done these steps,
1) dropped all database objects from that tablespace. Checked if any objects are there in this tablespace and there were none
2) take tbs offline
3) drop tablespace
4) While drop tablespace command is hanging, monitored segments in the tbs from another session. Segments were reducing very slowly
Out of first 3 steps, which step took longer? drop tablespace ?
Logically, when you are able to drop objects, then there should be no issue of locks or anything like that.
Dictionary updates should not take 24 hours!!!
What else is going on, on the disk/file-system where this tbs is housed?
Do you have all locally managed tablespaces? -
Hi ,
After a tablespace drop solely .... what is happening with its included segments....., i mean where would they belong to.... to SYSTEM tablespace...?????
NOTE: I use Oracle10g on Windows XP platform......
Thanks , a lot
SimonHi ,
The following portion of document is from an Oracle documentation :
"To drop a tablespace, use the DROP TABLESPACE statement. The following statement drops the users tablespace, including the segments in the tablespace:
DROP TABLESPACE users INCLUDING CONTENTS;
If the tablespace is empty (does not contain any tables, views, or other structures), you do not need to specify the INCLUDING CONTENTS clause. Use the CASCADE CONSTRAINTS clause to drop all referential integrity constraints from tables outside the tablespace that refer to primary and unique keys of tables inside the tablespace.
To delete the datafiles associated with a tablespace at the same time that the tablespace is dropped, use the INCLUDING CONTENTS AND DATAFILES clause. The following statement drops the users tablespace and its associated datafiles:
DROP TABLESPACE users INCLUDING CONTENTS AND DATAFILES;
"So , from the above , i understand that :
1) if i specify DROP TABLESPACE USERS.... then the tablespace db object is dropped only.... not datafiles , not segments......So , my question is where these segments belong to ....afterwards????
2) if i specify DROP TABLESPACE users INCLUDING CONTENTS ... then the tablespace db object is dropped as well as the segments included in it.....Not the datafiles....
3) if i specify DROP TABLESPACE users INCLUDING CONTENTS AND DATAFILES... then the tablespace db object is dropped , the segments and datafiles ,as well ....
Are the above considerations correct...?????
Many thanks ,
Simon
Message was edited by:
sgalaxy -
After OATM in 11.5.10.2
Hi,
After OATM 2 objects are left in FNDD tablespace.
OWNER TABLE_NAME COLUMN_NAME
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK "USER_DATA"."HEADER"."PROPERTIES"
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK "USER_DATA"."TEXT_LOB"
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK1 "USER_DATA"."HEADER"."PROPERTIES"
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK1 "USER_DATA"."TEXT_LOB"
Either I drop these objects or move to APPS_TS_QUEUES TABLESPACE. Pl correct me on following sql move command.
ALTER TABLE AQ$WF_NOTIFICATION_OUT_BAK MOVE TABLESPACE APPS_TS_QUEUES LOB (USER_DATA.TEXT_LOB,USER_DATA.HEADER) STORE AS (TABLESPACE APPS_TS_QUEUES);
OR
ALTER TABLE AQ$WF_NOTIFICATION_OUT_BAK MOVE TABLESPACE APPS_TS_QUEUES LOB (USER_DATA) STORE AS (TABLESPACE APPS_TS_QUEUES);
Thanks!Hi,
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK "USER_DATA"."HEADER"."PROPERTIES"
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK "USER_DATA"."TEXT_LOB"
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK1 "USER_DATA"."HEADER"."PROPERTIES"
APPLSYS AQ$WF_NOTIFICATION_OUT_BAK1 "USER_DATA"."TEXT_LOB"From the table names, I can say that those are only backup tables (_BAK and _BAK1) and those tables are no longer used. If there is no need to keep these tables, then you can simply drop it.
For the command syntax, please refer to:
Note: 130814.1 - How to move LOB Data to Another Tablespace
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=130814.1
Note: 147356.1 - How to Move Tables from One Tablespace to Another
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=147356.1
Regards,
Hussein -
Hi all,
I have done OATM migartion successfully, no error. But getting some tablespace who contains the object, still pointing to the old tablespace.
select distinct tablespace_name from dba_segments
where tablespace_name not like 'APPS%' and
tablespace_name not IN ('SYSTEM','SYSAUX','TEMP','OWAPUB','CTXD');
TABLESPACE_NAME
TOOL
DISCOVERER
PORTAL
USER_DATA
tbs portal is ok as per 418225.1, but not getting any luck for rest.
Please suggest if any one have an Idea or related doc ID's.Hi,
Please see these documents.
Note: 754342.1 - Some LOB Objects Are Not Moved After Using OATM
Note: 130814.1 - How to move LOB Data to Another Tablespace
Note: 419189.1 - Un-dropped Tablespaces After Successful OATM Migration
Note: 369526.1 - Unable to drop tablespace APPLSYSD when migrating to OATM
Thanks,
Hussein -
Can't reclaim space in tablespace after deleting records
Oracle 11gR1 RHEL5 64bit
Hi.
I am having trouble reclaiming space from a tablespace after having deleted all (thousands) of the records from a table (which resides in that tablespace). I have tried the following options to no avail:
- Alter table <table_name> shrink
- purge tablespace
- purge recyclebin
This table has several LOB columns and is using securefiles. I don't know if that has something to do with it or not. The tablespace is locally Managed and Segment space management is set to AUTO. Below is the create table command:
CREATE TABLE IIQ.DICOM_OBJECT
DICOM_OBJECT_RID NUMBER CONSTRAINT NN_DICOM_OBJECT_DICOM_OBJ_RID NOT NULL,
SUBMISSION_RID NUMBER,
SUBMISSION_ITEM_RID NUMBER,
DICOM ORDSYS.ORDDICOM,
IMAGETHUMB ORDSYS.ORDIMAGE,
ANONDICOM ORDSYS.ORDDICOM,
ACTIVE_FLAG VARCHAR2(1 CHAR) DEFAULT 'Y' CONSTRAINT NN_DICOM_OBJECT_ACTIVE_FLAG NOT NULL,
CREATED_TIMESTAMP TIMESTAMP(6) WITH LOCAL TIME ZONE DEFAULT SYSTIMESTAMP CONSTRAINT NN_DICOM_OBJECT_TIMESTAMP NOT NULL,
SOURCE_DESCRIPTION VARCHAR2(100 CHAR) CONSTRAINT NN_DICOM_OBJECT_SOURCE NOT NULL,
OP_CONFORMANCE_FLAG VARCHAR2(1 CHAR)
COLUMN IMAGETHUMB NOT SUBSTITUTABLE AT ALL LEVELS
TABLESPACE IIQDCMDAT01
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
LOB ("DICOM"."EXTENSION") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB (SYS_NC00050$) STORE AS
( TABLESPACE IIQDCMDAT01
ENABLE STORAGE IN ROW
CHUNK 16384
PCTVERSION 10
NOCACHE
INDEX (
TABLESPACE IIQDCMDAT01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("DICOM"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("ANONDICOM"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
XMLTYPE SYS_NC00017$ STORE AS CLOB
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
CACHE READS
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("IMAGETHUMB"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("ANONDICOM"."EXTENSION") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOCACHE
NOPARALLEL
MONITORING
ENABLE ROW MOVEMENT;
Thank you all.Justin Cave wrote:
OK, so you did a SHRINK SPACE CASCADE? Not just a SHRINK SPACE?That is correct.
What makes you believe that there is more space that can be reclaimed? Well, what I don't understand is that when a table (and only that table) was assigned to a specific tablespace whose data was completely removed is showing as if the data is still there...at least when you look at the tablespace. If all the rows of a table are removed, then shouldn't the tablespace size go down? There was 95 GB of data in that tablespace and all from that one table, which was completely emptied. However, it still shows the tablespace as being 95GB full.
Can you post the size of the table segment and the LOB segments as well as the size of the actual data in the table and the LOBs?Can you tell me which views you would like to the see the data from ? dba_lobs, dba_segments, etc... I want to make sure i have the right query for you.
Here is some info...not sure if this is what you want (formatiing is off):
select owner, segment_name, segment_type, tablespace_name, bytes
from dba_segments
where owner = 'IIQ'
and tablespace_name = 'IIQDCMLOB01'
and segment_type = 'LOBSEGMENT';
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME BYTES
IIQ SYS_LOB0000651630C00012$$ LOBSEGMENT IIQDCMLOB01 9.8416E+10
IIQ SYS_LOB0000651630C00018$$ LOBSEGMENT IIQDCMLOB01 755236864
IIQ SYS_LOB0000651630C00021$$ LOBSEGMENT IIQDCMLOB01 755236864
IIQ SYS_LOB0000651630C00023$$ LOBSEGMENT IIQDCMLOB01 262144
IIQ SYS_LOB0000651630C00044$$ LOBSEGMENT IIQDCMLOB01 262144
IIQ SYS_LOB0000651630C00053$$ LOBSEGMENT IIQDCMLOB01 262144
OWNER TABLE_NAME
COLUMN_NAME
----------------------------------- SEGMENT_NAME TABLESPACE_NAME INDEX_NAME CHUNK PCTVERSION RETENTION FREEPOOLS CACHE LOGGING ENCR COMPRE DEDUPLICATION IN_ FORMAT PAR SEC
IIQ DICOM_OBJECT
"DICOM"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00012$$ IIQDCMLOB01 SYS_IL0000651630C00012$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
SYS_NC00018$
SYS_LOB0000651630C00018$$ IIQDCMLOB01 SYS_IL0000651630C00018$$ 16384 10800 CACHEREADS YES NO NO NO NO ENDIAN NEUTRAL NO YES
IIQ DICOM_OBJECT
"DICOM"."EXTENSION"
SYS_LOB0000651630C00021$$ IIQDCMLOB01 SYS_IL0000651630C00021$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"IMAGETHUMB"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00023$$ IIQDCMLOB01 SYS_IL0000651630C00023$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"ANONDICOM"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00044$$ IIQDCMLOB01 SYS_IL0000651630C00044$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"ANONDICOM"."EXTENSION"
SYS_LOB0000651630C00053$$ IIQDCMLOB01 SYS_IL0000651630C00053$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
Thanks. -
Drop Undo Tablespace taking more than 1 hr
Hi,
To give you background, I had given an "insert into .. select" command which was inserting 3 millions of rows of rowidth approx 5000 bytes. The window on which it was given, was closed by mistake.
After sometime when I checked the size of undo_tablespace, it was 5.5GB. I decided to create a new one and drop the old undo_tbsp.
I have successfully created new undo tablespace and changed the same in spfile also.
now when i am dropping the old undo tablespace, its taking long time. its almost an hour, but the tablespace has not been dropped yet.
I have given following command
drop tablespace undotbs_01 including contents;
Any idea, why is it taking so much time, and how long should I wait?
If someone can give me any other idea on how can I drop the tablespace, that will be great.
Regards,
Archana.To give you background, I had given an "insert into .. select" command which was inserting 3 millions of rows of rowidth approx 5000 bytes. The window on which it was given, was closed by mistake.This could be the cause.
I wonder the killed/closed session doesn't hangup with a latch or lock.
Since the old undo tbs had active transaction, it might have to pending offline status. If so, you can drop it.
Jaffar -
Hi Everybody,
Here there are some steps that leaded me into a dead end, where I would like and greatly appreciate some help.
1. We have a tablespace FONC, dictionary managed, 136Gb spliced in 11 datafiles
FONC1 to FONC11.
2. There it is a huge table in this tblsp, T1, 70GB, having BLOBs.
3. Some other tables are in it also.
My plan is to move all objects in this tblsp in a 2 new tblsp, one for the
BLOBS, one for the rest. And to drop this tablespace at the end.
I do not have enough disk space in order to have both tablespaces present in the
same time.
What I did.
0. ArchiveLog off.
1. Export the T1 table, the huge one (splitting the export in 24 files, placed
in all free spaces I found).
2. alter table move tablespace for the other tables.
3. start the Drop table T1.
4. after 6 hours, I stopped the drop, being short in time.
5. start drop tablespace FONC.
6. after another 5 hours, I cancelled this drop also.
7. tblsp FONC contains nothing else but a 67GB temporary segment.
8. took the tblsp FONC offline.
9. shutdown db abort.
10. delete datafiles FONC1 to FONC11.
11. startup db - no errors except a message in SMON Log - timeout waiting for a
tablespace management resource.
12. Create new tablespace.
13. Import table T1.
14. Archivelog ON - error ORA-265 - instance needs recovery.
15. Shutdown Abort.
16. Startup Open.
17. Shutdown Immediate.
18. startup mount.
19. ALter database datafile fonc1...11 offline drop.
20. Recover database - everything ok.
21. Alter ... ARCHIVELOG - same error.
22. Other trials - same results ...
No indications in any oracle log that SMON did an instance recovery, or other
error message.
Finally, the DB is operational, but ARCHIVELOG is OFF.
My problem is how to get rid of the FONC tablespace without loosing another xxxx
hours. A normal DROP tablsp including contents did not finished after 24 hours.
I need a way just to invalidate the temporary segment in the FONC tblsp, to get
rid of it, to be able to get rid of the tblsp FONC also. I guess that the
missing datafiles impede the instance recovery. An solution to be done when the
DB is online and in use is of course the most desirable one ...
using DBMS_SPACE_ADMIN can be more helpfull ?
Manually edit the controlfiles ?
Using RMAN ?
Thanks in advance, I appreciate what you are doing,
DanNo I did not tried with Nologging.
On the other hand, what I see that takes long are the updates on the tables fet$ and uet$. More than that, a system session is issuing all the time blocking locks on this tables, that makes the drop to take so much time. Releasing 67GB in extents is quite challenging ...
So I need a way to lead only to delete on the fet$ and uet$ tables, and, a way to avoid the blocking locks. I thought that using DBMS_SPACE_ADMIN and invalidating the temporary segment first can be a solution.
The real problem here is that I can not do try-and-see, I can not stop the exploitation of the DB so I was hoping that somebody went through the same experience and has a working solution.
Thanks,
Dan -
To drop a tablespace(with contents) in Offline mode
A test tablespace in the prod (24x7) was not required and to before dropping it I put it in the offline mode (with immediate option) to prevent further access.
The tablespace is not empty and presently in the offline mode.
Can I drop this tablespace ?
How?
I dont want to perform any recovery. Please suggest?
ThanksYes, you can :
SQL> create tablespace test datafile '/u01/ora92/oradata/ora9/test.dbf' size 10M;
Tablespace created.
SQL> create table test01(a number) tablespace test;
Table created.
SQL> alter tablespace test offline;
Tablespace altered.
SQL> drop tablespace test including contents and datafiles;
Tablespace dropped.
SQL>You can even do it with the tablespace online :
SQL> create tablespace test datafile '/u01/ora92/oradata/ora9/test.dbf' size 10M;
Tablespace created.
SQL> create table test01(a number) tablespace test;
Table created.
SQL> drop tablespace test including contents and datafiles;
Tablespace dropped.
SQL> -
Hey Folks,
I really need some help here.
I'm trying to drop/recreate the undo tablespace (currently 25gig) Oracle 9i
When I try to drop the undo tablespace 'UNDOTBS1' I get the following error:
âORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping tablespaceâ
Here's what I have tried so far:
- Bounced the DB several times hoping to get rid of the reference to the active rollback segment. No luck.
- Created a new undo table space
- Tried 'Alter system set undo_tablespace=new_one' (noticed that 10 new rollback segs were created '_SYSMU11$..SYSMU20$' pointing to the new undo tablespace)
- I then performed an offline drop of the undo tablespace data file. After the offline drop, the system rollback segs SYSMU01$..SYSMU10$ went offline as would be expected.
- Even with the new undo tablespace, all other application tablespaces still use the old undo which due to the offline drop, no inserts, deletes, etc. will work.
After all the above, I still get the same error when trying to drop the undo tablespace.
Any ideas? Ideally I would like to be able to drop the undo tablespace and recreate it, but at this point I'd be happy to bring back the undo tablespace datafile so we can at least use the database again.
Thanks in advance!!
ColinSQL> show parameters undo
undo_retention integer
10800
undo_suppress_errors boolean
FALSE
undo_tablespace string
UNDOTBS03
r.- The undo tablespace which the database is looking for is this one ( UNDOTBS03 )
What is strange about the lines above is that I have
all those params above commented out in my
\pfile\init.ora file (and have bounced the db).
Iâm not sure why they are still showing up.
r.- Perhaps your instance is started with the spfile instead of the init file
Here's what we did after the UNDOTBS1 tablespace
caused the disk to run out of space during a large
import (from now on we are going to use commit = y):
1. Created a new undo tablespace UNDOTBS03 - got
errors so instead we to created it as a temp
tablespace UNDOTBS03 which worked. r.- Yes, but that tablespace was created as a UNDO TABLESPACE ?
2. Tried to drop UNDOTBS1 got the following error
msg:
ORA-01548: active rollback segment '_SYSSMU1$' found,
terminate dropping tablespacer.- Of course, the database did not allow to drop it beacause there were pending transactions
3. SQL> alter system set undo_tablespace =
'UNDOTBS03' scope = both. Tried dropping UNDOTBS1.
Same error as in #2 above.r.- There were still pending transactions with the older undo tablespace
4. We then offline dropped the datafile associated
with UNDOTBS1 hoping that would then allow us to drop
UNDOTBS1. Same error as #2.r.- That was the worst you did. You can not drop a tablespace so...
5. Then tried creating a undo tablespace again:
Create UNDO tablespace undo_temp
datafile 'D:\oracle\oradata\usbperf\undo_temp.DBF'
size 25m autoextend on;
Error on line 0
Create UNDO Tablespace undo_temp
datafile 'D:\oracle\oradata\usbperf\undo_temp.
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2:
'D:\ORACLE\ORADATA\USBPERF\UNDOTBS01.DBF'
So thatâs where we are. I'm guessing that the
original undo tablespace corrupted when it tried to
extend and ran of disk space?
Thanks again for the help.
Colin ok I can guide to solve this but you have to do what I am going to tell you step by step. Is this a production database ?
Joel Pérez
http://www.oracle.com/technology/experts -
Drop Temporary Tablespace!
Hi All,
I have tried dropping my old temporary tablespace TEMP after making new TEMP2 as default.
All the users (checked in dba_users) are using TEMP2 as default temporary tablespace.
Now, issue is when I am trying to take TEMP offline and dropping it some of the users are not able to open the forms.
Please suggest, is it necessary that I must do this activity after taking a proper downtime or I can do it in business hours.
Thanks,
AnchorageIt's done now!!!
Actually issue was
You cannot drop a tablespace if it contains any rollback segments holding active transactions.*
Try to check whether any one using the temp segments or not on query "v$sort_usage"*
If it returns the rows, the sessions are using the temp tablespace. Once the Sessions Closes then the the command execution will be completed, else you and go head and kill the session with respect to session Id.*
Which was been explained to me by Pavan in General Database Forum!
I have killed the active session and it was success!
Anchorage -
Drop temp tablespace goes forever
Hi,
Trying to drop temp tablespace.
I made new default temp tablespace and that part went fine. I can see system using it immediately.
Then I tried to drop the old one.
drop tablespace temp including contents and datafiles;
.... no go .... altough content is gone now. Tablespace was full before this now it's empty.
My command still hangs in sqlplus.
Any idea?
Oracle 10.2.0.1 on Linux x86.You either wait until it's finish. Or kill the session that held it.
SELECT s.sid,
s.serial#,
s.osuser,
s.program
FROM v$session s;
ALTER SYSTEM KILL SESSION 'sid,serial#' -
Drop Temp tablespace hangs...
I have created a new TEMP tablespace and made it default TEMP one.
Now I want to drop TEMP3 tablespace, because it has become fulll...
when I drop it through EM, it hangs...
Once a tablespace has been dropped, the objects and data in it will no longer be available. To recover them can be a time consuming process. Oracle recommends a backup before and after dropping a tablespace.
Are you sure you want to delete Tablespace TEMP3?
Delete associated datafiles from the OS
When I checked at EM, there are locks too..
SMON has locked the system
What should I do now?The_Rock wrote:
I have created a new TEMP tablespace and made it default TEMP one.
Now I want to drop TEMP3 tablespace, because it has become fulll...
when I drop it through EM, it hangs...
Once a tablespace has been dropped, the objects and data in it will no longer be available. To recover them can be a time consuming process. Oracle recommends a backup before and after dropping a tablespace.
Are you sure you want to delete Tablespace TEMP3?
Delete associated datafiles from the OS
When I checked at EM, there are locks too..
SMON has locked the system
What should I do now?Refer
Drop Temp Tablespace Command Hangs [ID 214371.1]
How to Drop Temporary Tablespace Having Enteries in V$SORT_USAGE [ID 285993.1]
Maybe you are looking for
-
How to add multiple records in table thru form via Submit button
Hi all i have small requirement as follows. i have a view in which i have 3 UI elements one is webdynpro form,Table UI element and third one is submit button. now at runtime when i will enter the details in the form and click on the submit button the
-
Captivate 6 quiz AICC published but not working
Hi, I have created a quiz in captivate 6 and published to link in with my LMS as AICC (SCORM is not available for us). I seem to have some random files in the folder (including a SCORM named one). Image is of the published files. My settings are the
-
Error while creating N-level TLN
Hi, I created the SimpleNLevelNavigation iView by using the par created as per the instructions given in SDN community. But when i try to run/preview the iView i am getting the following error, Portal Runtime Error An exception occurred while process
-
To check the weblogic edition.
Hi, Could anyone pls help me to find out the weblogic edition (stardard / enterprise / express). tried with java weblogic.version with verbose, displays the patch and verion,. no clue. BEA\weblogic92\server\bin>java weblogic.version -verbose WebLogic
-
We just purchased several iPads and are using them in our school. We were just told that the iPads Re taking up a significant amount of our bandwidth and that is threatening our networks ability to run online testing. So the district is collecting al