July 4, 2009

ASM Hands-On Training, Lab 5, Using RMAN To Migrate a Database Into ASM

One of the ways to migrate a database to ASM is to use the Rman “Backup as Copy” command to create a database copy into ASM storage and then switch the database to the copy.

This technique can be used, combined with incremental backups, to move even very large databases into ASM.

The first backup may take a long time, one or more incremental backups can be used to update the first backup and close the gap, until a downtime window is obtained to switch the database on filesystem to the backup on ASM.

This Lab can be downloaded here: Using RMAN To Migrate a Database Into ASM

Lab Topics:

Summary
Migrating a Database Into ASM
Backup Database Into ASM
Spfile Backup into ASM
Consistent database shutdown
Prepare Pfile for the ASM Database
Start the database in NOMOUNT mode
Change Parameters on Spfile to point to ASM
Move the controlfiles into ASM
Switch the Database from File System to ASM
Recover The Database
Migrate the Temporary Datafiles to ASM
Move Flashback logs into flash recovery Area
Move RMAN Change Tracking File Into ASM
Remove the File System Old Files
Remove the Old Spfile from Filesystem
Scripts

July 3, 2009

ASM Hands-On Training, Lab 4, Install, Configure and Run ORION

Oracle Input Output Numbers, ORION, provides a simple way to check storage performance before the Oracle Database is created, that gives us a clean storage performance report that can be compared with the awr IO statistics once the database is running.
When performance problems related to poor performance at the storage level are detected in a late implementation stage the number of variables may make the task to detect the bottleneck difficult, and the time to find a solution scarce.

Orion can simulate the type of IO's an OLTP or DSS system does and provide detailed response times in terms of IOPS and MBPS.

The lab can be downloaded here: Lab 4, Install, Configure and Run ORION

Lab Index:

Download
Install
Running a Simple Test
Orion Generated Reports
Running and advanced test

ASM Hands-On Training, Lab 3, Creating The ASM Instance And Managing ASM Disk Groups

On this Lab we create the ASM instance on a single instance environment, and create ASM diskgroups in several different ways using different kind of devices. Note that these exercises provide some degree of confidence on managing devices but are valid only for training.

On a production environment we will use mostly a high end SAN or NAS storage, usually connected by fiber channel, and we will provision LUN's for ASM.

The lab can be accessed here : Lab3-Create-ASM-Instance-and-Managing-Diskgroups.pdf

Lab Index

Create The ASM Instance
Create the Cluster Synchronization Services Daemon
Configure and Start a Listener
Sizing the ASM Shared Pool
Setup a minimal ASM Pfile
Disk Discovery
Discovering Raw Devices
Discovering Block Devices
Discovering ASMLib Devices
Creating Disk Groups Using Loop Devices
KFED
Build the Kfed Utility
Kfed Help
Check Disk Headers Using Kfed
Creating Normal Redundancy Disk Groups Using Block Devices
Comparing External And Normal Redundancy Disk Using Kfed
Using File System Based Files As ASM Disks
Creating a diskgroup on ASM based on files
Check the diskgroups created on this Lab
Scripts

ASM Hands-On Training, Lab 2, Install and Configure ASMLib

ASMLib provide an easy way to present storage to ASM on Linux, it takes care of device labeling and improves the performance of open-close calls to the devices. Is Oracle Best Practice for managing disks on Linux.

Lab2-Install-and-Configure-ASMLib.pdf

The following points are covered on this lab:

Install The ASMLib:

Cheking The Kernel Version
Downloading the Drivers for ASMLib
Installing the ASMLib Drivers

Configure ASMLib :

Create ASM Disks
ASMLib Directory Structures
ASM Directories
ASM files on /opt directory
Map ASMLib Disks to Physical Devices
File /etc/sysconfig/oracleasm
ASM init file

Annex:

Scripts


May 31, 2009

ASM Hands-On Training

Early this year I developed an ASM training that was implemented on Madrid and Tel Aviv.

