[oracle@my562b bin]$ ./detachHome.sh

Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4094 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /apps/oraInventory
‘DetachHome’ was successful.

The contents of the inventory XML file looks like this:
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”OraDb11g_home1″ LOC=”/apps/oracle/product/11.2.0/db” TYPE=”O” IDX=”2″/>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″ REMOVED=”T”/>
</HOME_LIST>
</INVENTORY>
 

[oracle@my562b bin]$ perl clone.pl -silent ORACLE_BASE=/apps/oracle ORACLE_HOME=/apps/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 INVENTORY_LOCATION=/apps/oraInventory

./runInstaller -clone -waitForCompletion  “ORACLE_BASE=/apps/oracle” “ORACLE_HOME=/apps/11.2.0/grid” “ORACLE_HOME_NAME=Ora11g_gridinfrahome1” “INVENTORY_LOCATION=/apps/oraInventory” -silent -noConfig -nowait
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4094 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-09_11-33-45AM. Please wait …
 
Copyright (C) 1999, 2010, Oracle. All rights reserved.


You can find the log of this install session at:
 /apps/oraInventory/logs/cloneActions2011-05-09_11-35-10AM.log
………………………………………………………………………………………. 100% Done.


Could not backup file /apps/11.2.0/grid/rootupgrade.sh to /apps/11.2.0/grid/rootupgrade.sh.ouibak
Could not backup file /apps/11.2.0/grid/root.sh to /apps/11.2.0/grid/root.sh.ouibak

Installation in progress (Monday, May 9, 2011 11:35:29 AM CDT)
………………………………………………………………                                                        72% Done.
Install successful

Linking in progress (Monday, May 9, 2011 11:35:38 AM CDT)

Link successful

Setup in progress (Monday, May 9, 2011 11:36:57 AM CDT)
…………….                                                100% Done.
Setup successful

End of install phases.(Monday, May 9, 2011 11:37:05 AM CDT)
WARNING:
The following configuration scripts need to be executed as the “root” user.
/apps/11.2.0/grid/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as “root”
    3. Run the scripts
   
Run the script on the local node.
The cloning of Ora11g_gridinfrahome1 was successful.
Please check ‘/apps/oraInventory/logs/cloneActions2011-05-09_11-35-10AM.log’ for more details.

Contents of inventory XML after the clone:
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”OraDb11g_home1″ LOC=”/apps/oracle/product/11.2.0/db” TYPE=”O” IDX=”2″/>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″/>
</HOME_LIST>
</INVENTORY>


[oracle@my562b bin]$ cd ../..
[oracle@my562b grid]$ ./root.sh
Check /apps/11.2.0/grid/install/root_my562b_2011-05-09_11-39-15.log for the output of root script




What a mess .. trying force delete and re-configuring GRID Home

I don’t think I need to go through the exercise of detaching and re-cloning the oracle home
I think the roothas.pl with the deconfig option followed with the force option works if all else fails.
The other option to deconfig is:
$ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/perl/lib -I $ORACLE_HOME/crs/install $ORACLE_HOME/crs/install/roothas.pl -delete

[root@my562b utl]# /apps/11.2.0/grid/crs/install/roothas.pl -deconfig -force

Using configuration parameter file: /apps/11.2.0/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CLSU-00100: Operating System function: opendir failed with error data: 2
CLSU-00101: Operating System error message: No such file or directory
CLSU-00103: error location: scrsearch1
CLSU-00104: additional error information: cant open scr home dir scls_scr_getval
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
ACFS-9459: ADVM/ACFS is not supported on this OS version: ‘2.6.32-100.26.2.el5
ACFS-9201: Not Supported
Successfully deconfigured Oracle Restart stack
[root@my562b utl]# $ORACLE_HOME/perl/bin/perl -I $ORACLE_HOME/perl/lib -I $ORACLE_HOME/crs/install $ORACLE_HOME/crs/install/roothas.pl
Using configuration parameter file: /apps/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user ‘oracle’, 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 my562b successfully pinned.
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: ‘2.6.32-100.26.2.el5

my562b     2011/05/09 11:50:06     /apps/11.2.0/grid/cdata/my562b/backup_20110509_115006.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server

[root@my562b bin]# ./crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘my562b’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘my562b’
CRS-2677: Stop of ‘ora.evmd’ on ‘my562b’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘my562b’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@my562b bin]# ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.


[oracle@my562b admin]$ srvctl add listener
[oracle@my562b admin]$ srvctl add asm -d ‘ORCL:*’
[oracle@my562b admin]$ srvctl start listener
[oracle@my562b admin]$ srvctl start asm
[oracle@my562b admin]$ srvctl status diskgroup -g data
PRCA-1000 : ASM Disk Group DATA does not exist
PRCR-1001 : Resource ora.DATA.dg does not exist

