Newsletters Archive - 2006

If you would like to know more about the Newsletter, please email me.

  Update! Oracle RAC 10g Release 2 / FireWire 800 / RHEL4 U2 — (20-September-2006)

I have received many requests to upgrade my most recent article on installing 
and configuring Oracle RAC 10g R2 with FireWire to include some of the latest 
FireWire 800 hardware. This has been completed. Also updated is the ability to 
use Secure Shell (SSH) for remote access and user equivalence.

Please note that this article will mark the last in a series to make use of 
FireWire technology as the shared storage medium in order to build an 
inexpensive Oracle RAC 10g system. Future releases of this article will adopt 
the use of iSCSI; more specifically, building a network storage server using 
Openfiler. Powered by rPath Linux, Openfiler is a free browser-based network 
storage management utility that delivers file-based Network Attached Storage 
(NAS) and block-based Storage Area Networking (SAN) in a single framework. 
Openfiler supports CIFS, NFS, HTTP/DAV, FTP, however, I will only be making 
use of its iSCSI capabilities to implement an inexpensive SAN for the shared 
storage component required by Oracle RAC 10g.

The newly updated Oracle RAC 10g / FireWire article can be found at:

Jeffrey M. Hunter
Sr. Database Administrator

  Data Protection Modes - (Oracle9i Release 2) — (05-September-2006)

With the introduction of 9i Release 2, Oracle Data Guard provides the ability 
to run the standby database in one of the following three mutually exclusive 
data protection modes: Maximum Protection, Maximum Availability, Maximum 
Performance. These three new modes replaced the Guaranteed, Instance, Rapid, 
and Delayed modes of data protection available in Oracle9i Release 1 (9.0.1). 
Each of the three modes provides a high degree of data protection; however they 
differ with regards to data availability and performance of the primary 
database. The DBA needs to carefully take into account the need to protect the 
data against any loss vs. availability and performance expectations of the 
primary database.

The following article provides complete coverage of the three data protections 
modes available in Oracle9i Release 2 and can be used when trying to decide on 
the one that best meets the needs of your business. Also explained in this 
article is how Log Transport Services works to support these new protection 
modes as well as the steps necessary to configure the standby database to the 
desired protection mode.

Jeffrey M. Hunter
Sr. Database Administrator

  Moving ASM Database Files from one Diskgroup to Another — (21-August-2006)

There are times when it becomes necessary to move ASM database files from one 
diskgroup to another. As with most tasks that involve file management in ASM, 
RMAN is the easiest and preferred method as ASM files cannot be accessed 
through normal operating system interfaces. The typical method is to take the 
datafile(s) offline and use RMAN to make a copy of them. After the copy, update 
the data dictionary to reflect the location of the new datafile and then use 
RMAN to switch the database to use the new copy as the active datafile. Finally 
recover and bring the datafile(s) back online.

The following article details the steps required to move ASM files from one 
diskgroup to another using RMAN:

Jeffrey M. Hunter
Sr. Database Administrator

  Migrating Databases from non-ASM to ASM and Vice-Versa — (16-August-2006)

Configuring and using Automatic Storage Management (ASM) is a fairly easy and 
straightforward process. Once the ASM instance is configured on a node and an 
ASM Disk Group is created, any database that resides on that node can start 
taking advantage of it.

But, what if on the node you just configured ASM on you already have an 
existing Oracle database which stores its database files using the local file 
system and now want to relocate the entire database to be stored in ASM? Well, 
as with most file management tasks that involve ASM, it's RMAN to the rescue!

I published the following article that explains the steps necessary to migrate 
an existing Oracle database stored on the local file system to ASM. This will 
include all datafiles, tempfiles, online redo logfiles, controlfiles, and all 
flash recovery area files. The article also contains a follow-up section that 
explains how the process works in reverse - migrating a database stored in ASM 
to a local file system.

Migrating Databases from non-ASM to ASM and Vice-Versa

To learn more about manually configuring ASM, see my article:

Manually Creating an ASM Instance

Jeffrey M. Hunter
Sr. Database Administrator

  Dropping a Target Database using RMAN — (14-August-2006)

Starting with Oracle10g Release 1, Oracle provides a method to completely drop a 
database with one simple RMAN statement - "DROP DATABASE". The only pre-requisite 
is that the database be mounted in exclusive mode with restricted sessions 

For a detailed discussion on how to fully drop an Oracle10g database using RMAN, 
please see my article entitled:

Drop a Target Database using RMAN

