Wednesday, July 30, 2014

RAC ASM 11.2 Change ASM SPFILE location

Locate asm spfile location:

[grid@rac1 ~]$ asmcmd spget
+VOTE/rac/asmparameterfile/registry.253.853798947
[grid@rac1 ~]$ /u01/app/11.2.0/grid/bin/gpnptool get |  xmllint --format - | egrep 'SPFile'
  <orcl:ASM-Profile id="asm" DiscoveryString="" SPFile="+VOTE/rac/asmparameterfile/registry.253.853798947"/>


Copy the spfile to the new location .
NOTE: This step is working only if you specify the exact path and name for spfile (see bellow the errors). This command doesn't use OMF.

[grid@rac1 ~]$ asmcmd
ASMCMD> cd vote/rac/asmparameterfile
ASMCMD> ls
REGISTRY.253.853798947
ASMCMD> spcopy +vote/rac/asmparameterfile/REGISTRY.253.853798947 +vote_tmp
ORA-15056: additional error message
ORA-17502: ksfdcre:4 Failed to create file +vote_tmp/REGISTRY.253.853798947
ORA-15177: cannot operate on system aliases
ORA-06512: at line 7 (DBD ERROR: OCIStmtExecute)
 

NOTE: Spcopy will not use OMF. Have to specify the full path and name for new spfile


1. Move ASM spfile using ASMCMD

Check spfile location:


[grid@rac1 ~]$ asmcmd spget
+VOTE_TMP/rac/asmparameterfile/registry.253.854289061


Copy spfile with -u option - to update GPnP profile in RAC environment:

[grid@rac1 ~]$ asmcmd spcopy -u +VOTE_TMP/rac/asmparameterfile/registry.253.854289061 +VOTE/rac/asmparameterfile/spfileASM.ora
[grid@rac1 ~]$ asmcmd spget
+VOTE/rac/asmparameterfile/spfileASM.ora


Restart CRS stack to verify that ASM starts with new spfile:
 

[grid@rac1 ~]$ su -
Password: 
-bash-4.1# cd /u01/app/11.2.0/grid/bin/
-bash-4.1# ./crsctl stop crs
-bash-4.1# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.


Check new spfile:

[grid@rac2 ~]$ asmcmd spget
+VOTE/rac/asmparameterfile/spfileASM.ora


Restart CRS stack on the other node and check spfile location.



[grid@rac1 ~]$ asmcmd spget
+VOTE/rac/asmparameterfile/spfileASM.ora

Remove old spfile

[grid@rac1 ~]$ asmcmd rm +VOTE_TMP/rac/asmparameterfile/registry.253.854289061



2. Copy ASM SPFILE using SQL Plus.


View spfile location:

[grid@rac1 ~]$ sqlplus / as sysasm

SQL> show parameter spfile;   

spfile                     string     +VOTE/rac/asmparameterfile/reg istry.253.853798947
SQL> create pfile from spfile;

File created.

SQL> create spfile='+VOTE_TMP' from pfile;

File created.

SQL> show parameter spfile;

spfile                     string     +VOTE/rac/asmparameterfile/registry.253.853798947
SQL>exit


Check location of the new spfile:

[grid@rac1 dbs]$ asmcmd
ASMCMD> cd +vote_tmp/rac/asmparameterfile
ASMCMD> ls
REGISTRY.253.854289061


Restart clusterware stack on first node:

[grid@rac1 ~]$ su -
Password: 
-bash-4.1# cd /u01/app/11.2.0/grid/bin/
-bash-4.1# ./crsctl stop crs
-bash-4.1# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.


Check new spfile location.

[grid@rac1 dbs]$ asmcmd spget
+VOTE_TMP/rac/asmparameterfile/registry.253.854289061


Restart clusterware stack on second node:

[grid@rac1 ~]$ su -
Password: 
-bash-4.1# cd /u01/app/11.2.0/grid/bin/
-bash-4.1# ./crsctl stop crs
-bash-4.1# ./crsctl start crs
CRS-4123: Oracle High Availability Services has been started.


Check new spfile on second node:

[grid@rac2 ~]$ asmcmd spget
+VOTE_TMP/rac/asmparameterfile/registry.253.854289061


Remove old spfile:


[grid@rac2 ~]$ asmcmd rm +vote/rac/asmparameterfile/REGISTRY.253.853798947

Tuesday, July 29, 2014

RAC 11.2 Migrating voting disks on different DG

This implementation was made using 2 KVM.



1. Check votedisk location

