Sunday, August 28, 2016

How to calculate the SHMALL and SHMMAX Value for Oracle.

SHMALL – is the maximum total amount of shared memory pages
SHMMAX – is the maximum size in bytes of a single shared memory segment

Total RAM: 15GB

calculate SHMALL as follows in case of 15GB RAM:

TOTAL RAM IN BYTES / PAGE_SIZE

echo "15 * 1024^3 / 4096" | bc

The calculation of SHMMAX, is as follows in case of 15GB RAM:

HALF OF TOTAL RAM IN BYTES

echo "15 * 1024^3 / 2" | bc


[root@sbldcdb01 ~]# echo "15 * 1024^3 / 4096" | bc
3932160
[root@sbldcdb01 ~]#
[root@sbldcdb01 ~]# echo "15 * 1024^3 / 2" | bc
8053063680

ORA-00600: internal error code, arguments: [4194] (Undo corruptions)

Recovery of Online Redo Log: Thread 1 Group 3 Seq 418 Reading mem 0
  Mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\BOND\REDO03.LOG
Block recovery completed at rba 418.70.16, scn 0.13842291
Sun Aug 28 15:36:51 2016
Errors in file d:\oracle\product\10.2.0\admin\bond\bdump\bond_smon_4584.trc:
ORA-01595: error freeing extent (3) of rollback segment (5))
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [93], [5], [], [], [], [], []

Cause : Undo Corruption.

Solution : Create a new undo tablespace and set it default undo tablespace (undo_tablespace).


1. Create pfile from spfile to edit
 >create pfile from spfile;

2. Shutdown the instance
>shutdown immediate;

3. Set the following parameters in the pfile
  undo_management = 'manual'
  event = '10513 trace name context forever, level 2'

4. Srart database in restrict mode.
 >startup restrict pfile=<initsid.ora>

5. Checking the status of segment.

 >select tablespace_name, status, segment_name from dba_rollback_segs where status != 'OFFLINE';

This is critical - we are looking for all undo segments to be offline - System will always be online.

6. Create new undo tablespace
 >create undo tablespace <new undo tablespace> datafile <datafile> size 1000M;

7. Shutdown the database.

 >shutdown immediate;

8. Modify the following parameters in the pfile

*.undo_management='AUTO'
*.undo_tablespace='<new undo tablespace>'

9. Srart the database using the pfile.

 >startup pfile=<initsid.ora>;

10. Create the spfile using pfile.

 > create spfile from pfile;

11. Shutdown the database.

>shutdown immediate;

12. Startup database.

>startup;  --> Using new spfile
 

Log

 
SQL> create pfile from spfile;

File created.

SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup restrict pfile=D:\ORACLE\PRODUCT\10.2.0\db_1\database\INITbond.ora;

ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1292036 bytes
Variable Size             587204860 bytes
Database Buffers           16777216 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL>
SQL> select tablespace_name, status, segment_name from dba_rollback_segs where status != 'OFFLINE';

TABLESPACE_NAME                STATUS           SEGMENT_NAME
------------------------------ ---------------- ------------------------------
SYSTEM                         ONLINE           SYSTEM

SQL> create undo tablespace UNDOTBS2 datafile 'D:\oracle\product\10.2.0\oradata\bond\UNDOTBS02.DBF' size 2000M;

Tablespace created.

SQL>
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile=D:\ORACLE\PRODUCT\10.2.0\db_1\database\INITbond.ora;
ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1292036 bytes
Variable Size             587204860 bytes
Database Buffers           16777216 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> create spfile from pfile;

File created.

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

Total System Global Area  612368384 bytes
Fixed Size                  1292036 bytes
Variable Size             587204860 bytes
Database Buffers           16777216 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL>

Wednesday, August 24, 2016

ORA-01111: name for data file 7 is unknown - rename to correct file

I was create tablespace in primary database when standby_file_management was set to manual for that I found the following error in alert log file and standby synchronization was stop.

Solution : Rename the unknown file name.

