« May 2007 | Main | July 2007 »

June 2007 Archives

June 4, 2007

Linux and RAC with ASM install on Virtual Nodes, Step 1 of 5

Installing Linux and RAC with ASM on the constrained environment of a desktop PC or Laptop is a very interesting learning experience for people interested on RAC that lacks the possibility to install and try RAC on real servers.

My first trial was made using the excellent step by step guide by Vincent Chan, that was published on OTN.

Since then I tried this process a couple of times and developed a guide divided into 5 chapters:

  1. Linux Install 
  2. Configure Linux for RAC
  3. Create and Configure the 2nd
    Linux Node

  4. Install RAC on 2 Linux Nodes for
    RAC

  5. Tests and Trials with RAC on Linux
In this post I'm attaching the first document, Step By Step Install of Linux Enterprise Edition on a Virtual Machine.

The steps covered on this document are:

  1. Download and install VMware server
  2. Download Enterprise Linux from Oracle
  3. Create a Linux Virtual Machine
  4. Install Linux Enterprise Edition

This RAC on Virtual Machines installation is not supported and should only be used for private learning purposes.

All the steps to implement this trial on real servers are also covered on a previous post Step by Step RAC on Linux; And Using Virtualization for Test and Training

Another excellent guide to RAC on Linux install can be find on OTN's article: Build Your Own Oracle RAC 10g Release 2 Cluster on Linux and iSCSI  by Oracle Ace Jeffrey Hunter.



June 5, 2007

Linux and RAC with ASM install on Virtual Nodes, Step 2 of 5

We did install the Oracle Distribution of Enterprise Linux on the previous post.

This second post, Step By Step Configure Linux for RAC on a Virtual Node contains the configuration steps required to finish the setup of the first node:

  1. Install and configure VMware tools
  2. Configure the Network
  3. Oracle User Configuration Steps for RAC on a Virtual Node
  4. General Linux Configuration Steps for RAC on a Virtual Node
  5. Storage Configuration Steps for RAC on a Virtual Node
Once these steps are completed we will be ready to replicate the node and build from it the second node, on step #3.

June 13, 2007

Production Upgrade from 8.1.7.4 to 9.2.0.8

Is not uncommon that very critical databases remain on obsolete versions longer than it is convenient.

If the database provide good service and reasonable performance, the risks related to any radical change make the people that need to make the decision to upgrade, to delay it as much as possible.

Sooner or later the day come when the increasing amount of problems, usually related to a big increment on the load and complexity of the applications running on the database raise up the need to upgrade to a more powerful version.

At this moment the DBA get a small window to shutdown the application during the weekend and upgrade the database as fast and safely as possible.

The attached document: "8.1.7.4 - 32 bits Database Upgrade to 9.2.0.8 - 64 bits" is the checklist I did prepare for such a case.

  • Most of the work is done on the pre-migration phase.
  • All upgrade steps are automatized as much as possible.
  • During the upgrade, the longest part of it, the compilation of thousands of user objects, is done in parallel.

I did try this procedure running the compilation with one session only, on a general rehearsal, I expect to decrease the execution time from 3.5 hours to about 2 hours on the next try running in a more powerful machine, with parallel (15) for the compilation process.

Today most upgrades are done from 9i to 10g, and 11g is waiting around the corner.
Nevertheless still there are many critical production applications running on 8i databases.
This  procedure may serve as an example for similar situations.


June 19, 2007

RAC Proactive Monitoring Using OS Watcher

RAC and single instance as well ...

OS Watcher is a monitoring application, written by Carl Davis from Oracle Center of Expertise.

And I think is wonderful! install in minutes and work straight away without any problems.

Is the kind of application you may hold on your disk-on-key and install on a client site so that after a couple of hours you will be able to check and see if there is an OS related issue, where the bottleneck is located.

OSW gather statistics using OS commands vmstat, iostat, mpstat, netstat and top. It create one file per hour. This make easy to drill down to a problematic time, and compare it to base line information.

OSW provides also a java interface to display the information in graphic format.


Here you can find a quick start guide I did prepare, you can review the full guide on Metalink OS Watcher Guide

This is an example of the graphics you will be able to display using OSW:


osw-mem-graph:

Moving a datafile from File System to ASM

Moving datafiles from file system to ASM can be done in different ways, one of them using the RMAN copy command.

These are the steps:

1. Check where to build a new file system based tablespace:

[oracle@rac1 ~]$ cd /u01/oradata/racdb
[oracle@rac1 ~]$ df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/vx/dsk/u01
                      31457280  17540576  13819976  56% /u01

2. Connect to sqlplus and create a new tablespace

[oracle@rac1 racdb]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jun 19 06:07:50 2007

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> create tablespace trtst datafile '/u01/oradata/racdb/trtst01.dbf' size 150M;

Tablespace created.

SQL> select file_name from dba_data_files where tablespace_name ='TRTST';

FILE_NAME
--------------------------------------------------------------------------------
/u01/oradata/racdb/trtst01.dbf

3. take the tablespace offline, you may take offline a single datafile from a multifile tablespace if required.

SQL> ALTER TABLESPACE TRTST OFFLINE;

Tablespace altered.

4. Check where are your datafiles located on ASM

SQL> SELECT FILE_NAME FROM DBA_DATA_FILES;

FILE_NAME
--------------------------------------------------------------------------------
+DATADG/racdb/datafile/users.259.623629857
+DATADG/racdb/datafile/sysaux.257.623629849
+DATADG/racdb/datafile/undotbs1.258.623629855
+DATADG/racdb/datafile/system.256.623629845
+DATADG/racdb/datafile/undotbs2.261.623630209
/u01/oradata/racdb/trtst01.dbf

6 rows selected.

5. Log out from sqlplus, start an RMAN session and execute the copy command

Note that when giving the destination inside ASM you just need to pass the disk group name when using omf (Oracle Managed Files) that is the best practice in ASM.

SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
[oracle@rac1 racdb]$ rman target / nocatalog

Recovery Manager: Release 10.2.0.3.0 - Production on Tue Jun 19 06:12:14 2007

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

connected to target database: RACDB (DBID=621246832)
using target database control file instead of recovery catalog

RMAN> copy datafile '/u01/oradata/racdb/trtst01.dbf' to '+DATADG';

Starting backup at 19-JUN-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile fno=00006 name=/u01/oradata/racdb/trtst01.dbf
output filename=+DATADG/racdb/datafile/trtst.263.625644857 tag=TAG20070619T061416 recid=1 stamp=625644858
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:04
Finished backup at 19-JUN-07

RMAN> exit


Recovery Manager complete.

6. Start an sqlplus session, rename the old file to the new ASM file

[oracle@rac1 racdb]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jun 19 06:15:11 2007

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> alter database rename file '/u01/oradata/racdb/trtst01.dbf' to '+DATADG/racdb/datafile/trtst.263.625644857';

Database altered.

SQL> alter tablespace trtst online;

Tablespace altered.

7. remove the old file

rm /u01/oradata/racdb/trtst01.dbf

8. Create a test object

SQL> create table testtb tablespace trtst as select * from dba_source;

Table created.

End of the Example


About June 2007

This page contains all entries posted to Alejandro Vargas' Blog in June 2007. They are listed from oldest to newest.

May 2007 is the previous archive.

July 2007 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle