Archive for the ‘Oracle in general’ Category

Networker: Add a user to the Administrator list from the command line

March 14th, 2013 No comments

In case you locked yourself out of the Networker you can add a user from the command line with the following command:


nsraddadmin -u "user=administrator, host=machine1"
Categories: Oracle in general Tags:

Exadata: How to rename grid disks

December 11th, 2012 No comments


Just a short how to rename grid disks (and keep the size). In the example below the grid disks name contained a typo ‘FALSH02’ and had to be renamed to ‘FLASH02’:

dcli -c exadata01cel01 -l root "cellcli -e drop griddisk ALL prefix=FALSH02 force"
dcli -c exadata01cel01 -l root "cellcli -e creategriddisk ALL HARDDISK prefix=FLASH02"

Sample output:

[root@exadata01db01 ~]# dcli -c exadata01cel01 -l root "cellcli
-e drop griddisk ALL prefix=FALSH02 force"

exadata01cel01: GridDisk FALSH02_CD_00_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_01_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_02_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_03_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_04_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_05_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_06_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_07_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_08_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_09_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_10_exadata01cel01 successfully dropped
exadata01cel01: GridDisk FALSH02_CD_11_exadata01cel01 successfully dropped

[root@exadata01db01 ~]# dcli -c exadata01cel01 -l root "cellcli
-e create griddisk ALL HARDDISK prefix=FLASH02"

exadata01cel01: GridDisk FLASH02_CD_00_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_01_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_02_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_03_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_04_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_05_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_06_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_07_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_08_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_09_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_10_exadata01cel01 successfully created
exadata01cel01: GridDisk FLASH02_CD_11_exadata01cel01 successfully created"


Categories: Oracle in general Tags:

ORA-39123: Data Pump transportable tablespace job aborted / ORA-01240: too many data files to add in one command

September 27th, 2012 No comments
Today i ran into a good example for really really bad error messages: Imagine a tablespace with 720 datafiles (approx 22 TB in total size) which should be transported via transportable tablespace. For this you created a plain, new 11.2 database and you are trying to attach the transportable tablespace:
[oracle@ora1 ~]$ impdp system/manager parfile=import.par
Import: Release - Production on Wed Sep 26 19:55:19 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01":  system/******** parfile=import.par
ORA-39123: Data Pump transportable tablespace job aborted ORA-01240: too many data files to add in one command
Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at 19:55:22
Categories: Oracle in general Tags:

Query for Tablespace usage with Autoextend

August 23rd, 2012 5 comments

Sine i need to check the maximum size of tablespace with autoextend enabled i write the following query:

set linesize 100
set pagesize 100

                round(SUM(a.bytes)/(1024*1024*1024)) CURRENT_GB,
                round(SUM(decode(b.maxextend, null, A.BYTES/(1024*1024*1024), 
                b.maxextend*8192/(1024*1024*1024)))) MAX_GB,
                (SUM(a.bytes)/(1024*1024*1024) - round(c.Free/1024/1024/1024)) USED_GB,
                round((SUM(decode(b.maxextend, null, A.BYTES/(1024*1024*1024), 
                b.maxextend*8192/(1024*1024*1024))) - (SUM(a.bytes)/(1024*1024*1024) - 
                round(c.Free/1024/1024/1024))),2) FREE_GB,
                round(100*(SUM(a.bytes)/(1024*1024*1024) - 
                round(c.Free/1024/1024/1024))/(SUM(decode(b.maxextend, null, A.BYTES/(1024*1024*1024), 
                b.maxextend*8192/(1024*1024*1024))))) USED_PCT
                dba_data_files a,
                sys.filext$ b,
                               d.tablespace_name ,sum(nvl(c.bytes,0)) Free
                               dba_tablespaces d,
                               DBA_FREE_SPACE c
                               d.tablespace_name = c.tablespace_name(+)
                               group by d.tablespace_name) c
                a.file_id = b.file#(+)
                and a.tablespace_name = c.tablespace_name
GROUP BY a.tablespace_name, c.Free/1024
ORDER BY tablespace_name;

The result looks like this:

------------------------------ ---------- ---------- ---------- ---------- ----------
SYSAUX                                 16         32          1         31          3
SYSTEM                                 16         32          0         32          0
TEST                                   10         11          0      10.85          0
UNDOTBS1                               16      32768          0      32768          0
UNDOTBS2                               16      32768          0      32768          0
UNDOTBS3                               16      32768          0      32768          0
UNDOTBS4                               16      32768          0      32768          0
UNDOTBS5                               16      32768          0      32768          0
UNDOTBS6                               16      32768          0      32768          0
UNDOTBS7                               16      32768          0      32768          0
UNDOTBS8                               16      32768          0      32768          0
USERS                                   1         32          0         32          0


Categories: Oracle in general Tags:

Nexenta: Configuring iSCSI Multipath Target with multiple network cards

June 28th, 2012 9 comments

This is a short post about how to configure iSCSI multipathing using Nexenta. I let it is neccessary to document it since the documentation is rather spare about it.

In my lab setup i had a machine with two physically separated interfaces:

  • e1000g0:   and
  • e1000g1:

As you can see both interfaces are on different subnets. Note that it is a very good idea (i´d call it: “required”) to use a separate subnet for each interface.  It will save you a lot of trouble and problems!

If you do not comply with this simple rule you will end up having problems with so called Arp Flux (also documented here, here, here and so on) which requires further modifications.