Jeffrey M. Hunter
Sr. Database Administrator

  Oracle Application Express 2.2 Now Available — (11-August-2006)

Oracle has just recently released its newest version of Oracle Application Express - Release 2.2.

Details for installing and configuring this newest release as well as getting started with managing APEX workspaces can be found at:

Installing Oracle Application Express 2.2

Managing Workspaces

Release 2.2 New Features

Jeffrey M. Hunter
Sr. Database Administrator

  Duplicate a Database in Flash Recovery Area using ASM to non-ASM Host using RMAN — (08-August-2006)

Your current backup and recovery strategy makes use of RMAN and creates its 
backupsets (backup pieces) in the Flash Recovery Area using ASM. Everything is 
working fine until one day you need to have access to these backup pieces from 
a regular non-ASM file system. The question then becomes, how do I restore 
backupsets (backup pieces) that are currently in ASM to my non-ASM file system? 
This is a common question when the DBA wants to use the RMAN backupsets to 
duplicate or copy a database to another host on a non-ASM file system. It also 
provides a means to test the integrity of your backups on another host!

The quick answer is to use the BACKUP BACKUPSET (and BACKUP ARCHIVELOG if 
necessary) RMAN statement to copy backupsets (backup pieces) out of ASM to the 
local non-ASM file system. Using this method, you are essentially utilizing 
RMAN to create another copy of the backupset(s) to the local file system that 
you want to use for creating a duplicate database on a host that does not have 
ASM in use. This second copy of the backupset(s) will be on the local file 
system where you can then FTP them to another host and use to duplicate the 

I put together a detailed step-by-step approach to duplicate a database in ASM 
to a non-ASM system. The article can be found at:

Jeffrey M. Hunter
Sr. Database Administrator

  Getting Started with Oracle Application Express 2.0 — (03-August-2006)

Oracle Application Express (APEX), formerly known as HTML DB, is a rapid web 
application development tool for the Oracle database. It provides programmers 
and even non-programmers with a fast and secure application development 
framework for developing and deploying professional applications using only a 
web browser. Oracle Application Express consists of several components:

  - A web browser
  - Oracle HTTP Server (or Oracle Application Server)
  - mod_plsql (included with the Oracle HTTP Server)
  - Oracle Application Express engine
  - Oracle Database - (Oracle9i Release 2 or higher)

For anyone wanting to take advantage of Oracle Application Express, I have 
several articles available to get you started. Please check back as I plan on 
providing much more with regards to Oracle Application Express administration 
and development as well as installation guides for newer releases.

Oracle Application Express - Links

Installing Oracle Application Express 2.0

Jeffrey M. Hunter
Sr. Database Administrator

  Archiving to an Archival Standby Database — (26-July-2006)

Introduced in Oracle9i R1, DBAs can now configure a database (for example, a 
primary database) to send its archived redo log files to an Oracle instance at 
a remote location which is only responsible for accepting and storing the 
archived redo log files. This remote location can serve as a repository 
(or backup) of nothing more than archived redo logs.

This remote location is known as an Archival Standby Database and is nothing 
more than an Oracle instance with a controlfile and no physical database 
associated with it. The controlfile can be a standby controlfile of the source 
database or a controlfile of another database.

The following article describes the steps necessary to configure a database to 
archive its redo log files to a remote archival standby database:

Jeffrey M. Hunter
Sr. Database Administrator

  Creating / Recreating Database Control Repository in Oracle10g — (25-July-2006)

The command-line tool emca (Enterprise Manager Configuration Assistant) ships
with both Oracle10g R1 and Oracle10g R2 and is used to manage the Oracle
Enterprise Manager environment. The emca tool that ships with each release of
Oracle, however, uses a different set of options and parameters. With both
utilities, simply typing "emca" at the command-line will provide the usage and
a description of all options.

I put together two short articles that provide examples on how to use emca in
both Oracle10g R1 and Oracle10g R2 to create, drop, and recreate an Oracle
Database Control environment:

How to Recreate the Database Control Repository - (Oracle10g R1)

How to Recreate the Database Control Repository - (Oracle10g R2)

Jeffrey M. Hunter
Sr. Database Administrator

  Log Gap Detection and Resolution (Oracle9i R2) — (22-July-2006)

Oracle Data Guard 9i R2 provides several services that can assist the DBA in 
automatically detecting and resolving archive redo log gaps within a physical 
standby database configuration. This can include the automatic heartbeat that is 
performed by the primary database or by log apply services on the physical 
standby database using FAL_CLIENT and FAL_SERVER.

