Case Study 7 Backup Recovery: Oracle Data Pump (Expdp, Impdp)
Case Study 7 Backup Recovery: Oracle Data Pump (Expdp, Impdp)
Case Study 7 Backup Recovery: Oracle Data Pump (Expdp, Impdp)
Create 2 more users ttest1 and test2 for practice purpose also create some objects in it.
Table Exports/Imports
The TABLES parameter is used to specify the tables that are to be exported. The following is an
example of the table export and import syntax.
1. Go to command prompt and execute datapump export command after completion of export
check the logfile for any errors.
1. Go to command prompt and execute datapump export command after completion of export
check the logfile for any errors.
3. Go to command prompt and execute datapump import command, after completion of import
check the logfile for any errors.
Database Exports/Imports
The FULL parameter indicates that a complete database export is required. The following is an
example of the full database export and import syntax.
1. Go to command prompt and execute datapump export command after completion of export
check the logfile for any errors.
Transportable Tablespace
At source database
CONN / AS SYSDBA
CONN / AS SYSDBA
At destination database
1. CONN / AS SYSDBA
RMAN
[ TARGET connectStringSpec
| { CATALOG connectStringSpec }
.
.
]...
connectStringSpec::=
The following example appends the output from an RMAN session to a text file
at /tmp/msglog.log
RMAN configured settings can specify backup devices, configure a connection to a backup
device (known as a channel), policies affecting backup strategy, and others. The default
configuration is adequate for most purposes.
C:\WINDOWS\system32>rman
To define the path for backup file add following parameter in pfile or spfile
DB_RECOVERY_FILE_DEST = 'E:\cat\omfrc'
DB_RECOVERY_FILE_DEST_SIZE = 2000m
C:\WINDOWS\system32>rman
RMAN> connect target sys/cat1@cat
In this case, backups are stored with generated unique file names with the prefix /disk1/backup_.
The %U substitution variable, used to generate a unique string at this point in the file name, is required.
RMAN>
RUN
{
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK ;
ALLOCATE CHANNEL disk2 DEVICE TYPE DISK ;
ALLOCATE CHANNEL disk3 DEVICE TYPE DISK ;
BACKUP AS COPY DATABASE;
}
RMAN> BACKUP
AS COMPRESSED BACKUPSET
DATABASE PLUS ARCHIVELOG;
RMAN> BACKUP
DEVICE TYPE disk
TABLESPACE vijay, cat10;
RMAN> BACKUP
DEVICE TYPE disk
DATAFILE 1,2,3,4 ;
Backup of the Control File
RMAN> BACKUP DEVICE TYPE disk
TABLESPACE cat10
INCLUDE CURRENT CONTROLFILE;
RMAN> BACKUP
INCREMENTAL LEVEL 0
DATABASE
TAG 'BACKUP_1';
You can also specify a range of archived redo logs by time, SCN, or log sequence number
BACKUP ARCHIVELOG
FROM TIME 'SYSDATE-10'
UNTIL TIME 'SYSDATE-7';
BACKUP ARCHIVELOG
FROM sequence=200 until sequence=230;
After starting RMAN, run the BACKUP INCREMENTAL command at the RMAN prompt. By default
incremental backups are differential.
1. Start RMAN and connect to a target database and a recovery catalog (if used).
2. Ensure that the target database is mounted or open.
3. Execute the BACKUP INCREMENTAL command with the desired options.
Use the LEVEL parameter to indicate the incremental level. The following example makes a level
0 incremental database backup.
RMAN> BACKUP
INCREMENTAL LEVEL 0
DATABASE;
BACKUP
INCREMENTAL LEVEL 1
DATABASE;
Analyse the error…..
Create new tablesapce in the database. Exit from Rman and reconnect to target database.
RMAN>Exit
RMAN>connect target sys/cat1@cat
BACKUP
INCREMENTAL LEVEL 1
DATABASE;