Managed Standby Recovery starting Real Time Apply
MRP0: Background Media Recovery terminated with error 1111
Errors in file /u01/app/oracle/diag/rdbms/sblcbsdr/sblcbsdr/trace/sblcbsdr_pr00_12778.trc:
ORA-01111: name for data file 7 is unknown - rename to correct file
ORA-01110: data file 7: '/u01/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00007'
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01111: name for data file 7 is unknown - rename to correct file
ORA-01110: data file 7: '/u01/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00007'
Managed Standby Recovery not using Real Time Apply
Recovery Slave PR00 previously exited with exception 1111
MRP0: Background Media Recovery process shutdown (sblcbsdr)
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
Wed Aug 24 15:38:20 2016
alter database create datafile '/u01/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00007' as '+DATA'
ORA-1275 signalled during: alter database create datafile '/u01/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00007' as '+DATA'
...
Wed Aug 24 15:38:46 2016
ALTER SYSTEM SET standby_file_management='MANUAL' SCOPE=BOTH;
alter database create datafile '/u01/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00007' as '+DATA'
Completed: alter database create datafile '/u01/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00007' as '+DATA'

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

SQL*Plus: Release 11.2.0.4.0 Production on Wed Aug 24 15:36:51 2016

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, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

Database altered.

SQL> alter database create datafile '/u01/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00007' as '+DATA';

Database altered.

SQL>
SQL> alter system set standby_file_management=auto  scope=both;

System altered.

SQL>

Tuesday, August 23, 2016

ORA-39070: Unable to open the log file. (in RAC/ASM)

Cause : In ASM directory impdp/expdp are not able to create log file.

Solution: Create directory in file system and use this for log file directories.


[oracle@sbldcdb01 ~]$ impdp system/pass directory=DUMPDIR dumpfile=CBSDB_BODAY080816-%U.dmp logfile=impCBSDB_BODAY080816.log parallel=4 remap_schema=CBSDB_BODAY:CBSDB_RAC transform=oid:n

Import: Release 11.2.0.4.0 - Production on Wed Aug 24 12:43:34 2016

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation


[oracle@sbldcdb01 ~]$ PWD
-bash: PWD: command not found
[oracle@sbldcdb01 ~]$
[oracle@sbldcdb01 ~]$ pwd
/home/oracle
[oracle@sbldcdb01 ~]$
[oracle@sbldcdb01 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Wed Aug 24 12:46:19 2016

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, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> CREATE OR REPLACE DIRECTORY
LOGPDIR AS
'/home/oracle/';
  2    3
Directory created.

SQL> GRANT READ, WRITE ON DIRECTORY LOGPDIR TO PUBLIC;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@sbldcdb01 ~]$ impdp system/pass directory=DUMPDIR dumpfile=CBSDB_BODAY080816-%U.dmp logfile=LOGPDIR:impCBSDB_BODAY080816.log parallel=4 remap_schema=CBSDB_BODAY:CBSDB_RAC transform=oid:n

