Wednesday, September 29, 2010

How to Add a RAW device as ASM Disk in ASM Diskgroup?

First, we check that the raw device has been added according to the specification given in the ASM parameter file. For that we check what is the value of ASM instance parameter ASM_DISKSTRING by doing following:

$ export ORACLE_SID=+ASM
$ sqlplus /nolog
sqlplus> conn / as sysdba
sqlplus> show parameter DISK

The above command will show the value of parameter ASM_DISKSTRING. e.g. /dev/rdsk/emcpower*

/dev/rdsk/emcpower* means that the raw devices which are eligible for ASM discovery should be in format /dev/rdsk/emcpower*. For example if a new raw device emcpower42g is added, then it would be eligible.

Now we will add this raw device as ASM disk in an existing ASM diskgroup.

We can check which ASM diskgroups are available from v$asm_diskgroup dynamic view.

alter diskgroup data add disk '/dev/rdsk/emcpower42g';

Now we can check the name and path of newly added ASM disk from v$ASM_DISK view.

select name, path from v$asm_disk;

Sunday, September 26, 2010

Cloning an 11g ASM database to an 11g ASM database on different Host

I am going to clone (i.e. duplicate) a database residing on host A to a different host B. Both databases have thier datafiles, online redo logs, control files, archive logs on ASM.



HOST A:

The source database is on Host A. Its name is 'SOURCE'. It has also a diskgroup called '+DATA'. All the data files, control files, online redo logs and archive logs are in this group.

I have taken its full database backup with archive logs, and have also created a pfile from its spfile.

I have transfered this backup and pfile to Host B, where I will create the duplicate database.

Host B:

The backup from Host A has been copied to the same directory structure as of Host B, so I dont have to configure channel in the RMAN.

On this host, I already have created the ASM instance and its running. It has also a diskgroup called '+DATA'. All the data files, control files, online redo logs and archive logs will be in this group.

I will create the duplicate database with name 'CLONE'.

Create adump, bdump, udump, and cdump directories for the CLONE database, and change the paths to these directories in the pfile you brought from the source database.

Also CONTROL_FILES parameter would be:

CONTROL_FILES='+DATA'

Other parameters to change are:

DB_NAME=CLONE

DB_UNIQUE_NAME=CLONE

DB_FILE_NAME_CONVERT='SOURCE','CLONE'

LOG_FILE_NAME_CONVERT='SOURCE','CLONE'

Place the pfile in

Now, export the instance, and create the password file.

export ORACLE_SID=CLONE

and then create the password file, orapwd file=$ORACLE_HOME/dbs/orapwCLONE password=

and in sqlplus do:

sqlplus '/ as sysdba'

SQL> startup nomount

exit

and in RMAN duplicate the database:

$ rman target sys@source nocatalog auxiliary /

rman> duplicate target database to 'CLONE';

It will run to completion.


Wednesday, September 22, 2010

Improving Database Shutdown

On a busy system, sometimes, the shutdown immediate takes a huge time.


In order to speed up the shutdown, do alter system checkpoint before the shutdown and it would improve the shutdown time somewhat.

Though not guaranteed, like everything else :).

Tuesday, September 21, 2010

A Futuristic Stats Collection Tool By Arup Nanda

Besides of New Features and RMAN, Arup Nanda can also dig gold when it comes to the performance tuning. Well, if you want to collect stat in frustration-free manner for a session, which even hasn't yet started, use the tool developed by Arup, which even surpasses the functionality given by dbms_monitor, when it comes to gathering stats of a session.

Have a look here.

Monday, September 20, 2010

Difference Between ExaLogic and Exadata

Oracle Exalogic Elastic Cloud is the world’s first and only integrated middleware machine—a combined hardware and software offering designed to revolutionize data center consolidation. Enterprises can bring together tens, hundreds, or even thousands of disparate, mission-critical, performance-sensitive workloads on Oracle Exalogic with maximum reliability, availability, and security. Oracle Exalogic’s unique high-bandwidth, low-latency interconnect fabric means that complex, distributed applications can run with a responsiveness simply not achievable with typical servers used in data centers today.

Oracle Exadata Database Machine provides an optimal solution for all database workloads, ranging from scan-intensive data warehouse applications to highly concurrent OLTP applications. With its combination of smart Oracle Exadata Storage Server Software, complete and intelligent Oracle Database software, and the latest industry standard hardware components from Sun, the Database Machine delivers extreme performance in a highly-available, highly-secure environment. With Oracle’s unique clustering and workload management capabilities, the Database Machine is also well-suited for consolidating multiple databases onto a single grid. Delivered as a complete pre-optimized and pre-configured package of software, servers, and storage, the Sun Oracle Database Machine is simple and fast to implement and ready to tackle your large-scale business applications.

Courtesy TPS