Posts Tagged ‘11g’

Alex Gorbachev at COLLABORATE 08

By Alex Gorbachev April 18th, 2008 at 6:57 pm
Posted in Group Blog PostsOracle
Tags:

I guess I have only one and a half posts about COLLABORATE 08 this year. It’s a bit unfortunate that I couldn’t make the whole conference, but only last day-and-a-half. In addition, I’ve been speaking at the two lasts slots of the conference so it’s been quite busy for me.

As I mentioned already, the scheduling for my presentation got a bit screwed-up due to the last minute call to participate in the speaker panel — “To RAC or Not To RAC: What’s Best for HA”. Thanks to Dan Norris, my session was finally moved to 11:00, which is right after the panel. On the other hand, 11:00 slot is the last IOUG session of the conference. This fact, coupled with last minutes re-scheduling, brought the number of participants down. Even though there were about 30 people and the hall (Korbel 1C) was small enough not to seem empty.

Back to the RAC speaker panel, I enjoyed the discussion and especially the fact that speaker’s opinions on how wide RAC adoption should be were a little different. I took the liberty of starting the discussion with a quite provocative quote — “complexity is the enemy of availability”. Interesting that the other panel speakers seemed to disagree to it to some extent by countering it — use knowledge to fight complexity. Not that I don’t agree with it (on the contrary) but my point was rather, “why make it complex when you can keep it simple?” Some of the reasons for over-complicating systems can be found here.

(more…)

Multi-Column Correlation and Extended Stats in Oracle 11g

By Riyaj Shamsudeen April 9th, 2008 at 1:35 pm
Posted in Group Blog PostsOracleOracle E-Business Suite
Tags:

We all have encountered this situation many times before: the cost-based optimizer assumes no correlation between two columns (until 11g), and this has the effect of erroneously reducing the cardinality of a row source. Incorrect cardinality estimates are one of many root causes for SQL performance issues. Consider the following example.

This code creates a table and populates data with four columns:

create table t_vc as
select mod(n, 100) n1, mod(n, 100) n2 ,
mod(n, 50) n3 , mod(n, 20) n4
from (select level n from dual connect by level <= 10001);

The first two columns, n1 and n2, have a strong correlation: n1 is always equals to n2.

Let’s collect statistics with histograms on all columns.

begin
dbms_stats.gather_Table_stats( user, 'T_VC', estimate_percent => null, method_opt => 'for all columns size 254');
end;
/

Let’s explain the plan for the query, specifying one predicate, exactly 100 rows with a value of 10.

(more…)

Oracle ASM 11g: Does the ASMCMD cp Command Really Work?

By Alex Gorbachev April 8th, 2008 at 1:43 pm
Posted in Oracle
Tags:

Since the introduction of ASM in Oracle 10g Release 1, every ASM administrator has been dreaming of a simple command line tool to copy files between ASM diskgroups and other filesystems. Oracle ASM 10g Release 2 added the handy asmcmd utility, but even though everyone expected a copy command there, it had not been implemented.

The only way to copy files to or from an ASM diskgroup was either to use RMAN, to configure XDB for FTP access, or use the DBMS_FILE_TRANSFER package. No wonder that the cp command is the most popular addition to asmcmd tool in Oracle ASM 11g: the hardest barrier to convincing my customers to use ASM has been the inability to access the files and copy them to the OS filesystem using the command-line copy command. Customers wanted to “feel” the files and be able to easily manipulate them.

While working on a Collaborate 08 presentation on Oracle 11g new features out-of-the-box, I was verifying new commands in Oracle ASM 11g’s asmcmd utility. It turned our that copying files from or to ASM is still a problem.

First, I tried to copy a single text file to an ASM diskgroup:

ASMCMD> cp /home/oracle/.bash_profile +dg2/test.file
source /home/oracle/.bash_profile
target +dg2/test.file
ASMCMD-08012: can not determine file type for file->’/home/oracle/.bash_profile’
ORA-15056: additional error message
ORA-17503: ksfdopn:DGGetFileAttr15 Failed to open file /home/oracle/.bash_profile
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
ORA-06512: at “SYS.X$DBMS_DISKGROUP”, line 207
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)

Hmm . . . Okay. Let’s try to do it in multiples of diskgroup blocks: (more…)

How to Rename a Copied or Cloned ASM Disk Group

By Grégory Guillou February 28th, 2008 at 11:50 pm
Posted in Group Blog PostsOracle
Tags:

ASM is definitely one of the coolest technologies inside the Oracle Database. On the other hand, the ability of the storage arrays to provide a read/write access to a copy or a “snapshot” of its content is something we can easily leverage as an Oracle DBA. For a couple of weeks, I wanted to copy a database stored in an ASM Disk Group with one of those storage technologies and mount it on the same server; unfortunately, this is not supported even with 11.1.0.6. The good news is that I finally overcame all the obstacles to do it in a specific case. This post relates a couple of the tips I used to get to that result.

What You May Want to Know Before You Start

Several people helped me, even if most of them don’t know. Luca Canali did an awesome presentation about ASM at UKOUG. Alexandro Vargas’s Blog is a must-have in the list of your RSS feed if you work with ASM or RAC. Last but not least, Alex Fatkulin rocks when you have a problem with Oracle. I’m very lucky to work 10 metres away from him and other amazing folks at Pythian.

N.B.: What I describe below is among the worst things you can ever do with ASM. You can use it to play around, but never use it with anything other than test data. If you lose something because of me, you’ll be the only one to blame!

I’ve tested the whole process with Oracle 11.1.0.6 on Ubuntu Gutsy Gibbon, based on a previous post I made on this blog. In order to copy the ASM disks, I’ve used the dd command, but it should not make any difference with a storage array command.

(more…)