The idea was to have a set of exercises that will provide lots of hands-on experience to the participants, in a few days.

On this and the following posts I will present the labs of the training.

The training was implemented using the student’s laptops. A Virtual Machine containing a Linux 5 environment setup with Oracle 10g and 11g, ready for implementing the labs, was distributed to the participants.

The requirements were :

· Laptop with a minimum of 30 GB free space on the hard disk or an external disk
· 2 / 4 GB Memory
· Sun Virtualbox 2.2 installed on the laptop

On the first lab included here : Lab1 Configuration of Devices for ASM. we created devices to be used by ASM in several different ways, the idea was to provide many examples and train the fingers on how to build ASM disks on top of them; that also provided some insights about how the discovery process works.

The whole program cover these subjects

ASM Hands-On Training Program

Training Program

DAY 1

· Getting around on the system
· ASM Architecture
· Preparing storage devices for ASM
· Preparing storage for ASM
· Loop devices,
· File system,
· Raw devices,
· Block devices
· ASMLib
· Install ASMLib,
· Create the ASM Instance
· Create the ASM instance,
· Managing diskgroups
· Kfed
· Using kfed to identify ASM Headers
· Using kfed to dump the headers of a physical device
· ORION
· Installing, configuring and running ORION simple test
· Using RMAN for Restoring a Database Into ASM
· Configure Diskgroups for restoring a database into ASM,
· Restore Database from Backup
· Normal Redundancy
· PST table
· 10g ASM Normal Redundancy Resilience test
· Drop database,
· Create Normal Redundancy Disk Group,
· Restore Database,
· Resilience test
· Additional Means for Managing ASM
· Configure XDB
· Using FTP with ASM
· Browsing ASM Directories with HTML
· Migrating Devices to ASMLib
· Migrate raw devices and block devices to ASMLib

DAY 2

· Migration to 11g
· 10g ASM migration to 11g
· Create an 11g Database in ASM
· ASM Backup, Crash, Restore and Recovery Scenarios
· Backup and Restore ASM Metadata
· ASM and Rman Crash, Restore and Recovery Scenarios Hands-On - Part I
· ASM and Rman Crash, Restore and Recovery Scenarios Hands On – Part II
· 11g ASM New Features
· Setting up 11g Compatibility Parameters
· Resilience Tests
· ASM Cloning
· Cloning a Disk group on the same server
· Bringing Up a copy of the databases on a cloned Disk Group
· Benchmarking, Monitoring and Troubleshooting
· Configure and Run Swingbench
· Configure and run OSWatcher
· Resilience Tests While Running a Benchmark Load

DAY 3

· ASM Storage Sizing
· Measuring throughput
· Defining Infrastructure requirements for Optimal Performance with ASM
· Hardware
· ASM on SAN, NAS
· ASM Metadata
· ASM Directories
· COD and ACD
· Block Dump,
· DbVerify,
· Header Dumps,
· dd
· Storage Consolidation
· Plugging ASM to a 2nd Node,
· Open the database on the 2nd Node,
· ASMCMD
· Using ASMCMD commands and options
· ASM on Extended Clusters
· Normal Redundancy
· Preferred Mirror Read
· Fast Mirror Resync
· DWDM
· Buffer Credits
· ASM on Exadata
· Frequent SR Issues on ASM


May 7, 2009

RAC and ASM on Linux Forum Meeting, June 3 at Beit HP in Raanana

On June 3, 2009 we had the 5th conference of the RAC/ASM/Linux Forum, this time at Beit HP, in Raanana, Israel.

RAC, ASM and Linux are building blocks of the HP Oracle Database Machine and we wanted to start this meeting with a review of the technology revolution that Exadata is bringing in. Ehood Baratz from HP introduced the concepts and Annie Flint from Oracle RACPack Team, that is already working on implementation projects with customers around Europe, provided a deep technology analysis.

This was followed by two Customer Case Studies:

