Category Archives: Oracle

Use of rconfig to modify a single instance 11g database to RAC

This article covers the conversion of a pre-existing Oracle 11g single instance database into a two node RAC. The following assumptions are made for this procedure to execute correctly:
1. Oracle 11g GRID has been installed on both RAC nodes.
2. Oracle 11g RDBMS has been installed on both RAC nodes.
3. Oracle 11g single instance database has been copied to RAC node 1 and operates correctly as a single instance database.

1. Logon to node 1 of your Oracle RAC server as the RDBMS owner.

2. Copy the file $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC_AdminManaged.xml

[oracle@mylinux1 dbhome_1]$ cp $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC_AdminManaged.xml orcl.xml
[oracle@mylinux1 dbhome_1]$

2. The sample XML file gives detailed instruction on how to edit the file for your specific use. In this example edit the following lines:

SourceDBHome = Single instance Oracle Home directory
TargetDBHome = RAC instance Oracle Home, this could be the same as the single instance Oracle Home directory
SourceDBInfo SID= SID of the Source database.
Password = SYS password
Node name= node1 name, normally this is the machine name.
Node name= node2 name, normally this is the machine name.
InstancePrefix = prefix of your RAC database, normally this is equal to the SID of your source database.
SharedStorage type=”ASM” or “OCFS”

3. Ensure that the single instance database is up and running.

[oracle@mylinux1 dbhome_1]$ ps -ef|grep smon
oracle 18508 1 0 02:12 ? 00:00:00 ora_smon_orcl
oracle 26774 7777 0 02:46 pts/1 00:00:00 grep smon
[oracle@mylinux1 dbhome_1]$

4. Execute the rconfig command and pass your edited xml file to it.
[oracle@mylinux1 bin]$ ./rconfig ./orcl.xml
Converting Database “orcl” to Cluster Database. Target Oracle Home: /u01/app/oracle/product/11.2.0/dbhome_1. Database Role: PRIMARY.
Setting Data Files and Control Files
Adding Database Instances
Adding Redo Logs
Enabling threads for all Database Instances
Setting TEMP tablespace
Adding UNDO tablespaces
Adding Trace files
Setting Flash Recovery Area
Updating Oratab
Creating Password file(s)
Configuring Listeners
Configuring related CRS resources
Starting Cluster Database
< ?xml version=”1.0″ ?>

Operation Succeeded

/u01/app/oracle/product/11.2.0/dbhome_1

[oracle@mylinux1 bin]$>

5. Now the database can be confirmed in rac mode on both nodes.

[oracle@mylinux1 bin]$ ps -ef|grep smon
oracle 16544 1 0 03:04 ? 00:00:00 ora_smon_orcl1
oracle 21072 7777 0 03:07 pts/1 00:00:00 grep smon
[oracle@mylinux1 bin]$

[root@mylinux2 ~]# ps -ef|grep smon
oracle 27298 1 0 03:03 ? 00:00:00 ora_smon_orcl2
root 29474 23387 0 03:07 pts/4 00:00:00 grep smon
[root@mylinux2 ~]#

This completes configuration of single instance to Oracle 11g RAC.

Larry J. Catt, OCP
oracle@allcompute.com
www.allcompute.com

Oracle Error ORA-32004 and ORA-00845

Error:

[oracle@mylinux1 bin]$ ./dbca -silent -deleteDatabase -sourceDB orcl -sysDBAUserName larry -sysDBAPassword larry
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORA-00845: MEMORY_TARGET not supported on this system

Solution:

1. Logon to the database as sysdba

2. Execute the command.

SQL> show parameter memory_target;

NAME TYPE VALUE
———————————— ———– ——————————
memory_target big integer 3104M
SQL>

3. Issue the command.

SQL> alter system reset memory_target;

System altered.

SQL>

4. Shutdown the database

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

5. Startup the database.

SQL> startup open
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 217157632 bytes
Fixed Size 2211928 bytes
Variable Size 159387560 bytes
Database Buffers 50331648 bytes
Redo Buffers 5226496 bytes
Database mounted.
Database opened.
SQL>

6. Execute command:

SQL> show parameter memory_target

NAME TYPE VALUE
———————————— ———– ——————————
memory_target big integer 0
SQL>

7. re-execute

[oracle@mylinux1 bin]$ ./dbca -silent -deleteDatabase -sourceDB orcl -sysDBAUserName larry -sysDBAPassword larry
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

[oracle@mylinux1 bin]$

This completes resolution of Oracle Error ORA-32004 – ORA-00845.

Larry Catt, OCP
oracle@allcompute.com
www.allcompute.com

Move Oracle RAC database into Archive log mode

Moving Oracle RAC databases into and out of archive log mode requires a few more steps due to the existence of multiple instances. This procedure covers the steps required to move a non-archive log mode database into archive log mode.

1. Logon to Oracle node1 server as the oracle software owner.

