Saturday 31 December 2016

GUI and startx is not working during deployment of ODA X5-2 with virtualization

This doc will help to those who are facing issue with GUI or startx not working during ODA deployment.

I experienced GUI and startx issue during deployment of Oracle Database Appliance X5-2 with Virtualization.

I had two scenario where i faced VNC issues.


1. I were able to connect to the VNC but after connecting to VNC when i executed startx, screen turned into white blank screen. like screen shot below.



2. Then i decided to initialize the deployment thru command line. During onecommand execution VNC disconnected automatically. like screen shot below.


Solution :-  Oracle Database Appliance supports TigerVNC. Pls use TigerVNC. 

TigerVNC can be downloaded from this link 

download "

tigervnc-1.7.0.exe " file 

Hope this post will help the people who are facing same issue.

Thank you.



Tuesday 12 July 2016

Create Bootable USB from Oracle Linux 7 ISO image on Windows

This doc will describe step to step procedure to create Bootable USB from Oracle Linux ISO image on Windows.

1. Download Rufus. its light weight software utility to easily create USB bootable.

https://rufus.akeo.ie/

2. Download the Oracle Linux ISO image from https://edelivery.oracle.com/

3. Insert the USB into Windows system. Make Sure USB has no data.

4. Run the downloaded rufus.exe file.New windows will come up like below. it will automatically detect the USB.
Keep all default settings. Click on the CD ROM icon next to ISO image.

 5.Select the ISO image.After selecting ISO image click on Start.


 6. It will ask to write as ISO image mode or DD image mode. Go for default ISO image mode.

 7.There will be warning, USB will be formatted. Click on ok.
 8. Keep watching the processing.



9. Once its done. There will be READY status. Click on close. Bootable USB is ready to use now.

Sunday 27 March 2016

Create Local IPS Repository on Solaris 11.3 on virtual box

This document describe the procedure to create the local IPS repo on Oracle Solaris 11.3 on virtual box.
By default Solaris have configure with default repo. if we do not have access to the internet to update the required packages we need to create local repo at server level.
To setup  the local repo, we need to download the Oracle's hosted repositories from the Oracle Technology Network.

Accept the OTN agreement license and download the available repositories.


I have already downloaded the repo's and i already created the ISO file to merge them. so i will skip that steps.

Select the machine and goto the storage tab and select he ISO file.



Check the ISO under /media dir.

 root@oracle123:~# ls -l  /media/
total 4
dr-xr-xr-x   3 root     root        2048 Mar  3 00:19 SOL-11_3_REPO

Check the current publisher.

root@oracle123:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

Set new publisher. path will be same under /media directory.

root@oracle123:~# pkg set-publisher  -G '*' -g file:///media/SOL-11_3_REPO/repo/ solaris

Make sure system repository service pointing to the local repo.

root@oracle123:~# svccfg -s application/pkg/server setprop pkg/inst_root=/media/SOL-11_3_REPO/repo

Verify local pointing repo.

root@oracle123:~# svcprop -p pkg/inst_root application/pkg/server

/media/SOL-11_3_REPO/repo

Reload the repo service.

root@oracle123:~# svcadm refresh application/pkg/server

Check again if its new publisher.

root@oracle123:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F file:///media/SOL-11_3_REPO/repo/

Try to install the packages.

root@oracle123:~# pkg install SUNWhea
           Packages to install:  1
       Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1     1640/1640      3.3/3.3    0B/s

PHASE                                          ITEMS
Installing new actions                     1757/1757
Updating package state database                 Done
Updating package cache                           0/0
Updating image state                            Done
Creating fast lookup database                   Done
Updating package cache                           1/1


Check all available updates.

root@oracle123:~# pkg update
No updates available for this image.

We have successfully created the local IPS repository on virtual box and updated packages.

Thanks.


Wednesday 23 March 2016

Add additional ASM diskgroup

This document describe the procedure to add additional diskgroup in existing ASM.

first set the grid home and sid.

export GRID_HOME=/u01/app/grid/11.2.0/product/grid
export GRID_SID=+ASM

Run ASM Configuration Assistant.
./asmca

