ORA-32012

You may get error ORA-32012 if you are on 11g, but have the compatible parameter set to pre-11g in the database you are cloning from, and the spfile for the source database is stored in ASM when you do an RMAN duplicate from active database. To get around this error, I have found two workarounds: Set the value for compatible to at least 11.1 Skip transferring of the spfile during the clone process. Option 1 is a big change for the database (it affects the CBO among other things), but say you need a clone and are going to change this parameter anyway it is the simplest one since you don’t have to create the parameterfile manually. Option 2 means you create the spfile before the cloning starts and remove the clause with spfile from the duplicate command. ...

July 6, 2011 · 3 min · Øyvind Isene

Hidden updates - another reason to trace

An insert or update statement that is taking a long time to complete is often working on the indexes belonging to the table rather than the table itself. If you look at the plan and finds nothing wrong, it is easy to forget that the indexes have to be updated as well. The solution as always when something takes time is to enable trace. When updating the indexes the trace file will usually show waits of type db file sequential read, and usually one block at the time. ...

June 3, 2011 · 2 min · Øyvind Isene

VirtualBox on Fedora 15

This is what I did to install Oracle VM VirtualBox on a new Fedora 15 installation. The documentation at the bottom of download page VirtualBox for Linux gives you the repos-file for yum on Fedora. Find the repos-file and save it to /etc/yum.repos.d/virtualbox.repo, it should look like this: \[virtualbox\] name=Fedora $releasever - $basearch - VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc Then you can search for VirtualBox: \[root@favela ~\]# yum search VirtualBox Loaded plugins: langpacks, presto, refresh-packagekit \=========================== N/S Matched: VirtualBox ============================ VirtualBox-4.0.x86_64 : Oracle VM VirtualBox Name and summary matches only, use "search all" for everything. To install: ...

May 30, 2011 · 1 min · Øyvind Isene

Today

I have made a few changes to my blog… think I want to blog again. So far this year in a few words; new job at Keystep - smart move, if you try two years in the wrong company it is time to move on; met quite a few smart oracle folks at the yearly conference of Oracle User Group Norway - got elected as a board member; met more smart guys at Miracle Open World in Denmark the week after. And been thinking about moving back to Brazil quite a lot lately.

May 29, 2011 · 1 min · Øyvind Isene

Removing orphan DataPump jobs and filtering included tables with a query

Say you define a DP job from the API (DBMS_DATAPUMP) you may end up with jobs with status NOT RUNNING until you get it right. Verify if you have such a job with select job_name,state from user_datapump_jobs; Then you may try to remove it with: declare l_h number; begin l_h:=dbms_datapump.attach('YOUR_JOB'); dbms_datapump.stop_job(l_h,immediate=>1); commit; end; / If the query above still reports the job with the same status it can be removed by dropping the master table, according to Note 336014.1: ...

November 20, 2010 · 2 min · Øyvind Isene

Slow performance with TDE and CHAR data type on 10.2.0.5

In version 10.2.0.5 of the database there is a bug when using Transparent Data Encryption (TDE) on a column with the CHAR datatype. In the following test a table is created where the primary key is defined as CHAR(11) and then encrypted with NO SALT. A simple lookup on this PK works as expected by using the respective index on 10.2.0.4. But on 10.2.0.5 a trace on event 10053 shows that an INTERNAL_FUNCTION is wrapped around the PK-column and therefore impedes use of the index. ...

November 16, 2010 · 3 min · Øyvind Isene

A few notes on Oracle VM

This is an old post I kept as draft 8 months before I published it… I’ve been playing around with Oracle Virtual Manager (OVM) version 2.2 lately. This is collection of a few notes, not all directly related to OVM. The project started with building the server from parts I hoped would play along (they do). The CPU is an Intel i7-930, 12GB of RAM and two Western Digital 1.5TB disks (WD15EARS-00Z5B1). Current version of OVM (2.2) uses update 3 of OEL 5. The kernel lags behind a bit and support for certain wirless card is not included. The AR5008 Wireless chip from Atheros (a Dlink card) was not supported; in order to avoid more cables in the house I created a bridge between the server and another PC nearby. ...

October 20, 2010 · 4 min · Øyvind Isene

Permission denied when adding ASM disk

This is a simple one, a reminder till next time I forget this, since stuff encountered after a Google-search led me astray… Just in case you try to add disks to an existing ASM disk group using syntax like this: alter diskgroup data add disk '/dev/xvdd1' add disk '/dev/xvde1'; You may get error messages like these: ORA-15032: not all alterations performed ORA-15031: disk specification '/dev/xvde1' matches no disks ORA-15025: could not open disk '/dev/xvde1' ORA-15056: additional error message Linux-x86_64 Error: 13: Permission denied Additional information: 42 Additional information: -1614995373 Additional information: 1730318408 ORA-15031: disk specification '/dev/xvdd1' matches no disks ORA-15025: could not open disk '/dev/xvdd1' ORA-15056: additional error message Linux-x86_64 Error: 13: Permission denied Additional information: 42 Additional information: 87328232 Additional information: 8192 Solution: Use the ASM disk names as given when creating them with oracleasm: ...

October 10, 2010 · 3 min · Øyvind Isene

Error when using 11g export client on a 10g database

The only reason to read this post is if you have googled for the error “ORA-00904: “POLTYP”: invalid identifier”. This error occurs if you try the old export command from an 11g client against a database on version 10g or lower. The export command runs a query against a table called EXU9RLS in the SYS schema. On 11g this table was expanded with the column POLTYP and the export command (exp) expects to find this column. This should not be much of a problem since Data Pump export can be used.

June 29, 2010 · 1 min · Øyvind Isene

Someone trying to outperform Oracle's cache

The following code is from a migration project I’m working on. It is part of a package named PERFORMANCE and is run every 15 minutes: Declare test number; Cursor c_worklist Is select * from v_worklist where id = v_id; Begin FOR rec IN c_worklist LOOP test := 0; -- does nothing END LOOP; end; A nice little wtf-snippet. The purpose? According to “the vendor” the cursor that loops through every row in a view is supposed to keep the data in Oracle’s cache, and if not in place some web service will time out. I believe we have better tools to keep stuff in cache.

May 8, 2010 · 1 min · Øyvind Isene