The article "Log Gap Detection and Resolution" provides insight into how archive 
redo log gap detection and resolution is handled by the Oracle database server 
and can be found at:

Jeffrey M. Hunter
Sr. Database Administrator

  Date Arithmetic in Oracle - Expressing Time with Fractions — (14-June-2006)

Anyone who has had to work with scheduling jobs in Oracle knows the frustration 
of having to deal with calculating a job's next date and internal using Oracles 
date arithmetic. This month I have made several updates to an already popular 
article that demonstrates the basics of representing time using Oracle's date 
math along with many useful examples. Although many of the examples are based on 
scheduling tasks to maintain and manage Statspack, they can be expanded to 
support any type of scheduled job.

The newly updated article can be found at:

Jeffrey M. Hunter
Sr. Database Administrator

  Determining uptime of Server in Windows — (15-May-2006)

This newsletter includes the following topics:

  *) Determining uptime of Server in Windows

  *) Java Programming / ZIP Files Section
       - Fixed bug with "Recursive Directories" in

Determining uptime of Server in Windows

If you are a DBA working in the UNIX operating environment, you are 
undoubtedly familiar with the vast collection of useful utilities used 
to troubleshoot and analyze your system. One of those popular utilities 
is the "uptime" command" it is used to determine how long the server has 
been up and running. Now, if you are forced to work in a Windows 
environment, you will quickly realize that this command is not included 
with Windows by default. A quick and reliable way to determine how long 
a server has been up and running in a Windows environment is to use 
the "net statistics server" command. This is all detailed in the article:

Uptime for Windows - (2003, 2000, XP and NT)

Java Programming Section

Thanks to the watchful eyes of a recent user, I was able to correct
a bug found in the example Java program: The intention 
of this example program was to demonstrate how to unzip the contents of
a ZIP archive using Java. The problem with the code I provided was that it
would not extract the contents of directories within the ZIp archive. This
problem has now been corrected and the new code can be found here:

Jeffrey M. Hunter
Sr. Database Administrator

  Resizing Temporary Tablespaces in Oracle — (18-January-2006)

In many database configurations, the DBA will choose to allow their temporary 
tablespace (actually the tempfile(s) for the temporary tablespace) to autoextend. 
A runaway query or sort can easily chew up valuable space on the disk as the 
tempfiles(s) extends to accommodate the request for space. If the increase in 
size of the temporary tablespace (the tempfiles) gets exceedingly large because 
of a particular anomaly, the DBA will often want to resize the temporary 
tablespace to a more reasonable size in order to reclaim that extra space.

The following article "Resizing Temporary Tablespace" provides the DBA with two 
methods for reclaiming the space used by excessive tempfiles and to get your 
temporary tablespace back to its original (or another reasonable) size.

The article is located at:

Jeffrey M. Hunter
Sr. Database Administrator

  Update! Oracle RAC 10g Release 2 / VMware 5 / RHEL4 U2 — (09-January-2006)

Several requests have been sent to upgrade my most recent article on installing 
and configuring Oracle RAC 10g R2 with VMware to include the latest 5.5 and 5.5.1 
releases or VMware Workstation. I recently completed testing and the new article 
has been modified to now work with VMware Workstation 5.0, 5.5 and 5.5.1.

The modified article can be found at:

Jeffrey M. Hunter
Sr. Database Administrator

  Oracle RAC 10g Release 2 / VMware 5.0 / RHEL4 U2 — (02-January-2006)

Over the past few years, I have been writing about solutions that allow Oracle 
DBA's to install and configure Oracle RAC using inexpensive hardware. One of 
the more popular solutions I have used in the past was to deploy FireWire 
technology as the shared storage component of the RAC cluster. This allows the 
Oracle DBA to experience the benefits of RAC for testing, learning, and 
development purposes without incurring the high cost of the requirement 

This month I present a similar solution that makes use of a single computer and 
VMware 5.0. Two virtual machines will be created on a single host computer. The 
shared storage will be created by configuring VMware to virtualize several hard 
disks. By making a few modifications to each of the virtual machine's 
configuration files, VMware will allow one or more disks to be shared as 
required by Oracle RAC.

The article entitled "Create an Oracle RAC 10g using VMware Workstation 5.0 - 
(CentOS Enterprise Linux 4.2)" can be found at:

Over the next several weeks, I will be verifying this installation with the 
latest VMware 5.5.

Jeffrey M. Hunter
Sr. Database Administrator