BC remote Oracle DBA - Call (800) 766-1884
Free Oracle Tips

Oracle Consulting Oracle Training Development
Oracle Training
SQL Tuning Consulting
Oracle Tuning Consulting
Data Warehouse Consulting
Oracle Project Management
Oracle Security Assessment
Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Internals Magazine
Oracle Links
Oracle Monitoring
Remote Support Benefits
Remote Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

 

 

Oracle Migrating a Database to ASM

Oracle Tips by Burleson Consulting

This is an excerpt from "Oracle 10g New Features for Administrators" by Ahmed Baraka.

Setting Instance Parameters

INSTANCE_TYPE - defaults to RDBMS

LOG_ARCHIVE_FORMAT -  If you set the LOG_ARCHIVE_FORMAT to an incomplete ASM filename (such as +dgroupA), Oracle will ignore it. If you set it to an ASM directory, Oracle will use the directory and create non-OMF files in that directory.

You must use incomplete ASM filenames as the destination for the following initialization parameters:

DB_CREATE_FILE_DEST_n
DB_CREATE_FILE_DEST
DB_RECOVERY_FILE_DEST
CONTROL_FILES
LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST
STANDBY_ARCHIVE_DEST

Creating an ASM-Based Database

You can create an ASM-based database simply by setting the following parameters:

DB_CREATE_FILE_DEST = '+dgroup1'
DB_RECOVERY_FILE_DEST = '+dgroup2'
DB_RECOVERY_FILE_DEST_SIZE = 100G

Now, commands that require file specifications can be issued easier than before:

CREATE DATABASE test
CREATE TABLESPACE test_tbsp
ALTER DATABASE ADD logfile

Migrating Your Database to ASM

1. Obtain current control file and redo log files locations using V$CONTROLFILE and         V$LOGFILE

2. Shut down cleanly the database

3. Set the parameters to make the database OMFbased.

DB_CREATE_FILE_DEST = '+dgroup1'
DB_RECOVERY_FILE_DEST = '+dgroup2'


4. Delete the control file parameter from your SPFILE.

5. Startup the database in NOMOUNT

6. Using RMAN issue the following script:

RESTORE CONTROLFILE FROM '/u1/c1.ctl';
ALTER DATABASE MOUNT;
BACKUP AS COPY DATABASE FORMAT '+dgroup1';
SWITCH DATABASE TO COPY;
SQL "ALTER DATABASE RENAME '/u1/log1' TO
'+dgroup1' ";
# Repeat RENAME command for all online redo
log members ...
ALTER DATABASE OPEN RESETLOGS;
SQL "alter tablespace temp add tempfile"
SQL "ALTER DATABASE TEMPFILE '/u1/temp1'
DROP";

Monitoring Long-Running Operations

The ALTER DISKGROUP DROP, RESIZE, and REBALANCE commands return before the operation is complete. To monitor progress of these long-running operations, you can query the V$ASM_OPERATION fixed view.

GROUP_NUMBER Disk group
OPERATION Type of operation: REBAL
STATE State of operation: QUEUED or RUNNING
POWER Power requested for this operation
ACTUAL Power allocated to this operation
SOFAR Number of allocation units moved so far
EST_WORK Estimated number of remaining allocation units
EST_RATE Estimated number of allocation units moved per minute
EST_MINUTES Estimated amount of time (in minutes) for operation termination

Dynamic Performance Views

V$ASM_DISKGROUP - In an ASM instance, this view provides information about a disk group. In a database instance, this view contains one row for every ASM disk group mounted by the ASM instance.

V$ASM_CLIENT - In an ASM instance, this view identifies all the client databases using various disk groups. In a Database instance, the view contains one row for the ASM instance if the database has any open ASM files.

V$ASM_DISK - In an ASM instance, this view contains one row for every disk discovered by the ASM instance. In a database instance, the view will only contain rows for disks in use by that database instance.

V$ASM_FILE - This view contains one row for every ASM file in every disk group mounted by the ASM instance.

V$ASM_TEMPLATE - This view contains one row for every template present in every disk group mounted by the ASM instance.

 

If you like Oracle tuning, see the book "Oracle Tuning: The Definitive Reference", with 950 pages of tuning tips and scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

 


 

Free Oracle dictionary reference poster

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

North Carolina Oracle Users Group

 

 Arabian horse breeder

Seeing eye horses

 

 

BC Remote Oracle Support
P.O. Box 511 • Kittrell, NC, 27544

Copyright © 2007 by Burleson Enterprises, Inc. All rights reserved.

Hit Counter