Monday, April 25, 2016

PDB_PLUG_IN_VIOLATIONS in ORACLE 12C


PDB_PLUG_IN_VIOLATIONS view is useful view if there is any issues with PDB.

SQL> alter pluggable database PDB1 open;

Warning: PDB altered with errors.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           READ WRITE YES


SQL> desc PDB_PLUG_IN_VIOLATIONS
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 TIME                                      NOT NULL TIMESTAMP(6)
 NAME                                      NOT NULL VARCHAR2(30)
 CAUSE                                              VARCHAR2(22)
 TYPE                                               VARCHAR2(9)
 ERROR_NUMBER                                       NUMBER
 LINE                                      NOT NULL NUMBER
 MESSAGE                                   NOT NULL VARCHAR2(4000)
 STATUS                                             VARCHAR2(9)
 ACTION                                             VARCHAR2(4000)


SQL> select NAME,ERROR_NUMBER,MESSAGE,STATUS,ACTION from PDB_PLUG_IN_VIOLATIONS;

NAME  ERROR_NUMBER MESSAGE                                            STATUS    ACTION
----- ------------ -------------------------------------------------- --------- ------------------------------------------------------------
PDB1             0 CDB parameter sga_target mismatch: Previous 740M C RESOLVED  Please check the parameter in the current CDB
                   urrent 712M

PDB1             0 CDB parameter pga_aggregate_target mismatch: Previ RESOLVED  Please check the parameter in the current CDB
                   ous 245M Current 236M

PDB1             0 CDB parameter enable_pluggable_database mismatch:  RESOLVED  Please check the parameter in the current CDB
                   Previous FALSE Current TRUE

PDB1             0 PDB plugged in is a non-CDB, requires noncdb_to_pd RESOLVED  Run noncdb_to_pdb.sql.
                   b.sql be run.

PDB1             0 Database option RAC mismatch: PDB installed versio PENDING   Fix the database option in the PDB or CDB n 12.1.0.1.0. CDB installed version NULL.

PDB1             0 SQL patch 19769486 mismatch: Installed in the PDB  PENDING   Install the SQL patch in the PDB or the CDB.Please refer to
                   but not in the CDB.                                          the Known Issues section of MOS note Doc ID 1585822.1 for more details.

PDB1             0 SQL patch 20299016 mismatch: Installed in the PDB  PENDING   Install the SQL patch in the PDB or the CDB.Please refer to
                   but not in the CDB.                                          the Known Issues section of MOS note Doc ID 1585822.1 for more details.

PDB1             0 SQL patch 20831107 mismatch: Installed in the PDB  PENDING   Install the SQL patch in the PDB or the CDB.Please refer to
                   but not in the CDB.                                          the Known Issues section of MOS note Doc ID 1585822.1 for more details.

PDB1             0 SQL patch 21352619 mismatch: Installed in the PDB  PENDING   Install the SQL patch in the PDB or the CDB.Please refer to
                   but not in the CDB.                                          the Known Issues section of MOS note Doc ID 1585822.1 for more details.

PDB1             0 SQL patch 21951844 mismatch: Installed in the PDB  PENDING   Install the SQL patch in the PDB or the CDB.Please refer to
                   but not in the CDB.                                          the Known Issues section of MOS note Doc ID 1585822.1 for more details.

PDB1             0 SQL patch 22291141 mismatch: Installed in the PDB  PENDING   Install the SQL patch in the PDB or the CDB.Please refer to
                   but not in the CDB.                                          the Known Issues section of MOS note Doc ID 1585822.1 for more details.


11 rows selected.


SQL>

Convert NON CDB to CDB database Oracle 12c

Convert NON CDB to CDB database

Note 1:-We can’t convert NON CDB to CDB directly. Create a CDB database and plug NON CDB database as PDB to new CDB database.

Testdb1è NON CDB database
TESTCDB è CDB database.
PDB1 è Cloning of NON CDB database (We can use the same name of NON CDB database. But I used different name)

1)Mount NON-CDB db as read only.

SQL> startup  mount;
ORACLE instance started.

