Tuesday, September 17, 2013

Oracle Grid Infrastructure – Part 6

Dear Readers,

My name is Franz Devantier, creator of this blog.  I am an Oracle Certified Professional (OCP DBA 11g) Security DBA.  I will be sharing with you the basic duties of an Oracle DBA, and also some of the undocumented, and not so well known tasks. 

Oracle Grid Infrastructure – Part 6
Installing Oracle Grid Infrastructure for an Existing Database
Because Oracle Restart can only manage existing 11.2 resources, you will have to limit yourself to installing Oracle Grid Infrastructure for existing 11.2 databases only.  However releases of the Oracle database prior to 11.2, can exist on the same database server without being managed by Oracle Restart.

=> You will install Oracle Grid Infrastructure for a Standalone server, on the same Host computer as the Oracle database; However the Oracle Grid Infrastructure will be installed in its own separate Oracle Home. 

=> So let’s say you have now installed Oracle Grid Infrastructure.
Go to the Oracle Grid Infrastructure’s home directory /bin.  Use the “svrctl” utility to manually add the database, the listener, the Oracle ASM instance, Oracle ASM disk groups, and any other database services to the Oracle Grid Infrastructure configuration.

Modifying Oracle Grid Infrastructure for a Standalone Server Binaries
To modify the software installed in your Grid home, you must first stop the Oracle Restart stack.  You will need to follow a series of steps in order to stop and restart the “Oracle restart stack”.  You will need to do this before you apply a one-off patch or modify any of the DLL’s used by Oracle Restart or Oracle ASM.  Before relinking executables, you will need to ensure that all the executables that run in the Oracle home directory that you are relinking.  You will also need to shut down applications that are linked with Oracle shared libraries.

To Prepare the Oracle Grid Infrastructure Standalone Server home for modification:
=> log in as the grid owner, and change directory to $GRID_HOME/bin
# cd $GRID_HOME/bin

=> Shut down the Oracle Restart stack;
# crsctl stop has –f

=> Confirm that the Oracle Restart stack is shut down, and then perform the software updates in the Oracle Grid Infrastructure home.

=> Restart the “Oracle Restart stack”.
# crsctl start has

Relink Oracle Grid Infrastructure for a Standalone Server with the following steps;
=> login as root
# cd $GRID_HOME/crs/install
# perl roothas.pl –unlock

=> login as the grid user.
# export ORACLE_HOME=$GRID_HOME
# $GRID_HOME/bin/relink

=> login as the root user again.
# cd $GRID_HOME/rdbms/install
# ./rootadd_rdbms.sh
# cd $GRID_HOME/crs/install
# perl roothas.pl –patch

It is important to relink the Oracle Restart and Oracle ASM binaries, every time you apply an OS patch or after an OS upgrade.


3.Login as root again:
# cd Grid_home/rdbms/install/
# ./rootadd_rdbms.sh
# cd Grid_home/crs/install
# perl roothas.pl -patch
You must relink the Oracle Restart and Oracle ASM binaries every time you apply an operating system patch or after an operating system upgrade.

Manually Configuring Oracle Automatic Storage Management Disk Groups
When you run Oracle Automatic Storage Management Configuration Assistant (ASMCA) utility, it will create a new ASM instance, if there is no ASM instance currently configured on the computer.  After you have installed the Oracle Grid Infrastructure, then you can use ASMCA to create and configure disk groups, as well as Oracle ADVM, and Oracle ACFS.

To create additional disk groups or to manually configure Oracle ASM disks;
# cd $GRID_HOME/bin
# ./asmca

You should have X Windows set up for this to work.

Testing the Oracle Automatic Storage Management Installation
You will use the “asmcmd” command line utility, which will allow you to manage ASM disk groups, files and directories.
=> Open a shell window and set the ORACLE_SID and ORACLE_HOME variables, to point to the Oracle ASM instance.  For example the Oracle ASM SID may be named +ASM
# export ORACLE_SID=+ASM
# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid

=> Use the ASMCMD utility to list the disk groups for the Oracle ASM instance;
# $ORACLE_HOME/bin/asmcmd lsdg

“ASMCMD” will connect by default as the SYS user with SYSASM privileges.

If the Oracle ASM instance is not running, then you can start the ASM instance like this:
# $ORACLE_HOME/bin/asmcmd startup

Franz Devantier.

No comments:

Post a Comment