[oracle@my562b admin]$ asmcmd

ASMCMD> lsdg
ASMCMD> mount data   
ASMCMD> mount mydata
ASMCMD> mount myfra


Now the database home 

[oracle@my562b bin]$ ./detachHome.sh

Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4091 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /apps/oraInventory
‘DetachHome’ was successful.


[root@my562b bin]# cd /apps/oraInventory/ContentsXML/
You have new mail in /var/spool/mail/root
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″/>
</HOME_LIST>
</INVENTORY>


[oracle@my562b bin]$ cd ../../clone/bin

[oracle@my562b bin]$ perl clone.pl -silent ORACLE_BASE=/apps/oracle ORACLE_HOME=/apps/oracle/product/11.2.0/db ORACLE_HOME_NAME=OraDb11g_home1 INVENTORY_LOCATION=/apps/oraInventory

./runInstaller -clone -waitForCompletion  “ORACLE_BASE=/apps/oracle” “ORACLE_HOME=/apps/oracle/product/11.2.0/db” “ORACLE_HOME_NAME=OraDb11g_home1” “INVENTORY_LOCATION=/apps/oraInventory” -silent -noConfig -nowait
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 4090 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-05-09_12-13-20PM. Please wait …Oracle Universal Installer, Version 11.2.0.2.0 Production
Copyright (C) 1999, 2010, Oracle. All rights reserved.

You can find the log of this install session at:
 /apps/oraInventory/logs/cloneActions2011-05-09_12-13-20PM.log
………………………………………………………………………………………. 100% Done.



Installation in progress (Monday, May 9, 2011 12:13:56 PM CDT)
……………………………………………………………………                                                  78% Done.
Install successful

Linking in progress (Monday, May 9, 2011 12:14:05 PM CDT)

Link successful

Setup in progress (Monday, May 9, 2011 12:17:12 PM CDT)
Setup successful

End of install phases.(Monday, May 9, 2011 12:17:18 PM CDT)
WARNING:
The following configuration scripts need to be executed as the “root” user.
/apps/oracle/product/11.2.0/db/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as “root”
    3. Run the scripts
   
The cloning of OraDb11g_home1 was successful.
Please check ‘/apps/oraInventory/logs/cloneActions2011-05-09_12-13-20PM.log’ for more details.


[root@my562b ContentsXML]# cd /apps/oracle/product/11.2.0/db
[root@my562b db]# ./root.sh
Check /apps/oracle/product/11.2.0/db/install/root_my562b_2011-05-09_12-19-12.log for the output of root script


[root@my562b db]# cd –
/apps/oraInventory/ContentsXML
[root@my562b ContentsXML]# cat inventory.xml
<?xml version=”1.0″ standalone=”yes” ?>
<!– Copyright (c) 1999, 2010, Oracle. All rights reserved. –>
<!– Do not modify the contents of this file by hand. –>
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME=”Ora11g_gridinfrahome1″ LOC=”/apps/11.2.0/grid” TYPE=”O” IDX=”1″/>
<HOME NAME=”OraDb11g_home1″ LOC=”/apps/oracle/product/11.2.0/db” TYPE=”O” IDX=”2″/>
</HOME_LIST>
</INVENTORY>

Setting DISPLAY with X authority file utility – xauth

From the X Server where the VNC Server is at:

$: xauth list $DISPLAY
viscdb105.visctech.com:1 MIT-MAGIC-COOKIE-1 fc0f22b8861edcea596a68db0ec3059d
viscdb105.visctech.com/unix:1 MIT-MAGIC-COOKIE-1 fc0f22b8861edcea596a68db0ec3059d

Then you go to your database server where you will launch runInstaller from:

$: xauth add viscdb105.visctech.com:1 MIT-MAGIC-COOKIE-1 fc0f22b8861edcea596a68db0ec3059d
$: xauth add viscdb105.visctech.com/unix:1 MIT-MAGIC-COOKIE-1 fc0f22b8861edcea596a68db0ec3059d

Set your DISPLAY like you would normally do:

VPRD1 – oracle: xclock Error: Can’t open display: 
viscdb007:/apps/oracle/software/11.2.0.3/grid
VPRD1 – oracle: export DISPLAY=viscdb105.visctech.com:1
viscdb007:/apps/oracle/software/11.2.0.3/grid

Test your connection

if you have xclock installed on the database server.  If you do not have xclock, you can copy xclock from another machine that has it installed.

VPRD1 – oracle: xclock

Warning: Missing charsets in String to FontSet conversion

