Need to drop datafile from my undo tablespace
I have a undo tablespace and it has 2 datafiles. i would like to drop one datafile.
befor i am droping this datafile i am going to bring this file to offline and i got this message: ORA--01145 offline immediate disallowed unless media recovery enable.
can someone tell me how i can safly do it without any problem.
Thanks
An undo tablespace can be dropped like any other tablespace, but not until all transactions within the tablespace are complete. First, specify a new undo tablespace as in the previous example. To see if the tablespace has any pending transactions, run the following query:
SQL> select rn.name, rs.status
2 from v$rollname rn, v$rollstat rs
3 where rn.name in
4 (select segment_name from dba_segments
5 where tablespace_name = 'UNDOTBS')
6 and rn.usn = rs.usn
7 ;
Similar Messages
-
Drop datafile from a offline tablespace
We are running oracle 9.2 on windows.
Out of the 3 datafiles in a non-system tablespace A, one datafile A-DF1 was accidently droped from the file system by our DBA.
The other two datafiles were brought online by using the ALTER DATABASE RECOVER command by bringning the database in mount phase.
Now we want to remove that datafile A-DF1 from the tablespace and bring that tablespace online.
The database is not in archive mode and no cold backup was present.
The solution that we want to try is:
1-drop the tablespace A without dropping the datafiles
2-create a new tablespace and reuse those datafiles
3-assign this new tablespace to the affected user
Would this work? Do you have any other safe solution for this problem?
thanks
ImranHi..
Your solution is a wrong solution.
1. I guess, that the tablespace A won't be a empty tablespace.As, the objects are present in the tablespace you can't drop the tablespace without dropping its contents.You will have to use *DROP TABLESPACE <tbs_name> INCLUDING CONTENTS; -- This will drop all the contents.
2. Do, you have a export backup, or any kind of backup.As the database is in no archivelog mode, you won't be able to do complete recovery.
3. Take the datafile A-DF1 OFFLINE and keep the tablespace online. -- alter database datafile 'datafile_name' offline;
If you don't have any kind of backup, the data is LOST.
Anand -
DROP DATAFILE FROM A TABLESPACE
What is the difference between "ALTER TABLESPACE DROP DATAFILE ..." and "ALTER DATABASE DATAFILE ... OFFLINE DROP"?
I read the Oracle document before, it tolds me that the "ALTER DATABASE DATAFILE ... OFFLINE DROP" is not really drop data file. But, does the "ALTER TABLESPACE DROP DATAFILE ..." really drop data file?"ALTER DATABASE DATAFILE ... OFFLINE DROP"
will take datafile offline to drop it later. In this case your control file will need to be recreated to de-link the datafile from database.
From 10g onwards you can ALTER TABLESPACE DROP DATAFILE... but in this case datafile should not contain any data in it. -
I'm new to oracle.
After I extended a tablespace I understood that it was too large.
I've been reading about how to drop a tablespace, but I don't want to drop the entire tablespace. I just want to drop the last datafile of this tablespace.
I know how to drop tablespaces in sapdba and brtools, but I don't know how I can drop one specific datafile (number 29) of the tablespace PSAPBTABD?
Please Help med.
Best regards
Harald VHello Harald,
see please this thread:
Re: How to drop data file?
also the section 43. <i>How can I delete a data file that was created by mistake</i>
in the SAP Note<i><b> 592393 - FAQ: Oracle</b></i>
if you have Oracle 9i databases, it is not easy to drop a datafile, but in Oracle 10g
you can drop a datafile like that:
<b><i>ALTER TABLESPACE</i></b> <<u><i>Tablespace Name</i></u>> <b><i>DROP DATAFILE</i></b> '<<u>PATH und NAME of Datafile</u>>';
for example, you have a tablespace called PSAPC11 and you want to drop a datafile called dat.data15 of this tablespace, you can drop it like that:
e.g. <b><i>alter tablespace</i></b> <u>PSAPC11</u> <b><i>drop datafile</i></b> <u>'/oracle/C11/psapc11/dat.data15'</u>
Best regards
Baran -
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 -
Drop a datafile from physical standby's control file
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database...
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
Regards,
JibuJibu wrote:
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database..
Hi,
What is your version?
If you added new datafile or created new tablespace, take backup again for restore new created standby database.
If your standby database running well, DG configuration success, then this datafile will create on standby side, too.
Set STANDBY_FILE_MANAGEMENT=AUTO best practice.
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
Not need any delete datafile from standby side, you must recreate standby database, or you can take RMAN backup and restore to standby side again.
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
It is not logical, Physical standby must be bit-for-bit same with Primary database.
Regards
Mahir M. Quluzade -
Question about ALTER TABLESPACE add/drop datafile
Good afternoon,
As an exercise, I created a tablespace STORETABS and added a datafile to it using the command:
SQL> alter tablespace storetabs add datafile 'e:/storetabs3.dbf' size 50M;This step succeeded. A new file was created in the root of e: as expected.
Following that command, I issued:
SQL> alter tablespace storetabs drop datafile 'e:/storetabs3.dbf';
Tablespace altered.The command succeeded. However, the file *'e:/storetabs3.dbf'* was not removed. After re-reading the documentation found at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3002.htm, I get the impression that removing the O/S file itself is something that always needs to be done manually.
The question: Am I correct that there is no option to cause the "alter tablespace <tablespace> drop datafile <datafilename>" to delete the O/S file ? In other words, must the O/S file always be manually deleted as a separate step ?
Thank you for your help,
John.I believe in windows directory paths used backslash and not forward slash.
You can argue why oracle does not give error, either while creating or while dropping ;)
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 Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> select tablespace_name, file_name from dba_data_files ;
TABLESPACE_NAME
FILE_NAME
USERS
/u01/app/oracle/oradata/orcl/users01.dbf
UNDOTBS1
/u01/app/oracle/oradata/orcl/undotbs01.dbf
SYSAUX
/u01/app/oracle/oradata/orcl/sysaux01.dbf
SYSTEM
/u01/app/oracle/oradata/orcl/system01.dbf
EXAMPLE
/u01/app/oracle/oradata/orcl/example01.dbf
SCOTT_TBS
/home/oracle/scott_f1.dat
6 rows selected.
SQL> !ls -l scott_f1.dat
-rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
SQL> alter tablespace scott_tbs add datafile '/home/oracle/scott_f2.dat' size 10M ;
Tablespace altered.
SQL> !ls -l scott_*.dat
-rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
-rw-r----- 1 oracle oinstall 10493952 Sep 11 21:18 scott_f2.dat
SQL> alter tablespace scott_tbs drop datafile '/home/oracle/scott_f2.dat' ;
Tablespace altered.
SQL> !ls -l scott*.dat
-rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat -
Partial Recovery - Skip UNDO Tablespace
Hi,
I was performing a partial database recovery using skip tablespace option using RMAN. I was wondering if I can skip undo tablespace.
I was not able to conclude whether I can do that? If not, why?
As per my understanding,
1. Datafiles are restored - If they have any uncommited data, then archive logs which will be applied for media recovery, will have the undo data to perform those roll backward.
2. While performing media reccovery using archive logs, it will generate it's own undo data.
Why do we need the stale undo data (generated till datafiles restoration point)?
Thanks,
Janak AgrawalSoli,
Thread that you have specified, talks about datafiles which does not have any uncommitted data (As the database was normally shutdown). In this case, we can drop and recreate the undo tablespace.
But I am talking about a past point-in-time recovery using RMAN, where the datafiles which will be restored may have the uncommitted data. To rollback these uncommited trnasactions, will we have data in next archivelogs, which will be used for media recovery or the data (needed to rollback) will have only in undo tablespace. Let me give you an example.
At 9 am I want to restore the datbase till 8.15 AM. Full backup is available till 8 AM and then from 8 to 8:15 arvhive logs are available. While doing recovery, datafiles will be restored till 8 AM. If at 8 AM there is some uncommitted data in datafiles, will it require data from undo tablespace to rollback or first archive log after 8 AM w'd take care of roll back? If archive logs can take care of rollback, why can't I skip the undo tablespace while doing recovery?
Santosh,
As you mentioned, UNDO data will require for read-consistency. But the same data will be available in archive logs (which will require after datafiles restore) which can generate their own UNDO data.
Please clarify. I am sorry if I am missing anything here.
Thanks,
Janak Agrawal -
Undo tablespace corruption will terminate DB operation
Hi All,
Just for the concept, if undotablespace datafile got corrupted due to any reasion, will it force to terminate the DB operation.
O know this will happen with control file and SYTEM datafile only.
Please confirm.
Regards,
SSHmm what to check? It says the same, it is not mandatory that instance would surely get shut down with the loss of undo tablespace. But you MUST do the recovery of it when the database is closed. I guess that's what that doc is also saying.
Update:
See below where I would show the same thing happening. We would start from the undo tablespace getting deleted and would check the alert log for any message. Also we would check the status of teh database after the drop,
Session 1
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 6 10:43:35 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 79694068 bytes
Database Buffers 83886080 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 79694068 bytes
Database Buffers 83886080 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> select name from V$datafile;
NAME
--------------------------------------------------------------------------------/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
SQL> !rm /u01/app/oracle/oradata/orcl/undotbs01.dbf
SQL> select status from V$instance;
STATUS
------------ <-- The database is open
OPEN
#At this time, in the alert log there was no message.
#Let's try some ddl/dmls.
SQL> create table t( a number);
Table created.
SQL> insert into t values(1);
1 row created.
SQL> commit;
Commit complete.
SQL> delete t;
1 row deleted.
#No problem so far. Let's issue a checkpoint, this would force oracle to check the file and its status.
SQL> alter system checkpoint;
System altered.
SQL>
Session-2(Alert log's tail)
Output snipped
ORA-01110: data file 2: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
Thu Aug 6 11:11:19 2009
Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_pmon_4402.trc:
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
Thu Aug 6 11:11:19 2009
Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_pmon_4402.trc:
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
Thu Aug 6 11:11:19 2009
Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_pmon_4402.trc:
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2: '/u01/app/oracle/oradata/orcl/undotbs01.dbf'
#Let's check the status again,
SQL> select stauts from V$isntance;
select stauts from V$isntance
ERROR at line 1:
ORA-00603: ORACLE server session terminated by fatal error
Its crashed now as db couldn't find the undo tablespace.
HTH
Aman....
Edited by: Aman.... on Aug 6, 2009 11:28 AM added demo. -
Hello all,
I have a database 11.1.0.7 where I wanted to remove a datafile. The database is in archivelog.
The first thing that I did was to make sure that no data was in the datafile. - OK
Then, since I only wanted to remove 1 week later, I put the datafile offline - OK
On the day (one week after putting it offline) that I was going to remove/drop the datafile from the tablespace I got an ORA- saying to put the datafile online before dropping.
And here is my problem! The database says that the datafile needs recover :(
Questions:
1- If the datafile was offline, why does it need recover?
2- Do you thing that the database will ask for all archivelogs until now to recover this datafile ?
3- If I dont want to apply all archivelogs, can I simply remove the datafile by recreating the controlfile without this datafile?
Thank you.Questions:
1- If the datafile was offline, why does it need recover?The SCN must be alligned with the DB
2- Do you thing that the database will ask for all archivelogs until now to recover this datafile ?I never tried that with missing archived logs so I cannot say it. Just try and you will see.
3- If I dont want to apply all archivelogs, can I simply remove the datafile by recreating the controlfile without this datafile?The problem is that this datafile is registered in the dictionary. You cannot do it.
Probably you got this exception:
ORA-03264: cannot drop offline datafile of locally managed tablespace
Cause: Trying to drop offline datafile in lmts
Action: Try to drop file after making it onlinehttp://download.oracle.com/docs/cd/B28359_01/server.111/b28310/dfiles006.htm#ADMIN11435
Restrictions for Dropping Datafiles
The following are restrictions for dropping datafiles and tempfiles:
- The database must be open.
- If a datafile is not empty, it cannot be dropped.
- If you must remove a datafile that is not empty and that cannot be made empty by dropping schema objects, you must drop the tablespace that contains the datafile.
- You cannot drop the first or only datafile in a tablespace.
- This means that DROP DATAFILE cannot be used with a bigfile tablespace.
- You cannot drop datafiles in a read-only tablespace.
- You cannot drop datafiles in the SYSTEM tablespace.
- If a datafile in a locally managed tablespace is offline, it cannot be dropped. -
If I have two undo tablespace, under what situation oracle will use another
if I have two undo tablespaces, under what situation oracle will use another
one is default undo tablespace, another is created manually
will it use it when the default one is full?
it seem like to be it won't use the second undo tablespace.
thanks
Edited by: user11402556 on Jul 3, 2010 2:18 PMYou can have two Undo Tablespaces created with the CREATE UNDO TABLESPACE syntax.
However, the current database instance will use the Undo Tablespace specified by the instance level parameter undo_tablespace.
When you want to switch the datafiles of an undo tablespace from, say, one mount point to another (or when you want to "resize" an undo tablespace that has grown very large for specific one-off / adhoc jobs), you would create another undo tablespace, reset the instance level parameter to the new undo tablespace and wait for a decent interval (e.g. at least undo_retention or autotuned undo retention) before dropping the old undo tablespace.
So yours is not a hypothetical question. Having two undo tablespaces is a real-world practice -- but the two are concurrently present for only a short duration, while transactions and queries switch from one to the other.
(In RAC, each database instance must have it's own Undo tablespace as well).
Hemant K Chitale -
Open XE without UNDO tablespace
Hy
I have an oracle xe installation on linux ubuntu that does not start, it arrives in MOUNT status.
When i try to open i get the following messages:
ORA-01172: recovery of thread 1 stuck at block 153 of file 2
ORA-01151: use media recovery to recover block, restore backup if needed
Unfortunately it is in NOARCHIVELOG mode.
Can i open it with no UNDO tablespace, and the add a new datafile to the UNDO tablespace?
Thanks
LorenzoHere is alert log content: the last shutdown was not clean
Here there is not the shutdown log...
Tue Mar 9 17:42:29 2010
starting up 4 shared server(s) ...
Oracle Data Guard is not available in this edition of Oracle.
Tue Mar 9 17:42:31 2010
ALTER DATABASE MOUNT
Tue Mar 9 17:42:35 2010
Setting recovery target incarnation to 2
Tue Mar 9 17:42:35 2010
Successful mount of redo thread 1, with mount id 2594312135
Tue Mar 9 17:42:35 2010
Database mounted in Exclusive Mode
Completed: ALTER DATABASE MOUNT
Tue Mar 9 17:42:35 2010
ALTER DATABASE OPEN
Tue Mar 9 17:42:35 2010
Beginning crash recovery of 1 threads
Tue Mar 9 17:42:35 2010
Started redo scan
Tue Mar 9 17:42:36 2010
Completed redo scan
1264 redo blocks read, 136 data blocks need recovery
Tue Mar 9 17:42:36 2010
Started redo application at
Thread 1: logseq 175, block 2, scn 6715755
Tue Mar 9 17:42:36 2010
Recovery of Online Redo Log: Thread 1 Group 2 Seq 175 Reading mem 0
Mem# 0 errs 0: /usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/onlinelog/o1_mf_2_5dm8sg16_.log
RECOVERY OF THREAD 1 STUCK AT BLOCK 153 OF FILE 2
Tue Mar 9 17:42:37 2010
Aborting crash recovery due to error 1172
Tue Mar 9 17:42:37 2010
Errors in file /usr/lib/oracle/xe/app/oracle/admin/XE/udump/xe_ora_4250.trc:
ORA-01172: recovery of thread 1 stuck at block 153 of file 2
ORA-01151: use media recovery to recover block, restore backup if needed
ORA-1172 signalled during: ALTER DATABASE OPEN... -
Hi Group
We need to free up an old UNDO tablespace (TS_ROLLBACK) because we have created a new one (TS_UNDO), ¿how can we do that?, we need to drop old UNDO tablespace but it keeps some extents active more than 4 days.
OWNER SEGMENT_NAME TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO COMMIT_JTIME COMMIT_WTIME STATUS
SYS SYSSMU8$ TSROLLBACK 0 51 122 57344 7 51 ACTIVE
SYS SYSSMU8$ TSROLLBACK 2 104 8969 1048576 128 104 ACTIVE
SYS SYSSMU215$ TSUNDO 3 107 3593 1048576 128 107 ACTIVE
SYS SYSSMU229$ TSUNDO 0 107 6370 57344 7 107 ACTIVE
SYS SYSSMU229$ TSUNDO 3 107 46985 1048576 128 107 ACTIVE
SYS SYSSMU256$ TSUNDO 3 107 40073 1048576 128 107 ACTIVE
Thank you so muchWhen I try to drop the tablespace it shows the message:
ORA-30013: undo tablespace 'TS_ROLLBACK' is currently in use.
The result of the query is (i've copied 4 lines of 68, there is a transaction that have started on 15 January, could it be what locking the ts?:
ADDR XIDUSN XIDSLOT XIDSQN UBAFIL UBABLK UBASQN UBAREC STATUS START_TIME START_SCNB START_SCNW START_UEXT START_UBAFIL START_UBABLK START_UBASQN START_UBAREC SES_ADDR FLAG SPACE RECURSIVE NOUNDO PTX NAME PRV_XIDUSN PRV_XIDSLT PRV_XIDSQN PTX_XIDUSN PTX_XIDSLT PTX_XIDSQN DSCN-B DSCN-W USED_UBLK USED_UREC LOG_IO PHY_IO CR_GET CR_CHANGE
C00000011B25E880 8 26 2204276 0 0 0 0 ACTIVE 01/15/10 18:03:24 135089268 23 2 104 9065 -17910 27 C000000117D19BF8 5635 NO NO NO NO 0 0 0 0 0 0 0 0 0 0 13 23 37359 2
C00000011AC1ED80 271 26 3160 0 0 0 0 ACTIVE 01/21/10 08:00:03 341730228 23 3 107 22901 208 49 C000000117E65CE8 4199939 NO NO NO NO 0 0 0 0 0 0 0 0 1 1 3 257 2492 0
C00000011B1F0A20 251 5 2102 0 0 0 0 ACTIVE 01/21/10 08:04:54 341785988 23 3 107 53963 194 43 C000000117E3D898 4199939 NO NO NO NO 0 0 0 0 0 0 0 0 1 1 11 13 1008162 16
C00000011B25A138 255 5 2932 0 0 0 0 ACTIVE 01/21/10 08:17:49 342060712 23 2 107 3350 331 9 C000000117E1BDE8 4199939 NO NO NO NO 0 0 0 0 0 0 0 0 1 1 3 5 19 0 -
Hi,
Was doing an exercise of bringing the database up if one of the datafile is curropt and the data on that data file is not required.
I did this:-
1. While the database is running I edited the datafile , dropped some junk in it.
2. Shutdown.
3. Startup mount
4. alter database datafile 'xxx' offline drop;
5. alter database open;
6. drop tablespace yyy.
7. create tablespace.
Worked ok.
But when I tried this for undo (just out of curiosity).
alter database datafile...
alter database open;
create undo tablspace new_undo;
alter system set undo_tablespae = new_undo;
drop old undo_tbs <<<< failed.
says active rollback segment exists.
Actually I tried this exercise twice first time I was able to drop the old undo tablespace but the second time it didn't.
Can somebody show how to open the database in this scenario i.e if the datafile asscoiated with undo tablespace is curropt.
Thanks.Hi,
The size of the undo tablespace is related to the transaction activity and size and the setting of the undo_retention parameter.
You can use the undo advisor in OEM for setting an optimal value or size (see link).
http://www.oracle.com/technology/obe/10gr2_db_vmware/manage/undo/undoadv.htm#t4
Can you post the current size of thedatabase, the undo tablespace and the value of undo_retention?
Regards,
Tycho -
Undo tablespace to recover without backup
hi,
I offlined one of my datafile containing in undo tablespace. Now my database is in mount stage when I tried to open the database it gives me the following error:
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-00376: file 17 cannot be read at this time
ORA-01110: data file 17: '/misc/live_tbs/undotbstest.dbf'
My database is in noarchive mode plus I dont have a backup.
Thank you for your cooperation.
Regards,
Adnan Hamdus Salam.adnan wrote:
hi,
I offlined one of my datafile containing in undo tablespace. Now my database is in mount stage when I tried to open the database it gives me the following error:
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-00376: file 17 cannot be read at this time
ORA-01110: data file 17: '/misc/live_tbs/undotbstest.dbf'
My database is in noarchive mode plus I dont have a backup.
Thank you for your cooperation.
Regards,
Adnan Hamdus Salam.If your database`s last shutdown was clean(SHUTDOWN IMMEDIATE) then you can open database as
1) Backup current database(take cold backup)
2) if you use pfile then edit it and UNDO_MANAGEMENT=MANUAL also if you use spfile then ALTER SYSTEM SET UNDO_MANAGEMENT=MANUAL SCOPE=SPFILE then
3)SHUTDOWN IMMEDIATE and STARTUP MOUNT
4) Now ALTER DATABASE DATAFILE '/misc/live_tbs/undotbstest.dbf' OFFLINE DROP
5) ALTER DATABASE OPEN
After that you can create new undo tablespace and set UNDO_MANAGEMENT=AUTO
Maybe you are looking for
-
HP Officejet Pro X476dw MFP Wireless Connection Lost
Setup HP Officejet Pro X476dw MFP (hereafter MFP) connected wirelessly to Apple Airport Extreme Base Station (AEBS). Two MacBook Pros (MBP) also connected wirelessly to AEBS. MFP has been assigned a fixed IP address which has been removed from the
-
Do i have to connect ipad to a computer for it to be recognized as a device in itunes?
My son has his own Apple Id but I did not want to connect to my computer. Do I have to connect it to the computer to have it recognized in iTunes?
-
Hi all, Product: HFM version 11.1.1.3.0 Database: Oracle 10GR2 HFM is 64 bit application (Classic) Purpose of action: To get more disk space by deleting some application on UAT environment? How I delete the application? Delete the application from Sh
-
How to setup CS4 onto desktop if originally installed on another computer
I have a new desktop I want to download my CS4 Photoshop onto. I have it currently installed on my laptop. Purchased original product from Adobe online. What is the procedure for doing this?
-
How to create a page like Popup Key LOV page
I want to create a page like the page when clicking an Popup Key LOV item. Is there a template which i can see how it has been created. Thanks, Jen