Cause:
There are multiple oracle home location A,B, and C running different oracle database version in host and you actually need rman to be launched for A but you launched rman for B from A
[oracle@orcl19x admin]$ rman target / Recovery Manager: Release 12.1.0.2.0 - Production on Sat Dec 19 21:07:39 2020 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-03000: recovery manager compiler component initialization failed RMAN-06001: error parsing job step library RMAN-01009: syntax error: found "identifier": expecting one of: "" RMAN-01008: the bad identifier was: raschemaversion RMAN-01007: at line 17 column 1 file: ?/rdbms/admin/recover.bsq
[oracle@orcl19x apex]$ cat /etc/oratab |grep orcl19x orcl19x:/apps01/product/12.1.0/dbhome_1:Y orcl19x1:/data01/product/19.0.0:Y
Path or oracle home variable is not properly set for the database from which rman try to execute
Solution:
Set the correct variables
[oracle@orcl19x apex]$ export PATH=/data01/product/19.0.0/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin export ORACLE_HOME=/data01/product/19.0.0
Relink binaries from the correct oracle home
[oracle@orcl19x apex]$ /data01/product/19.0.0/bin/relink all writing relink log to: /data01/product/19.0.0/install/relinkActions2020-12-20_07-21-44PM.log
[oracle@orcl19x apex]$ rman target / Recovery Manager: Release 19.0.0.0.0 - Production on Tue Jan 5 01:27:23 2021 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database (not started) RMAN>