Total System Global Area  772472832 bytes
Fixed Size                  2855328 bytes
Variable Size             310382176 bytes
Database Buffers          452984832 bytes
Redo Buffers                6250496 bytes
Database mounted.
SQL>  ALTER DATABASE OPEN READ ONLY;

Database altered.

2)Create db description file

SQL> BEGIN
  2  DBMS_PDB.DESCRIBE(
  3  pdb_descr_file => '/home/oracle/ora12c.xml');
  4  END;
  5  /

PL/SQL procedure successfully completed.

SQL> ! ls -lrth /home/oracle/ora12c.xml
-rw-r--r-- 1 oracle dba 4.4K Apr 25 14:13 /home/oracle/ora12c.xml

3)Create new CDB database(TESTCDB)

 [oracle@rac1 dbs]$ ps -ef | grep pmon
oracle    3016     1  0 11:01 ?        00:00:01 asm_pmon_+ASM1
oracle    8346     1  0 11:14 ?        00:00:01 mdb_pmon_-MGMTDB
oracle   16164     1  0 14:03 ?        00:00:00 ora_pmon_testdb1
oracle   19226     1  0 14:55 ?        00:00:00 ora_pmon_TESTCDB
oracle   19410 12423  0 14:57 pts/0    00:00:00 grep pmon
4)Shutdown NON-CDB database.
5)Connect to new CDB database and clone the NON CDB db as PDB in new CDB db.
[oracle@rac1 dbs]$ . oraenv
ORACLE_SID = [testdb1] ? TESTCDB
[oracle@rac1 dbs]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Mon Apr 25 15:03:16 2016

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics
and Real Application Testing options

SQL> SELECT NAME,OPEN_MODE FROM V$DATABASE;

NAME      OPEN_MODE
--------- --------------------
TESTCDB   READ WRITE

SQL> CREATE PLUGGABLE DATABASE PDB1 USING '/home/oracle/ora12c.xml' COPY FILE_NAME_CONVERT = ('+DATA/PDB1/DATAFILE/', '+DATA/PDB1/DATAFILE/');
CREATE PLUGGABLE DATABASE PDB1 USING '/home/oracle/ora12c.xml' COPY FILE_NAME_CONVERT = ('+DATA/PDB1/DATAFILE/', '+DATA/PDB1/DATAFILE/')
*
ERROR at line 1:
ORA-65005: missing or invalid file name pattern for file -
+DATA/TESTDB/DATAFILE/system.270.908822475


SQL>  CREATE PLUGGABLE DATABASE PDB1 USING '/home/oracle/ora12c.xml' COPY FILE_NAME_CONVERT = ('+DATA/TESTDB/DATAFILE/', '+DATA/PDB1/DATAFILE/');
 CREATE PLUGGABLE DATABASE PDB1 USING '/home/oracle/ora12c.xml' COPY FILE_NAME_CONVERT = ('+DATA/TESTDB/DATAFILE/', '+DATA/PDB1/DATAFILE/')
*
ERROR at line 1:
ORA-65005: missing or invalid file name pattern for file -
+DATA/TESTDB/DATAFILE/sysaux.269.908822371


SQL>CREATE PLUGGABLE DATABASE PDB1 USING
 '/home/oracle/ora12c.xml' COPY FILE_NAME_CONVERT = ('+DATA', '+DATA');

Pluggable database created.

SQL> SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
PDB1                           MOUNTED

6)Connect to new PDB and execute the script.This will take time.So,Better execute in the backend.

SQL> ALTER SESSION SET CONTAINER=PDB1;

Session altered.

SQL> @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql
SQL> SET SERVEROUTPUT ON
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL>
SQL> WHENEVER SQLERROR EXIT;
SQL>
SQL> DOC
DOC>#######################################################################
DOC>#######################################################################
DOC>   The following statement will cause an "ORA-01403: no data found"
DOC>   error if we're not in a PDB.
DOC>   This script is intended to be run right after plugin of a PDB,
DOC>   while inside the PDB.
DOC>#######################################################################
DOC>#######################################################################