we will see the existing diskgroup. click on create to create new diskgroup.

Specify disk group name, select redundancy and select disk and click on ok.

It will take few minutes.

Disk group created successfully window will be pop-up.

Now we can see the newly added disk group.


Thanks

Install Oracle 11g Grid infrastructure for standalone server on Linux

This document describe the step to step procedure to Install Oracle 11g Grid infrastructure for standalone server on Linux.

The /etc/hosts file must contain a fully qualified name for the server.
[root@oracle123 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.xx.xx oracle123 oracle123.localdomain


I'm using Virtual Box. so first need to configure local yum repository to install the required OS packages for Oracle Grid and Database.

Below are steps to configure the Local yum repository.

cd /etc/yum.repos.d/
[root@oracle123 yum.repos.d]# vi public-yum-ol6.repo
[root@oracle123 yum.repos.d]# cat public-yum-ol6.repo
[public_ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=file:///mnt/Server
#gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=0
enabled=1

[root@oracle123 yum.repos.d]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only


After configuring Local yum repository.Install the following packages if they are not already present.


yum install binutils-2*x86_64*
yum install glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
yum install glibc-2*i686* nss-softokn-freebl-3*i686*
yum install compat-libstdc++-33*x86_64*
yum install glibc-common-2*x86_64*
yum install glibc-devel-2*x86_64*
yum install glibc-devel-2*i686*
yum install glibc-headers-2*x86_64*
yum install elfutils-libelf-0*x86_64*
yum install elfutils-libelf-devel-0*x86_64*
yum install gcc-4*x86_64*
yum install gcc-c++-4*x86_64*
yum install ksh-*x86_64*
yum install libaio-0*x86_64*
yum install libaio-devel-0*x86_64*
yum install libaio-0*i686*
yum install libaio-devel-0*i686*
yum install libgcc-4*x86_64*
yum install libgcc-4*i686*
yum install libstdc++-4*x86_64*
yum install libstdc++-4*i686*
yum install libstdc++-devel-4*x86_64*
yum install make-3.81*x86_64*
yum install numactl-devel-2*x86_64*
yum install sysstat-9*x86_64*
yum install compat-libstdc++-33*i686*
yum install compat-libcap*

Create OS groups and user.
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle

Create the directories in which the Grid software will be installed and change the ownership to appropriate user and group and grant permissions.i will use oracle user as Grid owner.

mkdir -p /u01/app/grid/product/11.2.0/grid
chown -R oracle:oinstall /u01
chmod -R 775 /u01

In order to configure ASM, we need to add additional disks in our virtual box storage.

Select the Machine and click on settings>Storage >controller:SATA>click on green plus disk sign.

Click on create new disk.

Choose default VDI

select fixed size

Select location and Size for the disk.

It will take few minutes.

Verify the storage disks.



Check the newly added disks are available.

[root@oracle123 ~]# cat /proc/partitions
major minor  #blocks  name

  11        0    1048575 sr0
   8        0  157286400 sda
   8        1   51200000 sda1
   8        2   40960000 sda2
   8        3    5120000 sda3
   8        4          1 sda4
   8        5    4096000 sda5
   8        6   55907328 sda6
   8       16    1048576 sdb
   8       32    1048576 sdc

Use fdisk command for each disks /dev/sdb and /dev/sdc and specify values.

[root@oracle123 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x75956adf.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-130, default 130):
Using default value 130

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


[root@oracle123 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x181c9051.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-130, default 130):
Using default value 130

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Verify required partitions are available.

[root@oracle123 ~]# cat /proc/partitions
major minor  #blocks  name

  11        0    1048575 sr0
   8        0  157286400 sda
   8        1   51200000 sda1
   8        2   40960000 sda2
   8        3    5120000 sda3
   8        4          1 sda4
   8        5    4096000 sda5
   8        6   55907328 sda6
   8       16    1048576 sdb
   8       17    1044193 sdb1
   8       32    1048576 sdc
   8       33    1044193 sdc1

As the root user, configure oracleasm.

[root@oracle123 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done

Initialize the asmlib. This command loads the oracleasm module and mounts the oracleasm filesystem.

[root@oracle123 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm

Create the ASM disk label for each disk.

[root@oracle123 ~]# oracleasm createdisk data /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@oracle123 ~]# oracleasm createdisk FRA /dev/sdc1
Writing disk header: done
Instantiating disk: done

Check that the disks are visible.

[root@oracle123 ~]# oracleasm listdisks
DATA
FRA

Check the disks are mounted in the oracleasm filesystem.

[root@oracle123 ~]# ls -l /dev/oracleasm/disks
total 0
brw-rw----. 1 oracle dba 8, 17 Mar 19 13:52 DATA
brw-rw----. 1 oracle dba 8, 33 Mar 19 13:53 FRA

ASM disk groups are ready to use in Grid configuration.

Copy the Grid binaries and unzip.

[root@oracle123]# unzip p13390677_112040_Linux-x86-64_3of7.zip

RunInstaller as Grid owner user.i'm using Oracle user.

[oracle@oracle123]$ ./runInstaller


Skip software updates.

Select Configure Oracle Grid Infrastructure for a Standalone Server.

Select language

if you are not able to see the disks. Click on change discovery path and specify location of ASM disks.

Enter disk group name, select redundancy and select disk.

Specify password for ASM accounts and remember it. During database installation when we choose ASM storage type it will prompt for password.

Ignore the message as i'm not using recommended asm groups. In real time create all oracle recommended groups.

Specify the ORACLE_BASE and ORACLE_HOME locations.

Location for orainventory.

Check if all prerequisites are met and succeeded.

Review the Summary and click on install.

 At the end you will see the Successful installation message.


After successful installation. check the Grid and ASM status.

[oracle@oracle123 bin]$ ./crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    oracle123   
ora....ER.lsnr ora....er.type ONLINE    ONLINE    oracle123   
ora.asm        ora.asm.type   ONLINE    ONLINE    oracle123   
ora.cssd       ora.cssd.type  ONLINE    ONLINE    oracle123   
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    oracle123   
ora.ons        ora.ons.type   OFFLINE   OFFLINE   

Thanks

Removing Oracle Grid 12c home and ASM on Linux

This document describes the procedure to remove the Oracle Grid 12c Home and ASM on Oracle Linux 6.5.

Starting with Oracle Database 11g Release 2 , Oracle recommends that you use the deinstallation tool to remove the entire Oracle home associated with the Oracle Database, Oracle Clusterware, Oracle ASM, Oracle RAC, or Oracle Database client installation. Oracle does not support the removal of individual products or components.

Identify all instances associated with the Oracle home that you want to remove.

[oracle@oracle123 ~]$ cat /etc/oratab
+ASM:/u02/app/oracle/product/12.1.0/grid:N
db11g:/u01/app/oracle/product/11.1.0/db_1:N

Oracle recommends to run the deinstallation tool as the Oracle software installation owner usually as oracle user.

After executing deinstall tool, it will prompt for enter LISTENER name, and for confirmation.
All info marked in RED will be prompted.

During execution it will generate a script to be executed as root user and then press enter to continue.


[oracle@oracle123 deinstall]$ ls -l
total 348
-rwxrwxr-x. 1 oracle oinstall 240220 Jul  7  2014 bootstrap_files.lst
-rwxrwxr-x. 1 oracle oinstall  11952 Mar  4  2014 bootstrap.pl
-rwxrwxr-x. 1 oracle oinstall  10227 Mar 22 16:48 deinstall
-rwxrwxr-x. 1 oracle oinstall  28591 May 19  2014 deinstall.pl
-rwxrwxr-x. 1 oracle oinstall   8623 Apr 11  2014 deinstall.xml
drwxrwxr-x. 2 oracle oinstall   4096 Mar 22 16:41 jlib
-rwxrwxr-x. 1 oracle oinstall    401 Feb 10  2012 readme.txt
drwxrwxr-x. 2 oracle oinstall   4096 Mar 22 16:40 response
-rwxrwxr-x. 1 oracle oinstall  32334 Jun  7  2013 sshUserSetup.sh
drwxrwxr-x. 2 oracle oinstall   4096 Mar 22 16:41 utl

[oracle@oracle123 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


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


Checking for existence of the Oracle home location /u02/app/oracle/product/12.1.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /u02/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u02/app/oracle/product/12.1.0/grid

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2016-03-24_08-40-10AM.log

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2016-03-24_08-40-11-AM.log

Specify all Oracle Restart enabled listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2016-03-24_08-40-41-AM.log

Automatic Storage Management (ASM) instance is detected in this Oracle home /u02/app/oracle/product/12.1.0/grid.
ASM Diagnostic Destination : /u01/app/oracle
ASM Diskgroups : +DATA,+FRA
ASM diskstring : /dev/oracleasm/disks
Diskgroups will be dropped
De-configuring ASM will drop all the diskgroups and their contents at cleanup time. This will affect all of the databases and ACFS that use this ASM instance(s).
 If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'. Do you  want to modify above information (y|n) [n]: n
Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2016-03-24_08-42-04-AM.log

Database Check Configuration END

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


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u02/app/oracle/product/12.1.0/grid
The following nodes are part of this cluster: null
The cluster node(s) on which the Oracle home deinstallation will be performed are:null
Oracle Home selected for deinstall is: /u02/app/oracle/product/12.1.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Following Oracle Restart enabled listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-40-01-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-40-01-AM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2016-03-24_08-42-15-AM.log
ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_clean2016-03-24_08-42-15-AM.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2016-03-24_08-42-48-AM.log

De-configuring Oracle Restart enabled listener(s): LISTENER

De-configuring listener: LISTENER
    Stopping listener: LISTENER
    Listener stopped successfully.
    Unregistering listener: LISTENER
    Listener unregistered successfully.
    Deleting listener: LISTENER
    Listener deleted successfully.
Listener de-configured successfully.

De-configuring Listener configuration file...
Listener configuration file de-configured successfully.

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

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 "oracle123".

/tmp/deinstall2016-03-24_08-38-41AM/perl/bin/perl -I/tmp/deinstall2016-03-24_08-38-41AM/perl/lib -I/tmp/deinstall2016-03-24_08-38-41AM/crs/install /tmp/deinstall2016-03-24_08-38-41AM/crs/install/roothas.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_OraGI12Home1.rsp"

[root@oracle123 ~]# /tmp/deinstall2016-03-24_08-38-41AM/perl/bin/perl -I/tmp/deinstall2016-03-24_08-38-41AM/perl/lib -I/tmp/deinstall2016-03-24_08-38-41AM/crs/install /tmp/deinstall2016-03-24_08-38-41AM/crs/install/roothas.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_OraGI12Home1.rsp"
Using configuration parameter file: /tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_OraGI12Home1.rsp
PRKO-2573 : ONS daemon is already stopped.
CRS-2673: Attempting to stop 'ora.cssd' on 'oracle123'
CRS-2677: Stop of 'ora.cssd' on 'oracle123' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle123'
CRS-2673: Attempting to stop 'ora.evmd' on 'oracle123'
CRS-2677: Stop of 'ora.evmd' on 'oracle123' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle123' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2016/03/24 08:44:39 CLSRSC-337: Successfully deconfigured Oracle Restart stack


Press Enter after you finish running the above commands

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


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


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER
Oracle Restart was already stopped and de-configured on node "oracle123"
Oracle Restart is stopped and de-configured successfully.
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_2016-03-24_08-40-01-AM.rsp
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-40-01-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-40-01-AM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to oracle123
Setting CRS_HOME to true
Setting oracle.installer.invPtrLoc to /tmp/deinstall2016-03-24_08-38-41AM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

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

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

Delete directory '/u02/app/oracle/product/12.1.0/grid' on the local node : Done

The Oracle Base directory '/u02/app/oracle' will not be removed on local node. The directory is not empty.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2016-03-24_08-38-41AM' on node 'oracle123'

## [END] Oracle install clean ##


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


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u02/app/oracle/product/12.1.0/grid' from the central inventory on the local node.
Successfully deleted directory '/u02/app/oracle/product/12.1.0/grid' on the local node.
Oracle Universal Installer cleanup was successful.

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


############# ORACLE DEINSTALL TOOL END #############



Remove files from /tmp

[root@oracle123 tmp]# rm -Rf *
[root@oracle123 tmp]# ls -l

Thanks

Removing Oracle Database 11g home on Linux

This document describes the procedure to remove the Oracle Database 11g Home using  storage type ASM on Oracle Linux 6.5.

Starting with Oracle Database 11g Release 2 , Oracle recommends that you use the deinstallation tool to remove the entire Oracle home associated with the Oracle Database, Oracle Clusterware, Oracle ASM, Oracle RAC, or Oracle Database client installation. Oracle does not support the removal of individual products or components.

Identify all instances associated with the Oracle home that you want to remove.

[oracle@oracle123 ~]$ cat /etc/oratab
+ASM:/u02/app/oracle/product/12.1.0/grid:N

db11g:/u01/app/oracle/product/11.1.0/db_1:N

Oracle recommends to run the deinstallation tool as the Oracle software installation owner usually as oracle user.

After executing deinstall tool, it will prompt for list of Databases , Type of Database, list of Nodes, Diagnostic destination and Storage type used by Database.
All info marked in RED to be prompted.


[oracle@oracle123 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/deinstall/
[oracle@oracle123 deinstall]$ ls -l
total 92
-rwxr-xr-x. 1 oracle oinstall  9780 May 10  2011 bootstrap.pl
-rwxr-xr-x. 1 oracle oinstall  9658 Mar 21 09:47 deinstall
-rwxr-xr-x. 1 oracle oinstall 18841 Jan 29  2013 deinstall.pl
-rw-r--r--. 1 oracle oinstall  3466 Aug 18  2010 deinstall.xml
drwxr-xr-x. 2 oracle oinstall  4096 Mar 21 09:42 jlib
-rw-r--r--. 1 oracle oinstall   409 Aug 18  2010 readme.txt
drwxr-xr-x. 2 oracle oinstall  4096 Mar 21 09:42 response
-rwxr-xr-x. 1 oracle oinstall 32343 Dec 16  2009 sshUserSetup.sh

[oracle@oracle123 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

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


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


Checking for existence of the Oracle home location /u01/app/oracle/product/11.2.0/db_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for sufficient temp space availability on node(s) : 'oracle123.localdomain'

## [END] Install check configuration ##


Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2016-03-24_08-32-09-AM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2016-03-24_08-32-12-AM.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured in this Oracle home [db11g]: db11g

###### For Database 'db11g' ######

Specify the type of this database (1.Single Instance Database|2.Oracle Restart Enabled Database) [2]: 2
Specify the list of nodes on which this database has instances [oracle123]: oracle123
Specify the diagnostic destination location of the database [/u01/app/oracle/diag/rdbms/db11g]: 
Specify the storage type used by the Database ASM|FS []: ASM


Database Check Configuration END

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /u01/app/oraInventory/logs/emcadc_check2016-03-24_08-32-55-AM.log 

Checking configuration for database db11g
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /u01/app/oraInventory/logs//ocm_check3684.log
Oracle Configuration Manager check END

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


####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: /u01/app/oracle/product/11.2.0/db_1
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
The following databases were selected for de-configuration : db11g
Database unique name : db11g
Storage used : ASM
Will update the Enterprise Manager configuration for the following database(s): db11g
No Enterprise Manager ASM targets to update
No Enterprise Manager listener targets to migrate
Checking the config status for CCR
Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-32-06-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-32-06-AM.err'

######################## CLEAN OPERATION START ########################

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /u01/app/oraInventory/logs/emcadc_clean2016-03-24_08-32-55-AM.log 

Updating Enterprise Manager Database Control configuration for database db11g
Updating Enterprise Manager ASM targets (if any)
Updating Enterprise Manager listener targets (if any)
Enterprise Manager Configuration Assistant END
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2016-03-24_08-33-02-AM.log
Database Clean Configuration START db11g
This operation may take few minutes.
Database Clean Configuration END db11g

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2016-03-24_08-33-21-AM.log

De-configuring Local Net Service Names configuration file...
Local Net Service Names configuration file de-configured successfully.

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

The network configuration has been cleaned up successfully.

Network Configuration clean config END

Oracle Configuration Manager clean START
OCM clean log file location : /u01/app/oraInventory/logs//ocm_clean3684.log
Oracle Configuration Manager clean END
Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

Detach Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the local node : Done

Delete directory '/u01/app/oracle/product/11.2.0/db_1' on the local node : Done

Delete directory '/u01/app/oracle' 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-03-24_08-31-44AM' on node 'oracle123'

## [END] Oracle install clean ##


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


####################### CLEAN OPERATION SUMMARY #######################
Updated Enterprise Manager configuration for database db11g
Successfully de-configured the following database instances : db11g
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
Successfully detached Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/11.2.0/db_1' on the local node.
Successfully deleted directory '/u01/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.

Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################



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

Now your Database home has been removed successfully. verify the /etc/oratab file and remove oracle home path if still exist.

Thanks 

Tuesday 22 March 2016

Upgrade Oracle 11.2.0.4 standalone Grid and ASM to Oracle 12.1.0.2

This Document describe the procedure to upgrade the Oracle 11.2.0.4 standalone Grid and ASM to Oracle 12.1.0.2 standalone Grid and ASM using OUI Oracle Universal Installer.
Starting from Oracle 11g , Oracle recommends out of place upgrades. means upgrade will happen in new ORACLE_HOME.

Prerequisites :-
1. Take a full Backup of Database and existing GRID_HOME.
2. Create new directory structure for the new GRID_HOME.
3. Copy the Oracle Grid 12c binaries at your choice location and unzip it.
4. unset the following before starting the upgrade.

  unset ORACLE_BASE
  unset ORACLE_HOME
  unset ORACLE_SID

In my testing environment i'm using Oracle user as owner of my GRID_HOME.

As Oracle user run installer.



Installation Option.
choose Upgrade Oracle Grid infrastructure or Oracle ASM



Select Language.


Management option provide option to register with Enterprise Manager to manage the Grid and ASM.

i'm using only DBA group. we can use different groups to separate the duties.


It will show the warning cause i'm using DBA group only.

Specify the new location of the ORACLE_BASE and ORACLE_HOME.

Click on Automatically run configuration scripts. it will prompt to provide the root password to execute the scripts by itself.

Due to limited resources on my laptop, i have allocated 2G memory in my virtual box. ignore this error. In real environment all prerequisites should met.
For OS Kernel Parameter panic_on_oops.

It will show warning cause i have ignored prerequisites. click on yes.

Review the summary. and click on install.

Review the progress.

New window will pop-up to confirm the execution of scripts as root. Click on yes.


Once the scripts executed. we can see the upgrade of GRID was successful window. click on close.


Verify the  release version and software version.

[oracle@oracle123 bin]$ ./crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [12.1.0.2.0]
[oracle@oracle123 bin]$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [12.1.0.2.0]


Connect to the ASM instance and verify the version.

[oracle@oracle123 ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 22 18:03:32 2016

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option
SQL> select * from v$version;

BANNER     CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production  0
PL/SQL Release 12.1.0.2.0 - Production  0
CORE 12.1.0.2.0 Production  0
TNS for Linux: Version 12.1.0.2.0 - Production  0
NLSRTL Version 12.1.0.2.0 - Production

Connect to ASM instance and change the Compatible parameter to enable new features.

alter diskgroup data set attribute 'compatible.asm'='12.1.0.2';
alter diskgroup fra set attribute 'compatible.asm'='12.1.0.2';

Verify the COMPATIBILITY.

SQL> select group_number, name, compatibility, database_compatibility from v$asm_diskgroup;

GROUP_NUMBER NAME    COMPATIBILITY            DATABASE_COMPATIBILITY
------------ ------------------------------ ------------------------------------------------------------ ------------------
  2 FRA    12.1.0.2.0      10.1.0.0.0
  1 DATA    12.1.0.2.0      10.1.0.0.0


Change the diagnostic_dest to new GRID_HOME

alter system set diagnostic_dest='/u02/app/grid' scope=spfile;

Once we find everything is working fine from new GRID_HOME. we can delete the old GRID_HOME.

Thanks.