Pages

Showing posts with label Backup and recovery. Show all posts
Showing posts with label Backup and recovery. Show all posts

Friday, June 9, 2017

Export full database using data pump expdp

Create a directory.
  • cd /home/oracle
  • mkdir -p datapump/fullexport
Connect database using SYS user
  • sqlplus / as sysdba
Create a directory object
  • create a directory orcl_full as '/home/oracle/datapump/fullexport';
Grant read, write privileges on directory object and a rule 'datapump_exp_full_database' to hr user
  • grant read,write on directory orcl_full to hr;
  • grant datapump_exp_full_database to hr;


Saturday, April 1, 2017

Drop database using RMAN

For this, we, first need to connect to the target database and mount (NOT OPEN), enable restricted mode. Following are the rman commands:

RMAN> startup force mount;
RMAN> sql 'alter system enable restricted session';
RMAN> drop database including backups noprompt;

This will remove all datafiles, online redo logs, archived redo logs and control files, backup sets, image copies without any prompts.