Variable Set With Srvctl Not Showing Up In Database Environment

(Doc ID 2064308.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.

Symptoms

The dbms_system.get_env('ORACLE_UNQNAME',env_var) doesn't show any output ,when the ORACLE_UNQNAME environment variable for Managing TDE wallets been set through srvctl .

 

 ORACLE_UNQNAME set through srvctl


[oracle@db901sss ~]$ srvctl setenv database -d tdek01 -T ORACLE_UNQNAME=tdek01
[oracle@db901sss ~]$
[oracle@db901sss ~]$ srvctl getenv database -d tdek01
tdek01:
ORACLE_UNQNAME=tdek01
[oracle@db901sss ~]$
[oracle@db901sss ~]$ echo $ORACLE_UNQNAME

[oracle@db901sss ~]$
[oracle@db901sss ~]$ export ORACLE_SID=tdek0101
[oracle@db901sss ~]$
[oracle@db901sss ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 4 00:18:59 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Oracle Label Security and Oracle Database Vault options

00:19:00 04-MAR-15 SYS@tdek0101 >
00:19:01 04-MAR-15 SYS@tdek0101 > set serveroutput on
00:19:09 04-MAR-15 SYS@tdek0101 >
00:19:09 04-MAR-15 SYS@tdek0101 > declare
00:19:19   2  env_var varchar2(100);
00:19:19   3  begin
00:19:19   4  dbms_system.get_env('ORACLE_UNQNAME',env_var);
00:19:19   5  dbms_output.put_line(env_var);
00:19:19   6  end;
00:19:19   7  /                                                                            >>>>>>>>>>>>>>>>>>>>>>No output

PL/SQL procedure successfully completed.

00:19:21 04-MAR-15 SYS@tdek0101 >
00:19:22 04-MAR-15 SYS@tdek0101 > exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Oracle Label Security and Oracle Database Vault options

 

 

The dbms_system.get_env('ORACLE_UNQNAME',env_var) show the expected output ,when the ORACLE_UNQNAME environment variable for Managing TDE wallets been set on OS shell level

ORACLE_UNQNAME set through sqlplus 


[oracle@db901sss ~]$ export ORACLE_UNQNAME=tdek01
[oracle@db901sss ~]$
[oracle@db901sss ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 4 00:19:42 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Oracle Label Security and Oracle Database Vault options

00:19:43 04-MAR-15 SYS@tdek0101 > set serveroutput on
00:19:48 04-MAR-15 SYS@tdek0101 >
00:19:49 04-MAR-15 SYS@tdek0101 > declare
00:19:55   2  env_var varchar2(100);
00:19:55   3  begin
00:19:55   4  dbms_system.get_env('ORACLE_UNQNAME',env_var);
00:19:55   5  dbms_output.put_line(env_var);
00:19:55   6  end;
00:19:55   7  /
tdek01                      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Expected output                                     

PL/SQL procedure successfully completed.

00:19:57 04-MAR-15 SYS@tdek0101 >
00:19:58 04-MAR-15 SYS@tdek0101 > exit

 

Changes

Configurating Managing TDE wallets by refering the below Note .

Managing TDE wallets in a RAC environment (Doc ID 567287.1).

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms