Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Recovering from Noncritical Losses

Copyright 2008, Oracle. All rights reserved.

Objectives
After completing this lesson, you should be able to: Recover temporary tablespaces Recover a redo log group member Recover from a lost index Re-create the pass ord file

4-2

Copyright 2008, Oracle. All rights reserved.

!auses of "ile Loss


"ile loss can be caused by: #ser error Application error $edia failure

4-3

Copyright 2008, Oracle. All rights reserved.

!ritical %ersus Noncritical


A noncritical file loss is one continue to function& here the database can

'ou fix the problem by ta(ing one of these actions: !reate a ne file& Rebuild the file& Recover the lost or damaged file&

4-4

Copyright 2008, Oracle. All rights reserved.

Losing a TEMPFILE
)*L statements that re+uire TEMP space to execute fail if one of the tempfiles is missing&
SQL> select * from big_table order by 1,2, ,!,",#,$,%,&,1',11,12,1 ( select * from big_table order by 1,2, ,!,",#,$,%,&,1',11,12,1 * E))*) at li+e 1, *)-.'1"#", error i+ ide+tifyi+g file /01'10a220oracle0oradata0orcl0tem2'13dbf/ *)-.2$' $, 1+able to obtai+ file stat1s Li+14 Error, 2, 5o s1c6 file or directory

4-5

Copyright 2008, Oracle. All rights reserved.

Recovering from a TEMPFILE Loss

)')-.$

#).R)

,arameter file ,ass ord file

Redo log Redo log file 2A file 23 Redo log Redo log file 4A file 43 !ontrol files

)')A#/

1N0./

#N0O

-.$,

4-6

Copyright 2008, Oracle. All rights reserved.

Log 5roup )tatus: Revie

A redo log group has a status of one of the follo ing values at any given time: 78))E5T: -he L56R process is currently riting redo data to it& -7TI9E: 1t is no longer being ritten to, but it is still re+uired for instance recovery& I5-7TI9E: 1t is no longer being ritten to, and it is no longer re+uired for instance recovery&

4-

Copyright 2008, Oracle. All rights reserved.

Losing a Redo Log 5roup $ember


-he alert log and the archiver process 7AR!n8 trace file record an error hen a redo member file is missing&

Errors i+ file 01'10a220oracle0admi+0orcl0bd1m20orcl_arc1_2"$ &3trc, *)-.'' 1 , o2e+ failed for members of log gro12 2 of t6read 1 *)-.'' 12, o+li+e log 2 t6read 1, /01'10a220oracle0oradata0orcl0redo'2b3log/ *)-.2$' $, 1+able to obtai+ file stat1s Li+14 Error, 2, 5o s1c6 file or directory

4-8

Copyright 2008, Oracle. All rights reserved.

Re-creating Redo Log "iles


Redo log Redo log file 2A file 23 Redo log Redo log file 4A file 43 !ontrol files

)')-.$

#).R)

,arameter file ,ass ord file

)')A#/

1N0./

#N0O

-.$,

SQL> > SQL> SQL> > >


4-!

-LTE) :-T-;-SE :)*P L*<FILE MEM;E) /01'10a220oracle0oradata0orcl0redo'2b3log/( =rm 01'10a220oracle0oradata0orcl0redo'2b3log -LTE) :-T-;-SE -:: L*<FILE MEM;E) /01'10a220oracle0oradata0orcl0redo'2b3log/ T* <)*8P 2(
Copyright 2008, Oracle. All rights reserved.

#ecreati$g #edo %og &iles '$otes o$ly slide(

4 - "0

Copyright 2008, Oracle. All rights reserved.

#ecreati$g #edo %og &iles '$otes o$ly slide(

4 - ""

Copyright 2008, Oracle. All rights reserved.

Re-creating Redo Log "iles

4 - "2

Copyright 2008, Oracle. All rights reserved.

Re-creating 1ndexes
#se options to reduce the time it ta(es to create the index: P-)-LLEL 5*L*<<I5<
SQL> 7)E-TE I5:E> r+ame_id4 2 *5 6r3regio+s ?regio+_+ame@ P-)-LLEL !(

4 - "3

Copyright 2008, Oracle. All rights reserved.

#ecreati$g )$de*es '$otes o$ly slide(

4 - "4

Copyright 2008, Oracle. All rights reserved.

Authentication $ethods for 0atabase Administrators


Remote database administration Local database administration

0o you have a secure connection9

'es

0o you ant to use O) authentication9

'es

#se O) authentication&

N o

No

#se a pass ord file&

4 - "5

Copyright 2008, Oracle. All rights reserved.

Re-creating a ,ass ord Authentication "ile


2& Log in to the database by using O) authentication& 4& )et the )EM*TE_L*<I5_P-SSA*):FILE parameter to 5*5E and restart the database& :& Re-create the pass ord file by using ora2Bd&
C ora2Bd fileDC*)-7LE_E*ME0dbs0ora2B*)7L 2assBordDadmi+ e+triesD"

;& )et )EM*TE_L*<I5_P-SSA*):FILE to E>7L8SI9E& <& Add users to the pass ord file and assign appropriate privileges to each user& =& Restart the instance&

4 - "6

Copyright 2008, Oracle. All rights reserved.

+otes O$ly ,lide

4-"

Copyright 2008, Oracle. All rights reserved.

)ummary
1n this lesson, you should have learned ho Recover temporary tablespaces Recover a redo log group member Recover from a lost index Re-create the pass ord file to:

4 - "8

Copyright 2008, Oracle. All rights reserved.

,ractice Overvie : Recovering from Lost TEMPFILE and Redo Log "ile
-his practice covers the follo ing topics: )tarting the database ith a missing tempfile !reating a ne temp file Altering the default temporary tablespace for a database Recovering from a lost online redo log member

4 - "!

Copyright 2008, Oracle. All rights reserved.

4 - 20

Copyright 2008, Oracle. All rights reserved.

You might also like