2. Validate the current archive log mode of the database, by logging onto the database and issuing the [archive log list] command.


[oracle@mylinux1 ~]$ export ORACLE_SID=orcl1
[oracle@mylinux1 ~]$ sqlplus ‘/ as sysdba’

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jan 20 22:57:07 2011

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u05/oradata/orcl/archive
Oldest online log sequence 66
Current log sequence 68

3. Move the node out of cluster mode by changing the parameter cluster_database equal to false and exit.

SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@mylinux1 ~]$

4. Stop the clustered database with srvctl utility.

[oracle@mylinux1 ~]$ srvctl stop database -d orcl

5. Logon to sqlplus on node1 and startup the instance in single instance mode with mount option.

[oracle@mylinux1 ~]$ sqlplus ‘/ as sysdba’

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jan 20 22:59:08 2011

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

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 367476736 bytes
Fixed Size 2213376 bytes
Variable Size 293603840 bytes
Database Buffers 67108864 bytes
Redo Buffers 4550656 bytes
Database mounted.
SQL>

6. Alter the database to archive log mode.

SQL> alter database archivelog;

Database altered.

SQL>

7. Change the parameter cluster_database back to true, shutdown the instance, and exit.

SQL> alter system set cluster_database=true scope=spfile;

System altered.

SQL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL>

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

8. Use the srvctl utility to startup the clustered database.

[oracle@mylinux1 ~]$ srvctl start database -d orcl

9. Logon to sqlplus on node1 and check the archive log mode with the command [archive log list].

[oracle@mylinux1 ~]$ sqlplus ‘/ as sysdba’

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jan 20 23:01:22 2011

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u05/oradata/orcl/archive
Oldest online log sequence 66
Next log sequence to archive 68
Current log sequence 68
SQL>

This completes moving an Oracle RAC database into archive log mode.

Larry J. Catt, OCP
oracle@allcompute.com
www.allcompute.com

Find the Oracle parameter causing ORA-32004 and removing

During the normally life cycle of a database, multiple upgrades will occur, resulting in parameters becoming obsolete. This article shows how to determine the parameter which is obsolete and removing it.

Typical error generated by an obsolete parameter:

[oracle@mylinux2 bin]$ ./dbca -silent -deleteDatabase -sourceDB orcl
-sysDBAUserName larry -sysDBAPassword larry
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
[oracle@mylinux2 bin]$

1. Logon to the database as the sys user.

[oracle@mylinux2 bin]$ sqlplus ‘/ as sysdba’

SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 10 01:32:07 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

2. Execute the following SQL to find the problem

select name, value from v$parameter where ISDEPRECATED=’TRUE’ and ISDEFAULT=’FALSE’;

SQL> select name, value from v$parameter where ISDEPRECATED=’TRUE’ and ISDEFAULT=’FALSE’;

NAME
——————————————————————————–
VALUE
——————————————————————————–
remote_os_authent
FALSE
SQL>

3. Reset this parameter

SQL> alter system reset remote_os_authent;
System altered.
SQL>

4. Stop database.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

5. Start database.

SQL> startup
ORACLE instance started.

Total System Global Area 217157632 bytes
Fixed Size 2211928 bytes
Variable Size 159387560 bytes
Database Buffers 50331648 bytes
Redo Buffers 5226496 bytes
Database mounted.
Database opened.
SQL>

This completes removing of obsolete or deprecated Oracle parameters.

Larry Catt, OCP
oracle@allcompute.com
www.allcompute.com

Undo root.sh script in 11g GRID or RDBMS install

If you have executed root.sh on the installation of an Oracle 11g clusterware or RDBMS install and it failed. Remove the changes made by root.sh before re-execution with the following procedure.

1. Logon as the root user.

2. Navigate to the Oracle GRID_HOME

3. Execute the following command.

/opt/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig –force -verbose

This completes the undoing the execution of root.sh from an Oracle Grid Installation.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

How to debug Oracle opatch utility

The following procedure shows how to debug the Oracle opatch utility when you receive an error.

1. Execution of opatch utility results in the following error.

[oracle@mylinux1 OPatch]$ opatch lsinventory
Invoking OPatch 11.1.0.6.6

Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.6
OUI version : 11.2.0.1.0
OUI location : /u01/app/oracle/product/11.2.0/dbhome_1/oui
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2011-04-02_19-17-51PM.log

Patch history file: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch_history.txt
Inventory load failed… OPatch cannot load inventory for the given Oracle Home.
LsInventorySession failed: Unable to create patchObject

OPatch failed with error code 73
[oracle@mylinux1 OPatch]$

2. Set the environmental variable OPATCH_DEBUG equal to true.

[oracle@mylinux1 OPatch]$ export OPATCH_DEBUG=true
[oracle@mylinux1 OPatch]$

3. Re-execute your opatch utility and every action performed by opatch will be displayed in your buffer. Use the messages to determine the error.