"""SKIPPED THE BIG OUTPUT""
SQL>
SQL> -- leave the PDB in the same state it was when we started
SQL> BEGIN
  2    execute immediate '&open_sql &restricted_state';
  3  EXCEPTION
  4    WHEN OTHERS THEN
  5    BEGIN
  6      IF (sqlcode <> -900) THEN
  7        RAISE;
  8      END IF;
  9    END;
 10  END;
 11  /

PL/SQL procedure successfully completed.

SQL>
SQL> WHENEVER SQLERROR CONTINUE;
SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL>
SQL>
SQL>

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         3 PDB1                           MOUNTED

7)Connect to CDB and open PDB
SQL> conn / as sysdba
Connected.
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           MOUNTED
SQL> alter pluggable database PDB1 open;

Warning: PDB altered.

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           READ WRITE YES

SQL> show parameter ENABLE_PLUGGABLE_DATABASE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_pluggable_database            boolean     TRUE


Note:-The old NON-CDB database need to delete manually


ORA-02095,ORA-65090,ENABLE_PLUGGABLE_DATABASE

 [oracle@rac1 dbs]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Mon Apr 25 13:44:46 2016

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> show pdbs
SQL> select name,dbid,con_dbid,cdb,con_id from v$database;

NAME            DBID   CON_DBID CDB     CON_ID
--------- ---------- ---------- --- ----------
TESTDB    2692150728 2692150728 NO           0

SQL>
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DATA/TESTDB/DATAFILE/system.270.908822475
+DATA/TESTDB/DATAFILE/sysaux.269.908822371
+DATA/TESTDB/DATAFILE/undotbs1.272.908822551
+DATA/TESTDB/DATAFILE/users.271.908822551

SQL> !
[oracle@rac1 dbs]$ sqlplus -version

SQL*Plus: Release 12.1.0.1.0 Production

[oracle@rac1 dbs]$ exit

SQL> CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb1 identified by pdb
DEFAULT TABLESPACE USERS
DATAFILE '+DATA/PDB1/DATAFILE/'
SIZE 250M AUTOEXTEND ON
FILE_NAME_CONVERT=(
+DATA/TESTDB/DATAFILE/',
'+DATA/PDB1/DATAFILE/');  2    3    4    5    6    7
CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb1 identified by pdb
                          *
ERROR at line 1:
ORA-65090: operation only allowed in a container database


SQL>  CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb1 identified by pdb DEFAULT TABLESPACE USERS DATAFILE '+DATA/PDB1/DATAFILE/'
  2  FILE_NAME_CONVERT=('+DATA/TESTDB/DATAFILE/','+DATA/PDB1/DATAFILE/');
 CREATE PLUGGABLE DATABASE pdb1 ADMIN USER pdb1 identified by pdb DEFAULT TABLESPACE USERS DATAFILE '+DATA/PDB1/DATAFILE/'
                           *
ERROR at line 1:
ORA-65090: operation only allowed in a container database

 ===>This error i received due to trying to create PDB database in NON-CDB database

SQL> select cdb from v$database;

CDB
---
NO

===>It should be YES if it is CDB database.

"ENABLE_PLUGGABLE_DATABASE" should be true if it is CBD database. But, if we change the value as true in NON CDB database, We will get the below error."

SQL> show parameter ENABLE_PLUGGABLE_DATABASE

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_pluggable_database            boolean     FALSE
SQL> alter system set ENABLE_PLUGGABLE_DATABASE=true;
alter system set ENABLE_PLUGGABLE_DATABASE=true
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set ENABLE_PLUGGABLE_DATABASE=true scope=spfile;

System altered.

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  772472832 bytes
Fixed Size                  2855328 bytes
Variable Size             310382176 bytes
Database Buffers          452984832 bytes
Redo Buffers                6250496 bytes
ORA-65101: container database set up incorrectly


SQL> alter system set ENABLE_PLUGGABLE_DATABASE=false scope=spfile;

System altered.

SQL> shut immediate
ORA-01507: database not mounted


ORACLE instance shut down.
SQL>

==>Change into FALSE and restart the database.

Convert RAC to NON-RAC database in ORACLE 12C (Applicable to any version)

Convert RAC  to NON-RAC database in ORACLE 12C

1) Delete all instance
[oracle@rac1 ~]$ srvctl stop database -d testdb -o immediate
[oracle@rac1 ~]$ srvctl remove instance  -d testdb -i testdb1
Remove instance from the database testdb? (y/[n]) y
[oracle@rac1 ~]$ srvctl remove instance  -d testdb -i testdb2
Remove instance from the database testdb? (y/[n]) y
[oracle@rac1 ~]$ srvctl remove database -d testdb
Remove the database testdb? (y/[n]) y

2)Change the parameters to NON RAC database
[oracle@rac1 ~]$ sqlplus -version

SQL*Plus: Release 12.1.0.1.0 Production

[oracle@rac1 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Mon Apr 25 13:05:38 2016

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  772472832 bytes
Fixed Size                  2855328 bytes
Variable Size             373296736 bytes
Database Buffers          390070272 bytes
Redo Buffers                6250496 bytes
Database mounted.
Database opened.
SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> alter system set cluster_database_instances=1 scope=spfile;

System altered.

SQL> alter database disable thread 2;

Database altered.

SQL> select thread#, group# from v$log;

   THREAD#     GROUP#
---------- ----------
         1          1
         1          2
         2          3
         2          4

SQL> alter database drop logfile group 2;
alter database drop logfile group 2
*
ERROR at line 1:
ORA-01567: dropping log 2 would leave less than 2 log files for instance
testdb1 (thread 1)
ORA-00312: online log 2 thread 1:
'+DATA/TESTDB/ONLINELOG/group_2.277.908822623'
ORA-00312: online log 2 thread 1:
'+DATA/TESTDB/ONLINELOG/group_2.278.908822629'


SQL> alter database drop logfile group 3;

Database altered.

SQL> alter database drop logfile group 4;

Database altered.

SQL>  select thread#, group# from v$log;

   THREAD#     GROUP#
---------- ----------
         1          1
         1          2

SQL>  drop tablespace UNDOTBS2 including contents and datafiles;

Tablespace dropped.
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  772472832 bytes
Fixed Size                  2855328 bytes
Variable Size             310382176 bytes
Database Buffers          452984832 bytes
Redo Buffers                6250496 bytes
Database mounted.
Database opened.
SQL> select inst_id from gv$instance;

   INST_ID
----------
         1

SQL> show parameter cluster

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     FALSE
cluster_database_instances           integer     1
cluster_interconnects                string
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options



3)Copy the Password file and spfile to local disk (its not mandatory)
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string
SQL> create spfile from pfile;

File created.

SQL> ! ls -lrth
total 532K
-rw-r--r-- 1 oracle oinstall 3.0K Feb  3  2012 init.ora
-rw-r----- 1 oracle oinstall 1.6K Apr 25 13:07 inittestdb1.ora
-rw-rw---- 1 oracle dba      512K Apr 25 13:08 id_testdb1.dat
-rw-rw---- 1 oracle dba      1.6K Apr 25 13:08 hc_testdb1.dat
-rw-r----- 1 oracle dba      4.5K Apr 25 13:11 spfiletestdb1.ora

SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> startup force
ORACLE instance started.

Total System Global Area  772472832 bytes
Fixed Size                  2855328 bytes
Variable Size             310382176 bytes
Database Buffers          452984832 bytes
Redo Buffers                6250496 bytes
Database mounted.
Database opened.
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/12.1.0
                                                 /dbhome_1/dbs/spfiletestdb1.or
                                                 a
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
ASMCMD> pwd
+DATA/TESTDB
ASMCMD> cp +DATA/TESTDB/PASSWORD/pwdtestdb.268.908822333 /u01/app/oracle/product/12.1.0/dbhome_1/dbs/
copying +DATA/TESTDB/PASSWORD/pwdtestdb.268.908822333 -> /u01/app/oracle/product/12.1.0/dbhome_1/dbs//pwdtestdb.268.908822333
ASMCMD> exit
[oracle@rac1 dbs]$ ls -lrth
total 540K
-rw-r--r-- 1 oracle oinstall 3.0K Feb  3  2012 init.ora
-rw-r----- 1 oracle oinstall 1.6K Apr 25 13:07 inittestdb1.ora
-rw-rw---- 1 oracle dba      512K Apr 25 13:08 id_testdb1.dat
-rw-rw---- 1 oracle dba      1.6K Apr 25 13:11 hc_testdb1.dat
-rw-r----- 1 oracle dba      4.5K Apr 25 13:12 spfiletestdb1.ora
-rw-r----- 1 oracle oinstall 7.5K Apr 25 13:14 pwdtestdb.268.908822333

4) Adding the database to grid(Not mandatory) (command from RDBMS home)

[oracle@rac1 dbs]$ srvctl add database -d testdb1 -o /u01/app/oracle/product/12.1.0/dbhome_1 -p /u01/app/oracle/product/12.1.0/dbhome_1/dbs/spfiletestdb1.ora -s OPEN -t IMMEDIATE -y AUTOMATIC
[oracle@rac1 dbs]$ srvctl start database -d testdb1
PRKO-3119 : Database testdb1 cannot be started since it has no configured instances.
[oracle@rac1 dbs]$ srvctl remove database -d testdb1
Remove the database testdb1? (y/[n]) y
[oracle@rac1 dbs]$ srvctl add database -d testdb -o /u01/app/oracle/product/12.1.0/dbhome_1 -p /u01/app/oracle/product/12.1.0/dbhome_1/dbs/spfiletestdb1.ora -s OPEN -t IMMEDIATE -y AUTOMATIC
[oracle@rac1 dbs]$ srvctl add instance -i testdb1 -n rac1
PRKO-2082 : Missing mandatory option -db
[oracle@rac1 dbs]$ srvctl add instance -d testdb -i testdb1 -n rac1
[oracle@rac1 dbs]$ srvctl start database -d testdb
[oracle@rac1 dbs]$ ps -ef | grep pmon
oracle    3016     1  0 11:01 ?        00:00:00 asm_pmon_+ASM1
oracle    8346     1  0 11:14 ?        00:00:00 mdb_pmon_-MGMTDB
oracle   14432     1  0 13:22 ?        00:00:00 ora_pmon_testdb1
oracle   14605 12423  0 13:23 pts/0    00:00:00 grep pmon
[oracle@rac1 dbs]$ crsctl stat res -t
-bash: crsctl: command not found
[oracle@rac1 dbs]$ . oraenv
ORACLE_SID = [testdb1] ? +ASM1
The /u01/app/12.1.0/grid/bin/orabase binary does not have execute privilege
for the current user, oracle.  Rerun the script after changing
the permission of the mentioned executable.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 dbs]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       rac1                     STABLE
ora.FRA.dg
               ONLINE  ONLINE       rac1                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                     STABLE
ora.OCRVOTE.dg
               ONLINE  ONLINE       rac1                     STABLE
ora.asm
               ONLINE  ONLINE       rac1                     Started,STABLE
ora.net1.network
               ONLINE  ONLINE       rac1                     STABLE
ora.ons
               ONLINE  ONLINE       rac1                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1                     STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       rac1                     169.254.58.60 192.16
                                                             8.10.1,STABLE
ora.cvu
      1        ONLINE  ONLINE       rac1                     STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       rac1                     Open,STABLE
ora.oc4j
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.rac2.vip
      1        ONLINE  INTERMEDIATE rac1                     FAILED OVER,STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       rac1                     STABLE
ora.testdb.db
      1        ONLINE  ONLINE       rac1                     Open,STABLE
--------------------------------------------------------------------------------
[oracle@rac1 dbs]$ . oraenv
ORACLE_SID = [+ASM1] ? testdb1
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/12.1.0/dbhome_1
The /u01/app/oracle/product/12.1.0/dbhome_1/bin/orabase binary does not have execute privilege
for the current user, oracle.  Rerun the script after changing
the permission of the mentioned executable.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 dbs]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Mon Apr 25 13:23:49 2016

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> show parameter cluster

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     FALSE
cluster_database_instances           integer     1
cluster_interconnects                string

SQL>