Import: Release 11.2.0.4.0 - Production on Wed Aug 24 12:47:31 2016

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_03" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_03":  system/******** directory=DUMPDIR dumpfile=CBSDB_BODAY080816-%U.dmp logfile=LOGPDIR:impCBSDB_BODAY080816.log parallel=4 remap_schema=CBSDB_BODAY:CBSDB_RAC transform=oid:n
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE

How to add disk into ASM Disk Group

[grid@sbldcdb01 ~]$ sqlplus "/as sysasm"

SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 23 17:38:28 2016

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 Real Application Clusters and Automatic Storage Management options

SQL> SET LINE 200
COL NAME FORMAT A30
COL HEADER_STATUS FORMAT A15
COL PATH FORMAT A50
COL TOTAL_MB FORMAT 99999

SELECT NAME,TOTAL_MB, HEADER_STATUS, PATH FROM V$ASM_DISK;SQL> SQL> SQL> SQL> SQL> SQL>

NAME                           TOTAL_MB HEADER_STATUS   PATH
------------------------------ -------- --------------- --------------------------------------------------
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_03
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_04
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_06
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_05
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_04
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_03
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_10
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_09
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_08
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_05
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_06

NAME                           TOTAL_MB HEADER_STATUS   PATH
------------------------------ -------- --------------- --------------------------------------------------
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_07
DB_ORCL_DATA_ASM_01               46079 MEMBER          ORCL:DB_ORCL_DATA_ASM_01
DB_ORCL_DATA_ASM_02               46079 MEMBER          ORCL:DB_ORCL_DATA_ASM_02
DB_ORCL_FRA_ASM_01                46079 MEMBER          ORCL:DB_ORCL_FRA_ASM_01
DB_ORCL_FRA_ASM_02                46079 MEMBER          ORCL:DB_ORCL_FRA_ASM_02
DB_ORCL_OCR_01                     4095 MEMBER          ORCL:DB_ORCL_OCR_01
DB_ORCL_OCR_02                     4095 MEMBER          ORCL:DB_ORCL_OCR_02
DB_ORCL_OCR_03                     4095 MEMBER          ORCL:DB_ORCL_OCR_03
DB_ORCL_RMAN_BACKUP_01            46079 MEMBER          ORCL:DB_ORCL_RMAN_BACKUP_01

20 rows selected.

SQL> ALTER DISKGROUP DATA ADD DISK 'ORCL:DB_ORCL_DATA_ASM_03';

Diskgroup altered.

SQL> SELECT NAME,TOTAL_MB, HEADER_STATUS, PATH FROM V$ASM_DISK;

NAME                           TOTAL_MB HEADER_STATUS   PATH
------------------------------ -------- --------------- --------------------------------------------------
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_04
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_05
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_06
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_05
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_04
                                      0 PROVISIONED     ORCL:DB_ORCL_FRA_ASM_03
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_10
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_09
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_08
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_07
                                      0 PROVISIONED     ORCL:DB_ORCL_DATA_ASM_06

NAME                           TOTAL_MB HEADER_STATUS   PATH
------------------------------ -------- --------------- --------------------------------------------------
DB_ORCL_DATA_ASM_01               46079 MEMBER          ORCL:DB_ORCL_DATA_ASM_01
DB_ORCL_DATA_ASM_02               46079 MEMBER          ORCL:DB_ORCL_DATA_ASM_02
DB_ORCL_DATA_ASM_03               46079 MEMBER          ORCL:DB_ORCL_DATA_ASM_03
DB_ORCL_FRA_ASM_01                46079 MEMBER          ORCL:DB_ORCL_FRA_ASM_01
DB_ORCL_FRA_ASM_02                46079 MEMBER          ORCL:DB_ORCL_FRA_ASM_02
DB_ORCL_OCR_01                     4095 MEMBER          ORCL:DB_ORCL_OCR_01
DB_ORCL_OCR_02                     4095 MEMBER          ORCL:DB_ORCL_OCR_02
DB_ORCL_OCR_03                     4095 MEMBER          ORCL:DB_ORCL_OCR_03
DB_ORCL_RMAN_BACKUP_01            46079 MEMBER          ORCL:DB_ORCL_RMAN_BACKUP_01

20 rows selected.

SQL>

How to change VIP in 11gR2 RAC

1. Find the existing configuration 

srvctl config nodeapps -a

[grid@sbldcdb01 ~]$ srvctl config nodeapps -a
Network exists: 1/172.31.36.0/255.255.255.128/eth0, type static
VIP exists: /sbldcdb01-vip/172.31.36.26/172.31.36.0/255.255.255.128/eth0, hosting node sbldcdb01
VIP exists: /sbldcdb02-vip/172.31.36.27/172.31.36.0/255.255.255.128/eth0, hosting node sbldcdb02
[grid@sbldcdb01 ~]$

2. Stop VIP Service 

srvctl stop vip -n sbldcdb01 -f

srvctl stop instance -d sblcbs -n sbldcdb01 (Optional)

[grid@sbldcdb01 ~]$ srvctl stop vip -n sbldcdb01
PRCR-1014 : Failed to stop resource ora.sbldcdb01.vip
PRCR-1065 : Failed to stop resource ora.sbldcdb01.vip
CRS-2529: Unable to act on 'ora.sbldcdb01.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
[grid@sbldcdb01 ~]$

[grid@sbldcdb01 ~]$ srvctl stop vip -n sbldcdb01 -f
[grid@sbldcdb01 ~]$ srvctl stop instance -d sblcbs -n sbldcdb01

[IF problem found in above statement srvctl stop vip -n sbldcdb01 -f]

3. Modify the VIP

srvctl modify nodeapps -n sbldcdb01 -A 172.31.36.8/255.255.255.0/eth0

srvctl modify network -k 1 -S 110.11.70.0/255.255.255.0/eth2 [If want to change the network]

4. Changes into /etc/hosts


5. Verify the new VIP

/sbin/ifconfig -a | egrep '(eth0|Mask)'

[grid@sbldcdb01 ~]$ /sbin/ifconfig -a | egrep '(eth0|Mask)'
eth0      Link encap:Ethernet  HWaddr 00:50:56:9E:B5:3E
          inet addr:172.31.36.18  Bcast:172.31.36.127  Mask:255.255.255.128
eth0:1    Link encap:Ethernet  HWaddr 00:50:56:9E:B5:3E
          inet addr:172.31.36.24  Bcast:172.31.36.127  Mask:255.255.255.128
eth0:3    Link encap:Ethernet  HWaddr 00:50:56:9E:B5:3E
          inet addr:172.31.36.8  Bcast:172.31.36.127  Mask:255.255.255.128
          inet addr:172.31.36.162  Bcast:172.31.36.191  Mask:255.255.255.192
          inet addr:169.254.233.149  Bcast:169.254.255.255  Mask:255.255.0.0
          inet addr:127.0.0.1  Mask:255.0.0.0
[grid@sbldcdb01 ~]$

6. Start VIP

srvctl stop vip -n node1

Tuesday, August 9, 2016

Oracle 11.2.0.4 Grid Installation Failed in Red Hat Linux 7.1 (ohasd failed to start)

I got this problem at the time of installation Oracle 11.2.0.4 grid in Red Hat Linux 7.1. I tryed several way to solve this problem but failed finally this problem has beed solved by the applying patch 18370031. This is bug for Oracle Clusterware 11g Release 2 (11.2.0.4.0). The following steps you have to perform to resolve this issue.

1. Deinstall previous GRID configuration.
2. Download and Apply the patch 18370031 using OPatch after orainstRoot.sh and  before executing root.sh scripts.
3. Execute root.sh scripts.

[root@spftldb02 app]# /home/grid/app/grid/product/11.2.4/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /home/grid/app/grid/product/11.2.4/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /home/grid/app/grid/product/11.2.4/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node spftldb02 successfully pinned.
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
2016-08-04 13:04:22.340:
[client(10083)]CRS-2101:The OLR was formatted using version 3.
2016-08-04 13:04:22.768:
[client(10110)]CRS-1001:The OCR was formatted using version 3.

ohasd failed to start at /home/grid/app/grid/product/11.2.4/grid/crs/install/roothas.pl line 377, <ALERTLOG> line 4.
/home/grid/app/grid/product/11.2.4/grid/perl/bin/perl -I/home/grid/app/grid/product/11.2.4/grid/perl/lib -I/home/grid/app/grid/product/11.2.4/grid/crs/install /home/grid/app/grid/product/11.2.4/grid/crs/install/roothas.pl execution failed

[grid@spftldb02 ~]$ cd /home/grid/app/grid/product/11.2.4/grid/deinstall
[grid@spftldb02 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2016-08-04_02-21-58PM/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


######################### CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /home/grid/app/grid/product/11.2.4/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /home/grid/app/grid
Checking for existence of central inventory location /home/grid/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /home/grid/app/grid/product/11.2.4/grid
Checking for sufficient temp space availability on node(s) : 'spftldb02.spftl.com'

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2016-08-04_02-21-58PM/logs//crsdc.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2016-08-04_02-21-58PM/logs/netdc_check2016-08-04_02-22-10-PM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2016-08-04_02-21-58PM/logs/asmcadc_check2016-08-04_02-22-10-PM.log

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: n
ASM was not detected in the Oracle Home

######################### CHECK OPERATION END #########################


####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /home/grid/app/grid/product/11.2.4/grid
The cluster node(s) on which the Oracle home deinstallation will be performed are:null
Oracle Home selected for deinstall is: /home/grid/app/grid/product/11.2.4/grid
Inventory Location where the Oracle home registered is: /home/grid/app/oraInventory
ASM was not detected in the Oracle Home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2016-08-04_02-21-58PM/logs/deinstall_deconfig2016-08-04_02-22-08-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2016-08-04_02-21-58PM/logs/deinstall_deconfig2016-08-04_02-22-08-PM.err'

######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /tmp/deinstall2016-08-04_02-21-58PM/logs/asmcadc_clean2016-08-04_02-23-25-PM.log
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2016-08-04_02-21-58PM/logs/netdc_clean2016-08-04_02-23-25-PM.log

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


---------------------------------------->

Run the following command as the root user or the administrator on node "spftldb02".

/tmp/deinstall2016-08-04_02-21-58PM/perl/bin/perl -I/tmp/deinstall2016-08-04_02-21-58PM/perl/lib -I/tmp/deinstall2016-08-04_02-21-58PM/crs/install /tmp/deinstall2016-08-04_02-21-58PM/crs/install/roothas.pl -force  -deconfig -paramfile "/tmp/deinstall2016-08-04_02-21-58PM/response/deinstall_Ora11g_gridinfrahome1.rsp"

Press Enter after you finish running the above commands

<----------------------------------------

Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

Detach Oracle home '/home/grid/app/grid/product/11.2.4/grid' from the central inventory on the local node : Done

Delete directory '/home/grid/app/grid/product/11.2.4/grid' on the local node : Done

Delete directory '/home/grid/app/oraInventory' on the local node : Done

Delete directory '/home/grid/app/grid' on the local node : Done

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2016-08-04_02-21-58PM' on node 'spftldb02'

## [END] Oracle install clean ##


######################### CLEAN OPERATION END #########################


####################### CLEAN OPERATION SUMMARY #######################
Oracle Restart was already stopped and de-configured on node "spftldb02"
Oracle Restart is stopped and de-configured successfully.
Successfully detached Oracle home '/home/grid/app/grid/product/11.2.4/grid' from the central inventory on the local node.
Successfully deleted directory '/home/grid/app/grid/product/11.2.4/grid' on the local node.
Successfully deleted directory '/home/grid/app/oraInventory' on the local node.
Successfully deleted directory '/home/grid/app/grid' on the local node.
Oracle Universal Installer cleanup was successful.


Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'spftldb02' at the end of the session.

Run 'rm -rf /opt/ORCLfmap' as root on node(s) 'spftldb02' at the end of the session.
Run 'rm -rf /etc/oratab' as root on node(s) 'spftldb02' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL & DECONFIG TOOL END #############

[grid@spftldb02 deinstall]$

[root@spftldb02 ~]# rm -rf /etc/oraInst.loc
[root@spftldb02 ~]# rm -rf /opt/ORCLfmap
[root@spftldb02 ~]# rm -rf /etc/oratab


[grid@spftldb02 OPatch]$ ./opatch napply -local /home/grid/app/grid/product/11.2.4/grid/18370031
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /home/grid/app/grid/product/11.2.4/grid
Central Inventory : /home/grid/app/oraInventory
   from           : /home/grid/app/grid/product/11.2.4/grid/oraInst.loc
OPatch version    : 11.2.0.3.12
OUI version       : 11.2.0.4.0
Log file location : /home/grid/app/grid/product/11.2.4/grid/cfgtoollogs/opatch/opatch2016-08-04_14-41-51PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   18370031

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y



Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/home/grid/app/grid/product/11.2.4/grid')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '18370031' to OH '/home/grid/app/grid/product/11.2.4/grid'

Patching component oracle.crs, 11.2.0.4.0...
Patch 18370031 successfully applied.
Log file location: /home/grid/app/grid/product/11.2.4/grid/cfgtoollogs/opatch/opatch2016-08-04_14-41-51PM_1.log

OPatch succeeded.
[grid@spftldb02 OPatch]$
[grid@spftldb02 OPatch]$


[root@spftldb02 ~]# /home/grid/app/grid/product/11.2.4/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /home/grid/app/grid/product/11.2.4/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /home/grid/app/grid/product/11.2.4/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node spftldb02 successfully pinned.
Adding Clusterware entries to oracle-ohasd.service

spftldb02     2016/08/04 14:43:37     /home/grid/app/grid/product/11.2.4/grid/cdata/spftldb02/backup_20160804_144337.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
[root@spftldb02 ~]#

How to check NLS parameter value of Oracle Database.

SQL> SELECT * FROM NLS_DATABASE_PARAMETERS;

PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               WE8ISO8859P15
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM

PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              11.2.0.4.0

20 rows selected.

SQL>