Thursday, January 23, 2014

Mount the file system for read write mode Linux

mount -o remount,rw  /          #whole root disk will be changed
mount -o remount,rw  /dev/sda    #Only sda partition will be changed to                                       rw -mode

Thursday, January 16, 2014

Change Oracle 9i DB From one server to another server on Windows

First for new server Install Oracle 9i Base,then required Patch and do not create the Database.
Now we have an old server with db running and new server with oracle binary installed.
First we need to Down the DB using services
Down  OracleDatabase<SID>,OracleListner<SID>
ex:
             If DB name is ORCL then 
ORACLESERVICEORCL & ORACLELISTNERORCL

Now DB is down and users can not work.

Now Copy D:\Oracle\oradata folder to new Server's Oracle smiler location
Then Copy D:\Oracle\product\9.0.2\db_home\database folder to new Server's smiler location.

Then you have to export windows registry of Oracle
goto -->services-->registry-->
export it as a file.

Then Go to Oracle_Home/Network/admin/ Then copy Listner.ora & Tnsnames.ora file to the similer location of the new Oracle Server.

RUN  lsnrctl start to start the listner.


Then go to new Oracle Server and open CMD
type oradim -NEW
-SRVC ORACLESERVICE<SID> -- ORACLESERVICEORCL
-SYSPWD PASSWORD --PASSWORD
-STARTMODE AUTO
-PFILE :D\ Oracle\product\9.0.2\db_home\database\initORCL.ora
-SHUTMODE immediate

then press ENTER

then STARTUP LISTNER
STARTUP DB
THEN BOOT PC

Then Change IP's to use new DB server.

Thank you!

Tuesday, January 7, 2014

Deconfiguring Oracle 11gR2 RAC

When you are to uninstall Oracle RAC you can use following commands on  each nodes.

log in as root user.

Please run the following command on each and ever node except the last node.
 perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force

perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode


Then clear ASM disks from the local node (first node)

dd if=/dev/zero of =/dev/sdx1 bs=1024 count=100 (sdx1 assigend to null(zero)).

Delete the ASM disks
/etc/init.d /oracleasm deletedisk VOL1
/etc/init.d/oracleasm deletedisk VOL2
/etc/init.d/oracleasm deletedisk VOL3
/etc/init.d/oracleasm deletedisk VOL4

Then create new ASM disk group
/etc/init.d/oracleasm createdisk VOL1  /dev/iscsi/asm1/part1
/etc/init.d/oracleasm createdisk VOL2  /dev/iscsi/asm2/part1
/etc/init.d/oracleasm createdisk VOL3  /dev/iscsi/asm3/part1
/etc/init.d/oracleasm createdisk VOL4  /dev/iscsi/asm4/part1

run this command to  list disks
      /etc/init.d/oracleasm listdisks 

On other nodes
run  following commands

      /etc/init.d/oracleasm scandisks
      /etc/init.d/oracleasm listdisks

Now the disks and Server is clear for the next installation. :)


If you could not deconfigure the RAC using above cammand

Please try with this

rm /etc/oracle/*
rm -f /etc/init.d/init.cssd
rm -f /etc/init.d/init.crs
rm -f /etc/init.d/init.crsd
rm -f /etc/init.d/init.evmd
rm -f /etc/rc2.d/K96init.crs
rm -f /etc/rc2.d/S96init.crs
rm -f /etc/rc3.d/K96init.crs
rm -f /etc/rc3.d/S96init.crs
rm -f /etc/rc5.d/K96init.crs
rm -f /etc/rc5.d/S96init.crs
rm -Rf /etc/oracle/scls_scr
rm -f /etc/inittab.crs
cp /etc/inittab.orig /etc/inittab

Above command will remove the Cluster Registry Files manually.


Please do remeber to
  1. remove folders inside /u01/app/    oracle . oraInventory , 11.2.0

          rm -rf oracle oraInventory 11.2.0 

  2.remove /etc/oratab file
         
          rm /etc /oratab