$: ./runInstaller
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 120 MB. Actual 1810 MB Passed
Checking swap space: must be greater than 150 MB. Actual 32031 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] y

>>> Ignoring required pre-requisite failures. Continuing…
Preparing to launch Oracle Universal Installer …

 

 


Create ASMLIB disks with /etc/init.d/oracleasm command. 

You must be logged in as root:

– root: cat /proc/partitions  |grep emcpower

 120    32    1048576 emcpowerc
 120    33    1047383 emcpowerc1
 120    48    1048576 emcpowerd
 120    49    1047383 emcpowerd1
 120    64    1048576 emcpowere
 120    65    1047383 emcpowere1
 120    80    1048576 emcpowerf
 120    81    1047383 emcpowerf1
 120    96    1048576 emcpowerg
 120    97    1047383 emcpowerg1
 120   112  471859200 emcpowerh
 120   113  471849051 emcpowerh1
 120   128  471859200 emcpoweri
 120   129  471849051 emcpoweri1
 120   144  471859200 emcpowerj
 120   145  471849051 emcpowerj1
 120   160  471859200 emcpowerk
 120   161  471849051 emcpowerk1
 120   176  524288000 emcpowerl
 120   177  524277179 emcpowerl1
 120   192  524288000 emcpowerm
 120   193  524277179 emcpowerm1
 120   208  471859200 emcpowern
 120   209  471849051 emcpowern1
 120   224  471859200 emcpowero
 120   225  471849051 emcpowero1
 
 – root: cat cr_asmlib_disks.txt
/etc/init.d/oracleasm createdisk VISC_PV101_DISK1 /dev/emcpowerc1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK2 /dev/emcpowerd1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK3 /dev/emcpowere1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK4 /dev/emcpowerf1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK5 /dev/emcpowerg1
 
 – root: ksh cr_asmlib_disks.txt
Marking disk “VISC_PV101_DISK1” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK2” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK3” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK4” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK5” as an ASM disk: [  OK  ]
 
Next, you need to scan the disks on the remaining RAC nodes:

– root: /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:

You can verify the the disks on the other RAC nodes with the listdisks option:

– root: /etc/init.d/oracleasm listdisks
TRAX_PV101_DISK1
TRAX_PV101_DISK2
TRAX_PV101_DISK3
TRAX_PV101_DISK4
TRAX_PV101_DISK5


We had a request at one of our clients to open access from Apex to LDAP.  Here’s an example of creating the ACL and adding privileges.

begin  
dbms_network_acl_admin.create_acl (
    acl         => ‘ldap_web.xml’,
    description => ‘Allow Apex to LDAP Service’,
    principal   => ‘MYSCHEMA’,
    is_grant    => TRUE,
    privilege   => ‘connect’
    );
    commit;
end;
/


begin
  dbms_network_acl_admin.add_privilege (
  acl       => ‘ldap_web.xml’,
  principal => ‘MYSCHEMA’,
  is_grant  => TRUE,
  privilege => ‘resolve’
  );
  commit;
end;
/

begin
  dbms_network_acl_admin.add_privilege (
  acl       => ‘ldap_web.xml’,
  principal => ‘APEX_040100‘,
  is_grant  => TRUE,
  privilege => ‘resolve’
  );
  commit;
end;
/

begin
  dbms_network_acl_admin.assign_acl(
  acl  => ‘ldap_web.xml’,
  host => ‘ldap.visctech.com.ad
  );
  commit;
end;
/
 

From the home directory where the dbs_group file resides:

 

dcli -g dbs_group -l oracle ‘grep -i hostname /etc/hosts’


On the half Rack Exadata, here’s  the output that you would expect:


viscdb01: 10.0.0.70 viscdb01.visctech.com viscdb01

viscdb02: 10.0.0.71 viscdb02.visctech.com viscdb02

viscdb03: 10.0.0.72 viscdb03.visctech.com viscdb03

viscdb04: 10.0.0.73 viscdb04.visctech.com viscdb04


You can run a similar command to list all the cell nodes.  You must do this part as root:


 

# /usr/local/bin/dcli -g cell_group -l root ‘grep -i hostname /etc/hosts’

visccel01: 10.0.10.174 visccel01.visctech.com visccel01

visccel02: 10.0.10.175 visccel02.visctech.com visccel02

visccel03: 10.0.10.176 visccel03.visctech.com visccel03

visccel04: 10.0.10.177 visccel04.visctech.com visccel04

visccel05: 10.0.10.178 visccel05.visctech.com visccel05

visccel06: 10.0.10.179 visccel06.visctech.com visccel06

visccel07: 10.0.10.180 visccel07.visctech.com visccel07