|
Category :
Database
Resources -> Backup and Recovery
DB Version
:
Oracle 9i
OS Details :
Sun Solaris9
Following
are the steps that need to be done in order to recover from the
corruption or loss
of NON-SYSTEM tablespace datafile or datafiles from tablespaces not containing
rollback segments. The database needs to be in archivelog mode for
these steps to work.
Step 1:
If the database is open, do
not shut it down since you might have trouble opening it again with
missing datafiles.
Step 2:
Take the tablespace or
datafile with the corrupted or missing file(s) offline.
SQL> alter table users
offline immediate;
(or)
SQL> alter database
datafile '/oradata/tables/users01.dbf' offline immediate;
We need to use the immediate
option to make the file offline otherwise oracle might attempt to
perform a checkpoint on the file.
Step 3:
Restore only the lost or
damaged file from the most recent full database backup.
Step 4:
Make sure the archived log
files from the time the last full database backup was taken (the point
in time from which files were restored in step 3 above) exists
on the machine where recovery's being done and start the tablespace recovery
process.
SQL> recover automatic
tablespace users;
(or)
SQL> recover automatic
datafile '/oradata/tables/users01.dbf';
Step 5:
After a successful recovery
process, bring the tablespace or the datafile online.
SQL> alter table users
online;
(or)
SQL> alter database
datafile '/oradata/tables/users01.dbf' online;
Step 6:
Take a full offline backup of
the database and after the backup, make it available to the users. |