Database Reference
In-Depth Information
-- ALTER DATABASE REGISTER LOGFILE
'/oracle01/fast_recovery_area/ORCL/archivelog/2013_08_16/o1_mf_1_1_%u_.arc';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- Set Database Guard and/or Supplemental Logging
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
-- All logs need archiving and a log switch is needed.
ALTER SYSTEM ARCHIVE LOG ALL;
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle01/oradata/orcl/temp01.dbf'
SIZE 182517760 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
Recovering from the Loss of the Password File
If you lose the database password file, it is simple to recover. First, if you have backed up
the password file and it has not changed since the backup, you can simply restore it. If you
did not have a backup of the password file, all you need to do is rerun the
ORAPWD
command
to recreate the password file. The
ORAPWD
command is used to create password files. It's
executed from the command line, as shown in this example:
[oracle@localhost dbs]$ cd $ORACLE_HOME/dbs
[oracle@localhost dbs]$ orapwd file=orapwtest entries=20 password=Robert
In this example, we first changed to the
$ORACLE_HOME/dbs
directory where password
files are stored. Next, we ran the
ORAPWD
command to create the password file. We passed
the name of the password file using the
FILE=
parameter. Password files always start with
ORAPW
followed by the name of the database (
TEST
in this case). The
ENTRIES
parameter
indicates the number of SYSADM entries that are allowed for, and
PASSWORD
indicates the
password associated with the
SYS
account.
Recovering from the Loss of Everything
Loss of everything might rightly be called the “full-meal deal.” It's the worst possible case of
data loss. If you have lost everything, you will need the following to recover your database
when running in ARCHIVELOG mode:
Oracle software
■
Oracle networking-related parameter files
■
Search WWH ::
Custom Search