BACKUP and RECOVERY
USER MANAGED BACKUP - UMB
Take full cold backup of the database(db_name=test)
Restore the backup with different DB name(prod)
make sure you store datafile and logfile in different mount point.
Take hot backup of dev database and clone it to different name(qadb)
1. nid (DBNEWID Utility)
2. recreate control file set newname
Recovery:
Corrupt the following and recover it.
- take backup of control file in txt format.
spfile : Hint [use strings] , if no spfile/pfile , check alert log and get the parameters.
controlfile
. multiplexed
. having only one control file
logfile:
inactive log file [ easy]
current logfile (try using undocumented parameter discussed in the class)
Tablespace: (try recovering online, and report the steps how you recovered)
sysaux - datafile
system
user_data
undo
temp
drop a table and recover the same using PITTR
Very important : Explain the concepts behind "alter tablespace .. begin backup"
TOPIC 2. RMAN (Any doubts discuss with your trainer)
Take full backup
take a level - 0 full backup
take a differential backup - L1 (twice to know the difference)
take a cummulative backup-L0
using RMAN clone a database using duplicate command
Corrupt the following and recover it.
spfile : Hint [use strings] , if no spfile/pfile , check alert log and get the parameters.
controlfile
. multiplexed
. having only one controlfile
logfile:
inactive log file [ easy]
current logfile (try using undocumented parameter discussed in the class)
Tablespace: (try recovering online, and report the steps how you recovered)
sysaux - datafile
system
user_data
undo
temp
drop a table and recover the same using PITR
remove archive logs from physical level. Check and clear the information in repository
regarding archive logs from RMAN
Restore the backup taken in dev database to prod database. (Hint : catalog the backup files)
======================================================================================
TOPIC 3- IMPORT AND EXPORT ( get the tax.dmp from out shared drive)
======================================================================================
perform a schema refresh from tax user to tax1 user
perform a schema refresh from tax1 user to tax2 and tax3(single command)
mention the pre - requisites of schema refresh and post schema refresh steps
Export schema with only structure and no data
create a table Ao in tax user from all_objects , insert the data from all_objects till the table reaches the size of 500mb.
check number of extents, export the created table and import the table to other user using compress option.
check number of extents
export the tables from tax user but the dump file size should be 100mb.
export table AO but using sys user
import the table data only without index into another user with below parameter
Commit, buffer
import index alone
using transportable tablespace option complete import and export of dev database
How to read the contents of dump
import the tax dump without data into user u1.
import the data separately into the user u1
import the index separately into user u1.
======================================================================================
TOPIC 4- DATAPUMP ( more real time scenarios will be given on Zoom meeting)
======================================================================================
schema refresh - tax
abort the session when taking export, restart the export from the interruption add parallel option
export all tables from a user without records
create export and import without creating dump file (using network link)
take export of a single column from a table
create a table as a copy of all_objects without data. Import the data from dump of the all_objects
how will you increase performance of data pump and start the job, stop the job,kill the job , restart the job,check the
status and continue the job.
clone the TAX schema to tax1 using datapump
export the tax dump and import all the tables into user02 without data and without index
import the data separately into the user user02
import the index separately into user user02.
read the dump
using transport tablespace option complete import and export of dev database
take a dump in 12c and import it into 19c database.
No comments:
Post a Comment