This completes use of debug with the opatch utility.

Larry J. Catt, OCP
oracle@allcompute.com
www.allcompute.com

Problem with RHEL 5.4 and Oracle RAC

 

I Ran into an issue while working with Oracle Corporation on 11gR2 RAC and RHEL 5.4 using OS layer files and OCFS2 for storage.  Now Oracle is currently saying that no known problem exists, but I thought I would drop a note here, just in case anyone comes across the same situation.   It appears that when you upgrade your RHEL kernel from version 2.6.18-194.26.1.el5 to 2.6.18-238.1.1.el5 and of course upgrade your OCFS2 drivers to the same version.   Access to the shared files of RAC becomes an issue for Oracle upon installation and execution of root.sh.  

We struggled with this for two weeks, and from the start said the only thing we did was upgrade the kernel.  However, Oracle repeatedly said all Kernels above 2.16.18 have no issues.    Finally, we downgraded the system back to the original kernel 2.6.18-194.26.1.el5 and re-applied the OCFS2 RPMs for that kernel and everything began to work. 

So if you are have problems with Oracle 11g RAC install on RHEL 5.4 with kernel 2.6.18-238.1.1.el5 and can find no reasonable solution.  You may want to downgrade your kernel and try again.   It actually only took 45 minutes to downgrade, update the Oracle RPMs and provided a solution to a two week old problem. 

 

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Required packages for Oracle 10g RDBMS install on LINUX

The installation of Oracle RDBMS software requires supporting OS level functionality to successfully complete and operate. This article outlines the check which should be done before the installation of Oracle 10g RDBMS is begun.

1. Logon to your Linux Server as the root user.

2. Below is a listing of the RPMs Oracle gives as required for a successful 10g RDBMS install. However, RPMs are continuously updated so the version on your system may be newer than shown below.

libgomp-4.1.2-42.el5.x86_64.rpm
kernel-headers-2.6.18-92.el5.x86_64.rpm
glibc-headers-2.5-24.x86_64.rpm
libstdc++-devel-4.1.2-42.el5.x86_64.rpm
sysstat-7.0.2-1.el5.x86_64.rpm
glibc-devel-2.5-24.x86_64.rpm
libaio-devel-0.3.106-3.2.x86_64.rpm
gcc-4.1.2-42.el5.x86_64.rpm
gcc-c++-4.1.2-42.el5.x86_64.rpm
elfutils-libelf-devel-static-0.125-3.el5.x86_64.rpm
elfutils-libelf-devel-0.125-3.el5.x86_64.rpm
compat-db-4.2.52-5.1.x86_64.rpm
compat-gcc-34-3.4.6-4.x86_64.rpm
compat-gcc-34-c++-3.4.6-4.x86_64.rpm
gdb-6.5-37.el5.x86_64.rpm
libtermcap-devel-2.0.8-46.1.x86_64.rpm
readline-devel-5.1-1.1.x86_64.rpm
unixODBC-2.2.11-7.1.x86_64.rpm
unixODBC-devel-2.2.11-7.1.x86_64.rpm
glibc-devel-2.5-24.i386.rpm
libXp-1.0.0-8.1.el5.i386.rpm
libstdc++-devel-4.1.2-42.el5.i386.rpm
unixODBC-2.2.11-7.1.i386.rpm
unixODBC-devel-2.2.11-7.1.i386.rpm
libaio-devel-0.3.106-3.2.i386.rpm

3. When investigating if the RPM exists on your system, you should not include the version number. In this example we will check for the existence of RPM libgomp-4.1.2-42.el5.x86_64.rpm. Use the rpm –qa command to gather all installed packages, then lookup the specific one with grep.

[root@mylinux1 ~]# rpm -qa|grep libgomp
libgomp-4.4.4-13.el5
[root@mylinux1 ~]#

4. As seen above the actual version of the rpm libgomp is 4.4.4 which is greater than the required version of 4.1.2 and meets our needs for 10g RDBMS install.

5. Repeat these steps for each required package.

This completes checking for required Oracle 10g RDBMS packages.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Removing Oracle 10g RAC components from LINUX server

The following procedure is used to remove all RAC components created during the clusterware and RDBMS installation of 10g from a Linux server. NOTE: Once executed, Clusterware will not be usable.

1. Logon to the server as root.

2. Run the following command from any location on your server to remove all Oracle 10g RAC components from your OS layer. Note: RAC will not be useable on the system once executed.

rm -rf /etc/oracle
rm -rf /etc/oraInst.loc
rm -rf /etc/oratab
rm -rf /etc/init.d/*crs*
rm -rf /etc/init.d/init.cssd
rm -rf /etc/init.d/init.evmd
rm -rf /etc/rc*/*crs*
rm -rf /etc/*crs*
rm -rf /tmp/Ora*
rm -rf /tmp/.oracle


Larry J. Catt
oracle@allcompute.com
www.allcompute.com