Friday, January 20, 2012

ORA-14086: a partitioned index may not be rebuilt as a whole

SQL> ALTER INDEX REBUILD ONLINE NOLOGGING compress 2 storage (initial 8k next 8k);
            *
ERROR at line 1:
ORA-14086: a partitioned index may not be rebuilt as a whole

 
To compress (use key compression on) a partitioned index you first have to create the index with the compress keyword. Drop it and recreate!
 
If you try to alter the index:

SQL> ALTER INDEX  compress;

ORA-02243: ogiltigt argument för ALTER INDEX eller ALTER MATERIALIZED VIEW


After recreation (drop and create) you can compress each partition on the index if you like:


SQL> alter index rebuild
    partition compress 2;

Friday, September 30, 2011

Oracle RAC installation guide

Googling around I found this fantastic Oracle 10G RAC installation bible/cookbook of 263(!) pages. Enjoy!
http://www.zaptron.com/chn/cookbook-v2%5B1%5D.0-10grac%20r2%20-%20asm%20-%20aix5l%20-%20san%20storage.pdf

Thursday, September 29, 2011

CRS-0213: Could not register resource LISTENER

Tried the following:

$ srvctl add listener -n myRadNode1 -o /oracle/11.1.0.6/


CRS-0213: Could not register resource 'ora.myRacNode1.LISTENER_MYRACNODE1.lsnr'.
 
Had a look in /opt/oracle/crs/log/qdb3h1/crsd/crsd.log
 
2011-09-29 18:35:48.266: [  CRSRES][1078892864] Missing required resources
 
What could be wrong?

$ crs_stat -t


Name Type Target State Host
-----------------------------------------------------------
ora.myRacDb.db application ONLINE ONLINE myRacNode1
ora....b1.inst application ONLINE ONLINE myRacNode1
ora....b2.inst application ONLINE ONLINE myRacNode2
NO VIP, NO GSD, NO ONS!

$ oifcfg getif

Showed nothing!


$ oifcfg setif -global eth0/X.X.X.0:public
$ oifcfg setif -global eth2/192.168.212.0:cluster_interconnect

I had to run /opt/oracle/crs/bin/vipca as root and after that:
 
$ crs_stat -t

Name Type Target State Host
------------------------------------------------------------
ora.myRacNode1.gsd application ONLINE ONLINE myRacNode1
ora.myRacNode1.ons application ONLINE ONLINE myRacNode1
ora.myRacNode1.vip application ONLINE ONLINE myRacNode1
ora.myRacNode2.gsd application ONLINE ONLINE myRacNode2
ora.myRacNode2.ons application ONLINE ONLINE myRacNode2
ora.myRacNode2.vip application ONLINE ONLINE myRacNode2
ora.myRacDb.db application ONLINE ONLINE myRacNode1
ora....b1.inst application ONLINE ONLINE myRacNode1
ora....b2.inst application ONLINE ONLINE myRacNode2


 
I was then able to add the listeners to the crs with srvctl add listener
 

ORA-27504: IPC error creating OSD context



I was installing Oracle 11gR1 two node RAC on vmware Linux red hat enterprise 64 bits
When trying to start the newly created instance, myRacDb2, on node 2 I received the following errors:

PRKP-1001 : Error starting instance myRacDb2 on node myRacNode2
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Sep 29 15:12:19 2011 Copyright (c) 1982, 2007, Oracle. All rights reserved.
Enter user-name:
Connected to an idle instance.
SQL> ORA-27504: IPC error creating OSD context
ORA-27300: OS system dependent operation:gethostbyname failed with status: 0
ORA-27301: OS failure message: Error 0
ORA-27302: failure occurred at: skgxpiphost2
ORA-27303: additional information: nodename myRacNode2.myDomain.com
SQL> Disconnected

I then added myRacNode1.myDomain.com and myRacNode2.myDomain.com to the /etc/hosts file with the same ip's as myRacNode1 and myRacNode2

Then I issued the:
srvctl start instance -i myRacDb2 -d myRacDb

 and voila! it worked!

 Some people tend to get this error when uninstalling Oracle 10g from their cluster. Oracle then replaces the file libskgxp11.so in ORACLE_HOME/bin folder for some reason. Please check this link for more info: https://forums.oracle.com/forums/thread.jspa?threadID=650846

Tuesday, February 2, 2010

Oracle: How to reorganize data in a tablespace

There is actually no easy way to reorganize the data in a tablespace in Oracle11g.
You can't just use a command like ALTER TABLESPACE REORGANIZE or REORGANIZE TABLESPACE because there is no.

Monday, February 1, 2010

TNS-12508: TNS:listener could not resolve the COMMAND given


TNS-12508: TNS:listener could not resolve the COMMAND given

this error could indicate that you have typed the wrong command in lsnrctl or it could indicate that the parameter:
 
ADMIN_RESTRICTIONS_YOURLISTENERNAME = ON

is set in listener.ora (located in $ORACLE_HOME/network/admin) and you don't have permission to adminster the listener. With this parameter set it is only the user oracle that is allowed to run commands against the listener.

Saturday, November 28, 2009

Oracle RAC how to start or stop cluser database with srvctl command

These commands are useful when handling the Oracle RAC databases. They can be executed from any of the nodes in the cluster:

$ srvctl start database -d dbName
$ srvctl stop database -d dbName


$ srvctl start instance -d dbName -i dbName1
$ srvctl start instance -d dbName -i dbName2


$ srvctl stop instance -d dbName -i dbName1
$ srvctl stop instance -d dbName -i dbName2