Rman at work

Connecting to RMAN with "NOCATALOG" and "CATALOG"

"rman" client application can be opened directly from command prompt

c:\Oracle\bin>set ORACLE_SID=srinivas

c:\Oracle\bin>echo %ORACLE_SID%
srinivas

c:\Oracle\bin>rman

Recovery Manager: Release 19.0.0.0.0 - Production on Tue Dec 8 12:43:47 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target

connected to target database: SRINIVAS (DBID=3234594012)

RMAN

If you use catalog hosted in a separate in stance as a separate database, connect to that catalog database using TCP protocol. 

set ORACLE_SID=srinivas

Oracle 12c family introduces case sensitivity. And also introduced SYSBACKUP role which is to be granted to that backup user/s. 
WHEN you UPGRADE  a database from 11gR2 to 12c family this SYSBACKUP role is granted internally. When a user is granted that administrative role (or any administrative role that user can not be dropped unless unless the parameter "_oracle_script" is disabled at least at the session level. 

SQL> drop user "cat_srinivas" cascade;
drop user "cat_srinivas" cascade
*
ERROR at line 1:
ORA-28014: cannot drop administrative user or role


SQL> alter session set "_oracle_script"=true;

Session altered.

SQL> drop user "cat_srinivas" cascade;

User dropped.

SQL> create user cat_srinivas 
identified by  
default tablespace users 
temporary tablespace temp 
profile default 
quota unlimited on users;

User created.

SQL> grant recovery_catalog_owner to cat_srinivas;

Grant succeeded.

SQL> grant sysbackup to cat_srinivas;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

c:\Oracle\bin>rman

Recovery Manager: Release 19.0.0.0.0 - Production on Tue Dec 8 16:05:08 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target

connected to target database: ACHARYA (DBID=576297196)

RMAN> exit


Recovery Manager complete.

c:\Oracle\bin>set ORACLE_SID=srinivas

c:\Oracle\bin>rman

Recovery Manager: Release 19.0.0.0.0 - Production on Tue Dec 8 16:06:24 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target

connected to target database: SRINIVAS (DBID=3234594012)

RMAN> connect catalog cat_srinivas/S19it20A@acharya

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> backup database;

Starting backup at 08-DEC-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/08/2020 16:08:55
RMAN-06149: cannot BACKUP DATABASE in NOARCHIVELOG mode

RMAN> shutdown immediate

database closed
database dismounted
Oracle instance shut down

RMAN> startup mount

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area    2550133384 bytes

Fixed Size                     9269896 bytes
Variable Size                570425344 bytes
Database Buffers            1962934272 bytes
Redo Buffers                   7503872 bytes

RMAN> alter database archivelog;

Statement processed

RMAN> archive log list;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "advise, allocate, alter, analyze, associate statistics, audit, backup, begin, @, call, catalog, change, comment, commit, configure, connect, convert, copy, create, create catalog, create global, create or replace global, create or replace script, create script, crosscheck, declare, delete, delete from, describe, describe catalog, disassociate statistics, drop, drop catalog, drop database, duplicate, exit, explain plan, flashback, flashback table, grant, grant catalog, grant register, host, import, insert, list, lock, merge, mount, noaudit, open, print, purge, quit, recover, register, release"
RMAN-01008: the bad identifier was: archive
RMAN-01007: at line 1 column 1 file: standard input

RMAN> alter database open
2> ;

Statement processed

RMAN> backup database;

Starting backup at 08-DEC-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=149 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\DATAFILE\O1_MF_SYSTEM_HVM0QCX5_.DBF
input datafile file number=00003 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\DATAFILE\O1_MF_SYSAUX_HVM0RH9S_.DBF
input datafile file number=00004 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\DATAFILE\O1_MF_UNDOTBS1_HVM0RYO8_.DBF
input datafile file number=00007 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\DATAFILE\O1_MF_USERS_HVM0RZTY_.DBF
channel ORA_DISK_1: starting piece 1 at 08-DEC-20
channel ORA_DISK_1: finished piece 1 at 08-DEC-20
piece handle=C:\APP\ACHARYA\FAST_RECOVERY_AREA\SRINIVAS\BACKUPSET\2020_12_08\O1_MF_NNNDF_TAG20201208T161451_HWZV6DPN_.BKP tag=TAG20201208T161451 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\3A65A868DCD84034BB4A095B9D757DB8\DATAFILE\O1_MF_SYSAUX_HVM1TR5J_.DBF
input datafile file number=00009 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\3A65A868DCD84034BB4A095B9D757DB8\DATAFILE\O1_MF_SYSTEM_HVM1TQPO_.DBF
input datafile file number=00011 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\3A65A868DCD84034BB4A095B9D757DB8\DATAFILE\O1_MF_UNDOTBS1_HVM1TR5Z_.DBF
input datafile file number=00012 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\3A65A868DCD84034BB4A095B9D757DB8\DATAFILE\O1_MF_USERS_HVM1WQK2_.DBF
channel ORA_DISK_1: starting piece 1 at 08-DEC-20
channel ORA_DISK_1: finished piece 1 at 08-DEC-20
piece handle=C:\APP\ACHARYA\FAST_RECOVERY_AREA\SRINIVAS\3A65A868DCD84034BB4A095B9D757DB8\BACKUPSET\2020_12_08\O1_MF_NNNDF_TAG20201208T161451_HWZV7T47_.BKP tag=TAG20201208T161451 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\DATAFILE\O1_MF_SYSAUX_HVM12OYZ_.DBF
input datafile file number=00005 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\DATAFILE\O1_MF_SYSTEM_HVM12OXN_.DBF
input datafile file number=00008 name=C:\APP\ACHARYA\ORADATA\SRINIVAS\DATAFILE\O1_MF_UNDOTBS1_HVM12P0W_.DBF
channel ORA_DISK_1: starting piece 1 at 08-DEC-20
channel ORA_DISK_1: finished piece 1 at 08-DEC-20
piece handle=C:\APP\ACHARYA\FAST_RECOVERY_AREA\SRINIVAS\CD1B29022B7447E8AF222EF6195D8DAC\BACKUPSET\2020_12_08\O1_MF_NNNDF_TAG20201208T161451_HWZV89K8_.BKP tag=TAG20201208T161451 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 08-DEC-20

Starting Control File and SPFILE Autobackup at 08-DEC-20
piece handle=C:\APP\ACHARYA\FAST_RECOVERY_AREA\SRINIVAS\AUTOBACKUP\2020_12_08\O1_MF_S_1058631370_HWZV8VK7_.BKP comment=NONE
Finished Control File and SPFILE Autobackup at 08-DEC-20

RMAN>