Oracle DB Backup Methods
Oracle DB Backup Methods
1. RMAN
2. Data Pump
3. User – managed --- I think I did this for OPatch b/up the other day
User-Managed Techniques
o use operating system commands such as the Linux dd for backing up and restoring files
and the SQL*Plus RECOVER command for media recovery.
o Fully support but not recommended
Data Pump
o Oracle Data Pump technology enables very high-speed movement of data and metadata
from one database to another.
Requires
rollback or
Open Supported. No need to Supported. Must
undo segments
database use BEGIN/END BACKUP sta use BEGIN/END BACKU
to generate
backups tements. P statements.
consistent
backups.
Incremental
Supported. Not supported. Not supported.
backups
Backup of
initialization
Supported. Supported. Not supported.
parameter
file
Backup of
password
and Not supported. Supported. Not supported.
networking
files
Platform-
independent
Supported. Not supported. Supported.
language for
backups
Recovery Manager (RMAN)
Recovery Manager is fully integrated with the Oracle Database to perform a range of backup
and recovery activities, including maintaining an RMAN repository of historical data about
backups.
access RMAN through the command line or through Oracle Enterprise Manager.
RMAN COMMAND
To start RMAN, in command line: rman
CONNECT TARGET;
SHOW ALL;
BACKUP VALIDATE CHECK LOGICAL
To see the files that have been back up & can be recovered
REPORT SCHEMA;
CROSSCHECK BACKUP;
CROSSCHECK COPY;
Oracle Data Pump
three distinct components:
o Command-line clients, expdp and impdp
o DBMS_DATAPUMP PL/SQL package (also known as the Data Pump API)
o DBMS_METADATA PL/SQL package (also known as the Metadata API).
expdp and impdp - > starts the Oracle Data Pump Export utility and Oracle Data Pump
Import utility, respectively.
o Need login credentials – thought sys has sysdba privileges
Command to check current user does this mean sysdba = sys ---?
Checking privileges;
To see directory:
DIRECTORY:
Using DIRECTORY parameter, specify the default location to which Export can write the dump file set
and the log file. Here in my case DIRECTORY parameter is set on the directory object,
DATA_PUMP_DIR
DUMPFILE:
Using DUMPFILE parameter, specify the names, and optionally, the directory objects of dump files
for an export job.
The dump file is made up of one or more disk files that contain table data, database object’s
metadata and control information. In addition to that, these files are written in binary format and
dump files can be imported only by data pump impdp import utility. As they are written in binary
format by server using expdp export utility thus they should not be tampered. Changing information
in these files might compromise the data consistency which may cause an error while importing.
You can supply multiple file names here separated by comma. Dot dmp is the default extension for
dump file. If no extension is given then expdp export utility will use this default extension. Though
you can specify whatever extension you want but it’s always advisable to use the oracle
recommended extensions.
Log file:
Using log file parameter expdp export utility will generate a human readable log file for you which
are very helpful in tracking the status of your export.
FULL:
This parameter full indicates that you want to perform a full database export. This parameter can
have YES or NO values. If you set this parameter to YES that means expdp utility will export all the
data and metadata of the database.