4 Starting and Interacting With Rman Client

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

--control listener status

$ lsnrctl status

--if does not run then start listener


$ lsnrctl start

--startup database
$ sqlplus / as sysdba

SQL> startup

--exit sqlplus
SQL> exit

--start rman prompt


$ rman

--connect to database
RMAN> connect target /

--connect to database when running rman prompt


$ rman target /

--to display the configuration


RMAN> SHOW ALL;

RMAN> SHOW RETENTION POLICY;

RMAN> SHOW DEFAULT DEVICE TYPE;

--To enable the autobackup feature:


RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

--To disable the autobackup feature:


RMAN> CONFIGURE CONTROLFILE AUTOBACKUP OFF;

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2G;

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT /tmp/%U;

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/disk1/ora_df%t_s%s_s%p';

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '+dgroup1';

RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR;

RMAN> CONFIGURE RETENTION POLICY CLEAR;

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;

RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;


RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

RMAN> CONFIGURE RETENTION POLICY TO NONE;

RMAN> SHOW BACKUP OPTIMIZATION;

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;

RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO SBT

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO disk; # backup goes to disk

RMAN> CONFIGURE DEVICE TYPE disk PARALLELISM 2; # two channels used in parallel

RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/disk1/%U' # 1st channel to
disk1

RMAN> CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/disk2/%U' # 2nd channel to
disk2

--configuration for tape


RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;

RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(OB_MEDIA_FAMILY=first_pool)';

RMAN> CONFIGURE MAXSETSIZE TO 7500K;

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2G;

# Makes 2 disk copies of each data file and control file backup set
# (autobackups excluded)
RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
# Makes 3 copies of every archived redo log backup to tape
RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 3;

RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt CLEAR;

RMAN> CONFIGURE EXCLUDE FOR TABLESPACE tbs_data;

RMAN> CONFIGURE EXCLUDE FOR TABLESPACE tbs_indx;

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON;

RMAN> SET ENCRYPTION ON;

RMAN> CONFIGURE ENCRYPTION FOR DATABASE OFF;


RMAN> CONFIGURE ENCRYPTION ALGORITHM TO 'AES256';

RMAN> CONFIGURE AUXNAME FOR DATAFILE 2 TO 'C:\APP\ORA_C\VIRTUAL\ORADATA\ORCL\


ORCLPDB\tbs_data02.dbf';

RMAN> CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR;

You might also like