[grid@rac1 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   26f8032a6f6a4f28bfe642ea5b99da9c (ORCL:DISK1) [DATA]
Located 1 voting disk(s).


2. Add disks to the cluster and format partitions
 
[root@ images]# cd /var/lib/libvirt/images
[root@ images]# qemu-img create -f raw Virtual_Client_for_Linux_RHEL_6_RAC_DISK6.img 1G
Formatting 'Virtual_Client_for_Linux_RHEL_6_RAC_DISK6.img', fmt=raw size=1073741824 
[root@ images]# qemu-img create -f raw Virtual_Client_for_Linux_RHEL_6_RAC_DISK7.img 1G
Formatting 'Virtual_Client_for_Linux_RHEL_6_RAC_DISK7.img', fmt=raw size=1073741824 
[root@ images]# qemu-img create -f raw Virtual_Client_for_Linux_RHEL_6_RAC_DISK8.img 1G
Formatting 'Virtual_Client_for_Linux_RHEL_6_RAC_DISK8.img', fmt=raw size=1073741824 
[root@ images]# chown qemu:qemu Virtual_Client_for_Linux_RHEL_6_RAC_DISK6.img
[root@ images]# chown qemu:qemu Virtual_Client_for_Linux_RHEL_6_RAC_DISK7.img
[root@ images]# chown qemu:qemu Virtual_Client_for_Linux_RHEL_6_RAC_DISK8.img
[root@ images]# virsh attach-disk Virtual_Client_for_Linux_RHEL_6_RAC1-KVM --persistent /var/lib/libvirt/images/Virtual_Client_for_Linux_RHEL_6_RAC_DISK6.img sdf
Disk attached successfully

[root@ images]# virsh attach-disk Virtual_Client_for_Linux_RHEL_6_RAC2-KVM --persistent /var/lib/libvirt/images/Virtual_Client_for_Linux_RHEL_6_RAC_DISK6.img sdf
Disk attached successfully

[root@ images]# virsh attach-disk Virtual_Client_for_Linux_RHEL_6_RAC2-KVM --persistent /var/lib/libvirt/images/Virtual_Client_for_Linux_RHEL_6_RAC_DISK7.img sdg
Disk attached successfully

[root@ images]# virsh attach-disk Virtual_Client_for_Linux_RHEL_6_RAC1-KVM --persistent /var/lib/libvirt/images/Virtual_Client_for_Linux_RHEL_6_RAC_DISK7.img sdg
Disk attached successfully

[root@ images]# virsh attach-disk Virtual_Client_for_Linux_RHEL_6_RAC1-KVM --persistent /var/lib/libvirt/images/Virtual_Client_for_Linux_RHEL_6_RAC_DISK8.img sdh
Disk attached successfully

[root@ images]# virsh attach-disk Virtual_Client_for_Linux_RHEL_6_RAC2-KVM --persistent /var/lib/libvirt/images/Virtual_Client_for_Linux_RHEL_6_RAC_DISK8.img sdh
Disk attached successfully



-bash-4.1# fdisk –l

Disk /dev/sdf: 1073 MB, 1073741824 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sdg: 1073 MB, 1073741824 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sdh: 1073 MB, 1073741824 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

-bash-4.1# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x1214349e.
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-1011, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1011, default 1011): 
Using default value 1011

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

Calling ioctl() to re-read partition table.
Syncing disks.
-bash-4.1# fdisk /dev/sdg
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x268cbd64.
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-1011, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1011, default 1011): 
Using default value 1011

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

Calling ioctl() to re-read partition table.
Syncing disks.
-bash-4.1# fdisk /dev/sdh
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x621c212d.
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-1011, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1011, default 1011): 
Using default value 1011

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

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




3. Create ORACLEASM disks

-bash-4.1# oracleasm createdisk DISK6 /dev/sdf
Device "/dev/sdf" is not a partition
-bash-4.1# oracleasm createdisk DISK6 /dev/sdf1
Writing disk header: done
Instantiating disk: done
-bash-4.1# oracleasm createdisk DISK7 /dev/sdg1
Writing disk header: done
Instantiating disk: done
-bash-4.1# oracleasm createdisk DISK8 /dev/sdh1
Writing disk header: done
Instantiating disk: done
-bash-4.1# oracleasm listdisks
DISK1
DISK2
DISK3
DISK4
DISK5
DISK6
DISK7
DISK8
-bash-4.1#


-bash-4.1# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "DISK6"
Instantiating disk "DISK7"
Instantiating disk "DISK8"
-bash-4.1# oracleasm listdisks
DISK1
DISK2
DISK3
DISK4
DISK5
DISK6
DISK7
DISK8


