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 Jan 13, 2010 in
solaris
Changing the IP/Hostname on Solaris 10 requires editing below files :
1. add/modify entry of /etc/hosts
# cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
192.168.2.100 soladb1 loghost
10.10.10.1 soladb1-priv
2. edit name /etc/nodename to you hostname
# cat /etc/nodename
soladb1
3. Edit/add file /etc/hostname.<interface name>
# cat hostname.e1000g0
soladb1
# cat /etc/hostname.e1000g1
soladb1-priv
4. If you are changing network address, you will need to change the router address in the file:
#cat /etc/defaultrouter
I just leave defaultrouter file blank.
Tags: ip address, solaris 10
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 Nov 16, 2009 in
esx
By default, when you install ESX 4.0, the root access is disable. To enable it, you can follow bellow step.
1. Press ALT+F1 to access the console and login as root
2. vi /etc/ssh/sshd_config
3. Look for PermitRootLogin and change it to yes
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
4. Restart the sshd service
# service sshd restart
If you want to ssh to another server in esx, by default it being block. You will get port 22: connection refused error so, execute below command as root to open firewall ports.
# esxcfg-firewall -e sshServer
# esxcfg-firewall -e sshClient
Good Luck!
Tags: esx, ssh