Saturday, February 4, 2017

Enable and Disable oracle feature using chopt command : RAT disable using chopt command

RAT disable in oracle RAC using chopt command 
==========================================================

Check  RAT status in database using below query

SQL>  select * from gv$option where parameter='Real Application Testing';

   INST_ID PARAMETER                                          VALUE
---------- -------------------------------------------------- ----------------------------------------------------------------
         1 Real Application Testing                           TRUE
         2 Real Application Testing                           TRUE

SQL>
SQL>


Check database  and listener status using below command
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rac1
Instance orcl2 is running on node rac2
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2,rac1
[oracle@rac1 ~]$
[oracle@rac1 ~]$

Stop listener and database services on all node in case RAC

[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl stop listener
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is not running
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl stop database -d orcl
[oracle@rac1 ~]$
[oracle@rac1 ~]$ srvctl status database -d orcl
Instance orcl1 is not running on node rac1
Instance orcl2 is not running on node rac2
[oracle@rac1 ~]$
[oracle@rac1 ~]$

Check database and listener status on second node : RAC2

[oracle@rac2 ~]$
[oracle@rac2 ~]$
[oracle@rac2 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is not running
[oracle@rac2 ~]$
[oracle@rac2 ~]$ srvctl status database -d orcl
Instance orcl1 is not running on node rac1
Instance orcl2 is not running on node rac2
[oracle@rac2 ~]$
[oracle@rac2 ~]$

Go to $ORACLE_HOME/bin location using cd command  on node rac1


[oracle@rac1 bin]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/bin
[oracle@rac1 bin]$
[oracle@rac1 bin]$ ls -lrt *chopt*
-rwxr-xr-x 1 oracle oinstall  234 Sep 20 13:07 chopt
-rw-r--r-- 1 oracle oinstall 6384 Sep 20 13:07 chopt.pl
-rw-r--r-- 1 oracle oinstall 3780 Sep 20 13:07 chopt.ini
[oracle@rac1 bin]$
[oracle@rac1 bin]$

Disable RAT on node rac1 using below command

[oracle@rac1 bin]$ ./chopt disable rat

Writing to /u01/app/oracle/product/11.2.0/dbhome_1/install/disable_rat.log...
/usr/bin/make -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk rat_off ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
/usr/bin/make -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

[oracle@rac1 bin]$

Same thing do on second node rac2
[oracle@rac2 bin]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/bin
[oracle@rac2 bin]$
[oracle@rac2 bin]$ ls -lrt *chopt*
-rwxr-xr-x 1 oracle oinstall  234 Sep 20 13:18 chopt
-rw-r--r-- 1 oracle oinstall 3780 Sep 20 13:18 chopt.ini
-rw-r--r-- 1 oracle oinstall 6384 Sep 20 13:18 chopt.pl
[oracle@rac2 bin]$
[oracle@rac2 bin]$

[oracle@rac2 bin]$ pwd
/u01/app/oracle/product/11.2.0/dbhome_1/bin
[oracle@rac2 bin]$
[oracle@rac2 bin]$ ls -lrt *chopt*
-rwxr-xr-x 1 oracle oinstall  234 Sep 20 13:18 chopt
-rw-r--r-- 1 oracle oinstall 3780 Sep 20 13:18 chopt.ini
-rw-r--r-- 1 oracle oinstall 6384 Sep 20 13:18 chopt.pl
[oracle@rac2 bin]$
[oracle@rac2 bin]$ ./chopt disable rat

Writing to /u01/app/oracle/product/11.2.0/dbhome_1/install/disable_rat.log...
/usr/bin/make -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk rat_off ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
/usr/bin/make -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

[oracle@rac2 bin]$


start database and listener services  on all node  RAC1,RAC2  and verify

[oracle@rac1 bin]$
[oracle@rac1 bin]$ srvctl start database -d orcl
[oracle@rac1 bin]$
[oracle@rac1 bin]$
[oracle@rac1 bin]$ srvctl status database -d orcl
Instance orcl1 is running on node rac1
Instance orcl2 is running on node rac2
[oracle@rac1 bin]$
[oracle@rac1 bin]$
[oracle@rac1 bin]$ srvctl start listener
[oracle@rac1 bin]$
[oracle@rac1 bin]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac2,rac1
[oracle@rac1 bin]$
[oracle@rac1 bin]$


Then verify using below command


SQL>
SQL> select * from gv$option where parameter='Real Application Testing';

   INST_ID PARAMETER                                          VALUE
---------- -------------------------------------------------- ----------------------------------------------------------------
         1 Real Application Testing                           FALSE
         2 Real Application Testing                           FALSE

SQL>



How to Check and Enable/Disable Oracle Binary Options (Doc ID 948061.1)

Note: In case of RAC environment, the chopt enable / disable <option> command has to be executed on all RAC nodes.


[oracle@rac1 bin]$ chopt -h

usage:

chopt <enable|disable> <option>

options:
                  dm = Oracle Data Mining RDBMS Files
                  dv = Oracle Database Vault option
                lbac = Oracle Label Security
                olap = Oracle OLAP
        partitioning = Oracle Partitioning
                 rat = Oracle Real Application Testing

e.g. chopt enable rat


[oracle@rac1 bin]$

No comments:

Post a Comment