4. Create ASM diskgroup


SQL> create diskgroup VOTE_TMP normal redundancy
failgroup DISK6 disk
'ORCL:DISK6' name DISK6
failgroup DISK7 disk
'ORCL:DISK7' name DISK7
failgroup DISK8 disk
'ORCL:DISK8' name DISK8
attribute
'au_size'='1M',
'compatible.asm'='11.2',
'compatible.rdbms'='10.1';    

Diskgroup created.

SQL> select group_number, name from v$asm_diskgroup;

GROUP_NUMBER NAME
------------ ------------------------------
       1 DATA
       2 FRA
       3 VOTE
       4 VOTE_TMP

SQL>

SQL> exit




5. Move votedisk to new diskgroup, that will have 3 copy of voting, because thiis disk group was created with normal redundancy on 3 disks.

[grid@rac1 ~]$ crsctl replace votedisk +VOTE_TMP
Successful addition of voting disk 01c0cd36cdff4faabfc4d59d7fda6599.
Successful addition of voting disk 819d4681343a4f56bf44f76f812000ba.
Successful addition of voting disk ab1b6ee43be14fe2bf91798868124614.
Successful deletion of voting disk 26f8032a6f6a4f28bfe642ea5b99da9c.
Successfully replaced voting disk group with +VOTE_TMP.
CRS-4266: Voting file(s) successfully replaced
[grid@rac1 ~]$
[grid@rac1 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   01c0cd36cdff4faabfc4d59d7fda6599 (ORCL:DISK6) [VOTE_TMP]
 2. ONLINE   819d4681343a4f56bf44f76f812000ba (ORCL:DISK7) [VOTE_TMP]
 3. ONLINE   ab1b6ee43be14fe2bf91798868124614 (ORCL:DISK8) [VOTE_TMP]
Located 3 voting disk(s).

Monday, July 28, 2014

emdb.nohup: XML-20108: (Fatal Error) Start of root element expected ement expected

oracle@dbt1.ro:/home/oracle>emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://dbt1.ro:5501/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ............................................................................................. failed.

oracle@dbt1.sniep.ro:/oracle/app/db/product/11.2.0/dbt1_repoimt/sysman/log>tail -f emdb.nohup
14/07/28 17:51:28 Fatal error: server exiting
----- Mon Jul 28 17:51:30 2014::Checking status of DBConsole : 42074202 -----
----- Mon Jul 28 17:51:30 2014::DBConsole exited at Mon Jul 28 17:51:30 2014 with return value 1. -----
----- Mon Jul 28 17:51:30 2014::Restarting DBConsole. -----
----- Mon Jul 28 17:51:30 2014::Console Launched with PID 42074206 at time Mon Jul 28 17:51:30 2014 -----
----- Mon Jul 28 17:51:30 2014::osname is aix -----
----- Mon Jul 28 17:51:31 2014::heap size used is 384M -----
----- Mon Jul 28 17:51:31 2014::perm size used is -1 -----
----- Mon Jul 28 17:51:31 2014::joptions used are -Xmx384M -----
WARNING: Ignoring zero-length code source: /oracle/app/db/product/11.2.0/jdk/jre/lib/ext/ldapsec.jar(from system property java.ext.dirs)
WARNING: Unable to access loaded classes.
14/07/28 17:51:33 Error initializing server: /oracle/app/db/product/11.2.0/oc4j/j2ee/OC4J_DBConsole_dbt1_repoimt/config/server.xml, Fatal error at line 1 offset1 in file:/oracle/app/db/product/11.2.0/oc4j/j2ee/OC4J_DBConsole_dbt1_repoimt/config/server.xml: .<Line 1, Column 1>: XML-20108: (Fatal Error) Start of root element expected.

14/07/28 17:51:33 Fatal error: server exiting

This can happen after one of the following:

- DB was upgraded and a patchset was applied.
- The server experienced a disk full issue

Option 1

Restore the file from a binary backup or another similar installation (same OS and DB version) or from a new similar fresh installation.

This option worked for me:

oracle@dbt1.ro:/home/oracle>cp /oracle/app/db/product/11.2.0/oc4j/j2ee/OC4J_DBConsole_dbt1_repoimt/config/server.xml /oracle/app/db/product/11.2.0/oc4j/j2ee/OC4J_DBConsole_dbt1_repbit/config/server.xml
oracle@dbt1.ro:/home/oracle>more /oracle/app/db/product/11.2.0/oc4j/j2ee/OC4J_DBConsole_dbt1_repbit/config/server.xml 
oracle@dbt1.ro:/home/oracle>emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://dbt1.ro:5502/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ............................ started.
------------------------------------------------------------------
Logs are generated in directory /oracle/app/db/product/11.2.0/dbt1_repbit/sysman/log

There is also the second option with reconfiguration of EM dbconsole

Rebuild the configuration files for the DB Console:
- Stop DB Console processes: emctl stop dbconsole
- deconfig the DB Console: emca -deconfig dbcontrol db
- reconfig the DB Console: emca -config dbcontrol db

RAC 11.2 enable archivelog

[oracle@rac1 ~]$ sqlplus / as sysdba
SQL> show parameter recovery;

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest             string
db_recovery_file_dest_size         big integer 0
recovery_parallelism             integer     0

SQL> alter system set db_recovery_file_dest_size=20G scope=both sid='*';
SQL> alter system set db_recovery_file_dest='+FRA' scope=both sid='*';
SQL> archive log list;
Database log mode           No Archive Mode
Automatic archival           Disabled
Archive destination           USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     4
Current log sequence           5
SQL> alter system set cluster_database=false scope=spfile sid='racdb1';
SQL> exit
[oracle@rac1 ~]$ srvctl stop database -d racdb
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL> startup mount
SQL> alter database archivelog;
SQL> alter system set cluster_database=true scope=spfile sid='racdb1';
SQL> shutdown immediate
SQL> exit
[oracle@rac1 ~]$ srvctl start database -d racdb
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL> archive log list;
Database log mode           Archive Mode
Automatic archival           Enabled
Archive destination           USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     4
Next log sequence to archive   5
Current log sequence           5

Saturday, July 26, 2014

RAC 11.2 Multiplex Oracle Database control files on ASM

Multiplex oracle rac control files on ASM

[oracle@rac1 ~]$ sqlplus / as sysdba
SQL> show parameter control_file

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time         integer     7
control_files                 string     +DATA/racdb/controlfile/curren
                         t.260.853897145

SQL> alter system set control_files='+DATA/racdb/controlfile/current.260.853897145','+FRA' scope=spfile;

System altered.

SQL> exit

[oracle@rac1 ~]$ srvctl stop database -d racdb
[oracle@rac1 ~]$ srvctl start database -d racdb -o nomount

[oracle@rac1 ~]$ sqlplus / as sysdba
SQL> show parameter control_files;

control_files                 string     +DATA/racdb/controlfile/curren
                         t.260.853897145, +FRA
SQL> exit

[oracle@rac1 ~]$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Jul 26 21:21:19 2014

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

connected to target database: RACDB (not mounted)

RMAN> restore controlfile from '+DATA/racdb/controlfile/current.260.853897145';

Starting restore at 26-JUL-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 instance=racdb1 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+DATA/racdb/controlfile/current.260.853897145
output file name=+FRA/racdb/controlfile/current.256.853968129
Finished restore at 26-JUL-14

RMAN> exit

[oracle@rac1 ~]$ sqlplus / as sysdba
SQL> alter system set control_files='+DATA/racdb/controlfile/current.260.853897145','+FRA/racdb/controlfile/current.256.853968129' scope=spfile;

System altered.

SQL> exit

[oracle@rac1 ~]$ srvctl stop database -d racdb
[oracle@rac1 ~]$ srvctl start database -d racdb

[oracle@rac1 ~]$ sqlplus / as sysdba
SQL> show parameter control_files;

control_files                 string     +DATA/racdb/controlfile/curren
                         t.260.853897145, +FRA/racdb/co
                         ntrolfile/current.256.85396812
                         9
SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA/racdb/controlfile/current.260.853897145
+FRA/racdb/controlfile/current.256.853968129

SQL> exit
[oracle@rac1 ~]$

Friday, July 25, 2014

Increase SHM memory to acomodate MEMORY_TARGET

When setting memory_target for oracle you can get errors

-bash-4.1# umount tmpfs
umount: /dev/shm: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

-bash-4.1# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vda1              28G   19G  7.5G  72% /
tmpfs                 939M  200M  740M  22% /dev/shm

-bash-4.1# umount tmpfs
umount: /dev/shm: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

-bash-4.1# umount -l tmpfs
-bash-4.1# mount -t tmpfs shmfs -o size=2048m /dev/shm
-bash-4.1# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vda1              28G   19G  7.5G  72% /
shmfs                 2.0G     0  2.0G   0% /dev/shm
-bash-4.1# vi /etc/fstab
tmpfs                   /dev/shm                tmpfs   size=2048m        0 0

Configure user equivalence for user oracle RAC

[grid@rac1 ~]$ su - oracle
Password:
[oracle@rac1 ~]$ mkdir .ssh
[oracle@rac1 ~]$ ssh-keygen -t rsa
[oracle@rac1 ~]$ cd .ssh
[oracle@rac1 .ssh]$ ls
id_rsa  id_rsa.pub
[oracle@rac1 .ssh]$ cat id_rsa.pub >> authorized_keys
[oracle@rac1 .ssh]$ scp authorized_keys oracle@rac2:/home/oracle/.ssh
oracle@rac2's password:
authorized_keys                               100%  405     0.4KB/s   00:00   



On second node run the same commands to generate the keys, update authorized_keys file and send it to the other server. Then test the connection between nodes.

[oracle@rac1 .ssh]$ ssh rac1 date
[oracle@rac1 .ssh]$ ssh rac2 date



CRS-2800: Cannot start resource 'ora.asm' as it is already in the INTERMEDIATE state on server

In my test environment with 2 VM I had a situation when the Oracle cluster was unable to start:

-bash-4.1# ./crsctl stop cluster
CRS-2796: The command may not proceed when Cluster Ready Services is not running
CRS-4000: Command Stop failed, or completed with errors.
-bash-4.1# ./crsctl start cluster
CRS-2800: Cannot start resource 'ora.asm' as it is already in the INTERMEDIATE state on server 'rac1'
CRS-4000: Command Start failed, or completed with errors.
-bash-4.1# ./crsctl stat res -t
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Status failed, or completed with errors.


Looking in ASM at the state of diskgroup (only the one with OCR and voting disks), it was dismounted and the cluster needed it in order to start.

[grid@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 25 22:42:22 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select NAME , STATE FROM V$ASM_DISKGROUP;

NAME                   STATE
------------------------------ -----------
VOTE                   DISMOUNTED

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
[grid@rac1 ~]$ asmcmd mount VOTE
[grid@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 25 22:43:46 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL>                
SQL> select NAME , STATE FROM V$ASM_DISKGROUP;

NAME                   STATE
------------------------------ -----------
VOTE                   MOUNTED

SQL> exit


Then as root, try to start the cluster and check its status.

-bash-4.1# ./crsctl start cluster
CRS-4691: Oracle Clusterware is already running
CRS-4000: Command Start failed, or completed with errors.
-bash-4.1# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.VOTE.dg
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.asm
               ONLINE  ONLINE       rac1                     Started            
               ONLINE  ONLINE       rac2                     Started            
ora.gsd
               OFFLINE OFFLINE      rac1                                        
               OFFLINE OFFLINE      rac2                                        
ora.net1.network
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.ons
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                                        
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac2                                        
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac2                                        
ora.cvu
      1        ONLINE  ONLINE       rac2                                        
ora.oc4j
      1        ONLINE  ONLINE       rac2                                        
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                        
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                        
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                                        
ora.scan2.vip
      1        ONLINE  ONLINE       rac2                                        
ora.scan3.vip
      1        ONLINE  ONLINE       rac2                                        


Wednesday, July 23, 2014

compat-libstdc++ not installed when installing Oracle 11.2.0.3 on RHEL6

When installing 11.2.0.3 on RHEL6, to ease the installation, you can install

-bash-4.1# yum install oracle-rdbms-server-11gR2-preinstall

This RPM still don't install 2 required packages: compat-libstdc++ and sysstat

The interesting part is that the package name of compat-libstdc++ is compat-libstdc++-33.

-bash-4.1# yum install compat-libstdc++
Setting up Install Process
No package compat-libstdc++ available.
Error: Nothing to do


-bash-4.1# yum install compat-libstdc++-33
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                         Arch                                               Version                                                    Repository                                               Size
=============================================================================================================================================================================================================================================
Installing:
 compat-libstdc++-33                                             x86_64                                             3.2.3-69.el6                                               ol6_ga_base                                             183 k

Transaction Summary
=============================================================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 183 k
Installed size: 806 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 183 k
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm                                                                                                                                                                           | 183 kB     00:01    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                                                                                                   1/1
  Verifying  : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                                                                                                   1/1

Installed:
  compat-libstdc++-33.x86_64 0:3.2.3-69.el6                                                                                                                                                                                                 

Complete!

Change Oracle DB Console logout timeout

For DB Control, you should set it in:

$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/WEB-INF/web.xml
and set the following parameter to -1 (no limit):   <session-config>       <session-timeout>-1</session-timeout>  </session-config> 

or if you like, you can specify a positive number to indicate the number of minutes before timeout.