Posted by arpz on Jan 14, 2010 in
DBA,
Oracle
My last post about Turn on/off RAC basically is to implement Converting/Migrating Oracle RAC to Single instance. I try to find a way to do this in Google but it seem no result regarding this. You can find thousand of article on converting Single Instance to Oracle RAC but not the other way around. Why?
You'll find a Doc. on Metalink with step by step instructions on "How to convert a
single instance Database to RAC", but not the other way round.
The analyst's response from Oracle is "We cannot convert a RAC database into a Single
instance database, that is the reason why you didnt find any steps.
It is not supported.
Why Oracle mentioned it is not supported? It does not makes any sense that you cannot convert from RAC to non-RAC environment, unless Oracle does not want their customers to go away from RAC.
Anyway…it’s all about $$$$$.
So, based on my knowledge on how Oracle RAC work, I’ve successfully done it.
This is based on Oracle 10G Release 2 and assumes:
1. Oracle RAC running with cluster file system
2. You have basic knowledge about Oracle RAC
Test Server:
OS : Red Hat Enterprise Linux Server release 5.4
Database Version : 10.2.0.4
File system: OCFS2
1. Stop database and CRS on both node
$ srvctl stop database -d mydb
# crsctl stop crs
2. Turn Off RAC
SQL> startup
ORA-29702 error occurred in Cluster Group Service operation
Relink with the RAC OFF.
$ cd $ORACLE_HOME/rdbms/lib
$ /usr/ccs/bin/make -f ins_rdbms.mk rac_off
Relinking oracle
$ make -f ins_rdbms.mk ioracle
## OR , both working fine
$ cd $ORACLE_HOME/bin
$ relink oracle
If ASM Instance Exist, run below command as root
# /oracle/product/10.2.0/db/bin/localconfig delete
# /oracle/product/10.2.0/db/bin/localconfig add
3. Parameter(Pfile/spfile) & database changes
SQL> startup
SQL> alter database disable thread 2;
SQL> alter system set remote_listener='';
3a. Remove unwanted logfile
SQL> select thread#, group# from v$log;
SQL> alter database drop logfile group 3;
SQL> alter database drop logfile group 4;
3b. Remove unwanted tablespace
SQL> drop tablespace UNDOTBS2 including contents and datafiles;
3c. Rename instance name.
SQL> alter system set instance_name=<new_name> scope=spfile;
SQL> shutdown immediate
SQL> startup
- Change your ORACLE_SID environment
4. Run $ORA_CRS_HOME/install/rootdelete.sh on both node
- This will stop and remove all CRS startup related file
5. Remove $ORA_CRS_HOME binary using Clusterware OUI installer
- Ignore any error if 2nd node already down
- rm -rf $ORA_CRS_HOME
6. Modify listener file
$ vi $ORACLE_HOME/network/admin/listener.ora
6a. Modify tnsname file
$ vi $ORACLE_HOME/network/admin/tnsnames.ora
Tags: migration, Oracle, rac
Posted by arpz on Jan 14, 2010 in
DBA,
Oracle
I’ve requirement from client to change their architecture. Migrating Oracle RAC to Single Instance. Then I found article related to this in order to successfully migrate Oracle RAC to Single Instance.
On 10R2 if the Oracle binaries are installed with the RAC, one can’t use those binaries to start Oracle Instance if CRS is not running, so in case when one needs to start the instance without CRS one needs to rebuild the oracle and it’s libraries to start the instance.
To turn off RAC
# link the oracle libraries
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_off
# rebuild oracle
$ cd $ORACLE_HOME/bin
$ relink oracle
To turn on RAC
# link the oracle libraries
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_on
# rebuild oracle
$ cd $ORACLE_HOME/bin
$ relink oracle
Reference : http://oraclespin.wordpress.com/
Tags: Oracle, rac_off, rac_on
Posted by arpz on Nov 17, 2009 in
DBA,
Oracle
Today I’ve completed Oracle RAC installation on AIX 5.3 machine. Lot of thing I don’t know about AIX. Can’t play around with this Os as we need the machine itself. Not like Sun OS, available for x86.
Few things I take note during the installation,
1. Make sure all packages installed
2. Prepare enough space for /tmp
3. There is no unzip in AIX by default
4. HACMP is not mandatory
5. No issue if Major and Minor number not same for OCR and VOTING, mknod c M m. Should be fine.
6. There is a bug if you installed 10.2.0.3. So patch it to 10.2.0.4 (That’s is what I did) even the requirement from client is 10.2.0.3.
That’s all, can’t capture the screen shot of everything. Need to installed from console. Bla bla bla from client when asking to remote.
Tags: aix, Oracle, rac
Posted by arpz on Jul 15, 2009 in
DBA,
Linux,
My Life,
Oracle
I am very familiar with RedHat Linux for enabling and disable the GUI. Just changing the /etc/inittab file. As lot of customer using Solaris compare to Linux, so I need to upgrade my knowledge with this OS. I installed Solaris 10 x86 and play around with it. But the problem is, I have limited in resources, so I need to disable the GUI desktop to free unused resources.
Sample of /etc/inittab (RedHat Linux)
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg,
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
# System initialization.
si::sysinit:/etc/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
# Run xdm in runlevel 5
RedHat Linux
Disable GUI
Change the default run level in /etc/inittab to 3
id:3:initdefault:
Enable GUI
Change the default run level in /etc/inittab to 5
id:5:initdefault:
I’ve tested this on Solaris 10 and it work.
Disable GUI
# /usr/dt/bin/dtconfig -d
Enable GUI
# /usr/dt/bin/dtconfig -e
Tags: dtconfig, gui, inittab, Linux, solaris
Posted by arpz on Jul 2, 2009 in
DBA,
Oracle
When a node in RAC stops & re-start, oracle clusterware try to start the instance as soon as node starts. This may not be desirable, because instance start-up may fail, if system components on which instance depends are not ready
For example: Volume Manager is not started, file system is not mounted automatically
This scenario might occur, if oracle clusterware does not manage system components.
To manager automatic restart, we can use AUTO_START attribute.
AUTO_START parameter may have three values
1. always (1)
2. restore (0)
3. never (2)
How to change this parameter?
$ crs_stat -p <resource name> <filename>.cap
then change AUTO_START to a new value
$ vi <filename>.cap
$ crs_register -u <resource name >
verify the change by
$ crs_stat -p <resource name >
BTW, this method can be used for any resource. Just make sure you know what you’re doing.Backup the crs and you can messup with the CRS. Good luck with that.
Tags: crs, Oracle, rac