Dina Raphael from Rafael presented their implementation case of Oracle Applications on a 3 Node Linux Cluster with 11g CRS and ASM and 10g RDBMS. They are using ASM Diskgroup rename to mount several clones of the production database on the same development server, Dina's implementation has become a reference in Israel and Europe for implementations of Oracle Applications on Linux with 11g RAC and ASM.

The second case was presented by Alon Spiegel, Senior Oracle Technology Consultant and CEO of Brillix. This is a large implementation that required higher availability, achieved using both RAID 1 + ASM Normal redundancy with failure groups located on a campus cluster, and highest performance. A very interesting design, implementation and testing effort worth to hear about.

Beit HP address is 9 Dafna Street, Ra'anana Industrial Zone. Israel
The Conference will start at 14:00

You can download the program here: RAC And ASM On Linux Forum Agenda, June 3 2009

The presentations can be downloaded here:

RAC And ASM Forum 2009, Alejandro Vargas

HP Oracle new products - Ehood Baratz

RAC, ASM and Linux on the architecture of the HP Oracle Database Machine - Annie Flint

Oracle Applications implementation over 11g Oracle Clusterware + 11g ASM + 10g RDBMS on Rafael - Dina Raphael

http://www.oracle.com/il/RACForum/presentations_030609/RAC-And-ASM-Forum-2009-AlonSpiegel.zip


May 3, 2009

11.1.0.7 CRS bundle1 released

CRS Bundle Patch I was released for version 11.1.0.7.

It is available for Linux x86 and x86-64, AIX 64-bit, HP-UX Itanium and HP-UX RISC 64-bit.

Details can be found on metalink Note 810663.1 11.1.0.X CRS Bundle Patch Information

Before applying the patch be sure to follow instructions on Note 458485.1 : "How to find whether the one-off Patches will conflict or not?", to check for potential conflicts between patches already applied and the new patches.

Apply on test, check and then go on production.

April 25, 2009

High Level Tracing For Monitoring And Debug With Event 10046

Whenever there is an error condition that do not provide enough information to immediately diagnose the root cause and find a solution, tracing the session that is generating the problem is the best first option to get more information.

In many cases I did find on the raw trace the additional information required to get to the root cause of a problem.

This method is good also to generate high level SQL traces to be used for SQL tuning.

This is a short reference for running oradebug with event 10046 that enable SQL statement tracing including binds and waits.

To trace same session:

oradebug setmypid ;

To trace other session first you need to get it's spid:

select a.username,b.spid
from v$session a, v$process b
where a.username like '%&user%'
and a.paddr=b.addr ;

Then from your session, connected as sys, attach to the other session:

oradebug setospid &ospid ;

Then check the tracefile name:

oradebug tracefile_name ;

At this moment you can start tracing, there are many different events that can be used for different purposes, event 10046 is very useful for debugging, level 12 provide information about what are the waits the session is waiting for and also the values of the bind variables :

oradebug event 10046 trace name context forever, level 12 ;

Check the trace as it run:

! tail

To interrupt the trace you can either exit the session or execute this command:

oradebug event 10046 trace name context off ;

More information about oradebug and its many options can be find on this page "Utiliwiki"

April 6, 2009

Oracle Open World Call for Papers

Answering feedback from attendees to the last Open World, the possibility to contribute experiences for the next conference has been opened to the entire Oracle community: Customers, Partners and Employees

If you wish to send a paper for consideration log into this site: OOW 2009 Call for Papers.

The deadline for submission was extended until April 26.

February 4, 2009

How To Manually Open The Standby Database When The Primary Is Lost

This post explains how to manually convert the Physical Standby into the Primary database, when the Primary is not available anymore.

The procedure is very simple, still is convenient to have it available so that in the stress situation of a production crash we can implement it without problems.

Personally I prefer to work harder at the implementation stage and build an infrastructure strong enough to be configured using DG Broker, Observer and Fast Start Failover.

Step by Step details of manually converting the standby into the new primary can be found on this file How to open the standby when the primary is lost