ORA-07217: sltln: environment variable cannot be evaluated.

Cause:

Due to lack of permission on home directory , rman cannot read the data of backuppiece

RMAN> catalog start with '/home/oracle';

using target database control file instead of recovery catalog
searching for all files that match the pattern /home/oracle
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of catalog command at 06/21/2021 21:09:46
ORA-07217: sltln: environment variable cannot be evaluated.

Environment variables are properly set but still error arise due to directory permission miss

[oracle@orcldg u01]$ oerr ora 07217
07217, 00000, "sltln: environment variable cannot be evaluated."
// *Cause:  getenv call returned a null pointer.
// *Action: Set the environment variable and try again.

Owner of home directory is ‘root’

[oracle@orcldg /]$ ls -lrt |grep home
drwxr-xr-x.   4 root   root      4096 Feb  4  2020 home

Workaround:

Either move the backup pieces to new directory or mount point with oracle permissions

[oracle@orcldg oracle]$ mv n* databkup/

RMAN can read the directory with oracle permissions


[oracle@orcldg oracle]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Mon Jun 21 21:32:28 2021

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

connected to target database: ORCL (DBID=1559282684, not open)

RMAN> catalog start with '/oracle/databkup';

using target database control file instead of recovery catalog
searching for all files that match the pattern /oracle/databkup

List of Files Unknown to the Database
=====================================
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.330.1075683605
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.287.1075683685
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.530.1075683509
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.461.1075683233
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.540.1075683661

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.330.1075683605
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.287.1075683685
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.530.1075683509
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.461.1075683233
File Name: /oracle/databkup/nnndf0_TAG20210620T005353_0.540.1075683661

If security or permissions are not concern, then grant ownership to oracle user to /home directory

[oracle@orcldg /]$ chown -R oracle:dba /home/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s