Note: If you modify and existing installation you only need to execute Step #2 and Step #3. Everything else should already be there.

Read more…

Categories: Oracle in general Tags:

Using ASMLib with Oracle Unbreakable Kernel (UEK)

June 25th, 2012 No comments

Starting with the Oracle Unbreakable Enterprise Linux Kernel (UEK) the ASMlib drivers are now included in the kernel. This means that updating the kernel does not require installing the appropriate kernel modules as well.

In addition to the kernel modules you need the following packages:

  • oracleasm-support
  • oracleasmlib

For Oracle Enterprise Linux “oracleasm-support” can be found on the installation media while “oracleasmlib” is not available on the installation media. “oracleasmlib” can be downloaded over the ULN network (more information here).

If you dont have a ULN account or using Red Hat you can get the freely available packages (for OEL and Red Hat) here.

Categories: Oracle in general Tags:

“Exiting Time2Retain handler because session_reinstatement=1” with LIO ( iSCSI implementation)

June 21st, 2012 1 comment

I just migrated my Ubuntu iSCSI storage server to Ubuntu 12.04 which ships with a new iSCSI implementation: LIO ( Aside from the fact that this project lacks a HUGE amount of documentation I want to share this problem with you:

kernel: Exiting Time2Retain handler because session_reinstatement=1

This happens if you access LUNs from more multiple nodes (as required for RAC setups)  while all nodes share the same initiatorname.

The fix is to use different and unique initiatornames for every node.

Categories: Oracle in general Tags:

RMAN-10008/RMAN-04006: error from auxiliary database: ORA-12537: TNS:connection closed

March 30th, 2012 No comments

Just a short note:

When doing a “duplicate from active database” with a larger amount of channels you need to set the PROCESSES setting in your parameter file to a reasonable high value (i.e. 500). Otherwise the duplicate will fail with:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/30/2012 13:56:22
RMAN-05501: aborting duplication of target database
RMAN-12001: could not open channel ORA_AUX_DISK_60
RMAN-10008: could not create channel context
RMAN-10003: unable to connect to target database
RMAN-04006: error from auxiliary database: ORA-12537: TNS:connection closed

Categories: Oracle in general Tags:

Oracle announces support for 11g R2 databases on OEL 6

March 23rd, 2012 No comments

Oracle just released a statement which states the immediate availability and support using Oracle database 11g R2 with Oracle Enterprise Linux 6.


You can read the official announce here.

Categories: Oracle in general Tags:

PRVF-5300: Failed to retrieve active version for CRS on this node when installing DB on Grid Infrastructure

October 13th, 2011 9 comments

I just played with patchset on Linux x86_64 (in my testcase Oracle Enterprise Linux 5.6) and tried to install a database on it. It fails with:

PRVF-5300: Failed to retrieve active version for CRS on this node

The error stack in the installation log is:

ID: oracle.install.commons.util.exception.DefaultErrorAdvisor:745
oracle.cluster.verification.VerificationException: An internal error occurred within cluster
verification framework

ERRORMSG(linux): PRVF-5300 : Failed to retrieve active version for CRS on this node
        at oracle.cluster.verification.ClusterVerification.getPreReqTasksForSIDBInst(
        at oracle.install.ivw.db.action.PrereqAction.getProductVerificationTasks(
        at oracle.install.commons.base.interview.common.action.AbstractPrereqAction.execute
        at oracle.install.commons.flow.AbstractFlowExecutor.startAction(
        at oracle.install.commons.flow.AbstractFlowExecutor.enterVertex(
        at oracle.install.commons.flow.AbstractFlowExecutor.transition(
        at oracle.install.commons.flow.AbstractFlowExecutor.nextState(
        at oracle.install.commons.flow.AbstractFlowExecutor.nextViewState(
        at oracle.install.commons.flow.DefaultFlowNavigator.goForward(
        at oracle.install.commons.flow.jewt.FlowWizard$
        at oracle.install.commons.flow.jewt.FlowWizard$TransitionManager$
        at java.util.concurrent.Executors$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$

The problem

I started the installer with debug enabled just add “-debug -logLevel finest >inst1.out 2>inst2.out”). The log files gave some insight:

[Version.getVersion:497]  version String is
[Version.getVersion:498]  new Version().toString is
[VerificationUtil.getSIHAReleaseVersionObj:4986]  Configuration Exception:
PRKC-1137 : Unable to find Version object with string value
[VerificationUtil.getCRSUser:1362]  Active Version = null

The related query command is

"GI_HOME/bin/crsctl query has releaseversion"

Obviously installer has problems with the string “”.

Solution #1

The most simple approach is to start the installer like this:

./runInstaller -ignorePrereq

With that the installer skips al pre-installation tests.

Solution #2

One simple approach was to created a wrapper around crsctl to report a version of when querying releaseversion:

cd $GRID_HOME /bin
mv crsctl crsctl.orig

Now create a script “crsctl” with the following contents:

case $1 in
 echo "Oracle High Availability Services release version on the local node is []"
        $EXEC $*


You can start the database installation. During the verification steps the installer might report the Oracle Restart Registry as invalid. Just ignore it. The installation should now run fine.

Note that this bug is NOT related to OEL 5.6. It is the installer which cannot deal with the version string of the newer grid infrastructure. So you will face this error on OEL 6, RedHat and SuSE as well.

Dont forget to revert the changes after the installation!

After installation finished i was able to create a database using ASM without any problems. Registering the database into Oracle Restart also worked fine.

Categories: Oracle in general Tags: