Friday, October 25, 2013

ksh: /usr/bin/rm: 0403-027 The parameter list is too long.

Error: ksh: /usr/bin/rm: 0403-027 The parameter list is too long.

Details: This error occurs when attempting to remove old files using rm *.aud

Cause:There are too many files to remove

Solution:Use the following command instead to delete first all files that are older than 5 days:
find /oracle/admin/testP/adump/ -name '*.aud' -mtime +5 -exec rm {} \;

Thursday, October 24, 2013

ORA-00119: invalid specification for system parameter LOCAL_LISTENER

Error: ORA-00119: invalid specification for system parameter LOCAL_LISTENER ORA-00132: syntax error or unresolved network name 'LISTENER_'

Details: This error occurs when attempting to start the database

Cause:The lack of a LOCAL_LISTENER, that must be defined in the TNSNAMES.ORA

Solution:In TNSNAMES.ORA (not in LISTENER.ORA) define the following entry for the local listener:
LISTENER_ =  (ADDRESS = (PROTOCOL = TCP)(HOST = servername)(PORT = 1521)) 

Wednesday, October 23, 2013

sp2-1503 unable to initialize oracle call interface

Error: sp2-1503 unable to initialize oracle call interface

Details: This error occurs when attempting to start sqlplus

Cause:PATH variable is not set correctly

Solution:Set and export PATH variable
export PATH=$ORACLE_HOME/bin:$PATH

Tuesday, October 22, 2013

TNS-03505: Failed to resolve name

Error: TNS-03505: Failed to resolve name

Details: This error occurs when doing tnsping DBName

Cause:ORACLE_HOME and/or PATH variables are not set correctly

Solution:Set and export both correct ORACLE_HOME and PATH
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1
export PATH=$PATH:$ORACLE_HOME/bin

Thursday, October 10, 2013

ORA-12514: TNS:listener does not currently know of service

Error: ORA-12514: TNS:listener does not currently know of service

Possible Cause:The database might not have been registered with a listener

Diagnosing the error:The following things should eb done to diagnoze the error
  1. Check what listener is running:
    > lsnrctl status
    
  2. Check LOCAL_LISTENER parameter
    SQL> show parameter local_listener
    
    Usually it is blank by default and thus at startup the database is dynamically registered with the listener that is currently running. If LOCAL_LISTENER does have a value, then it means that database is trying to register with the configuration of the listener listed in LOCAL_LISTENER

Possible Solution:Clearing the value of LOCAL_LISTENER:


SQL> alter system set local_listener='';
SQL>lsnrctl reload
or

SQL> alter system set local_listener='' scope=both sid='*';
SQL>lsnrctl reload

Wednesday, August 7, 2013

RMAN-20001: target database not found in recovery catalog

Error: RMAN-20001: target database not found in recovery catalog

Details: This error occurs when attempting to backup the newly cloned database using RMAN

Cause:The database was not registered with recovery catalog.

Solution:Register the database with recovery catalog by performing the following steps:
  1. Set the environment to your target database:
    > . oraenv
    > DBName
    
  2. Connect to RMAN:
    > rman target /
    
  3. Connect to catalog as rman user:
    RMAN> connect catalog rmanuser/pwd@RMANDB
    
  4. Register target database:
    RMAN> register database;
    

The output will be:
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
Note: The database you are registering must not be a standby database, since standby database gets registered automatically whenever primary database is registered. Also the database must not be already registered in the recovery catalog. List of databases in recovery catalog can be retrieved byt loging in to RMAN repository and runnning:
select name, dbid from rc_database
where name=@DB_SID;

Tuesday, July 9, 2013

Automatic Diagnostic Repository (ADR)

Starting with Oracle 11g R1, traditional *_DUMP_DEST parameters are ignored and the trace location is decided based on DIAGNOSTIC_DEST parameter. If this parameter is not set explicitly, it defaults to ORACLE_BASE environment variable if this is set, if this is not set, then it defaults to ORACLE_HOME/log.

DIAGNOSTIC_DEST is the ADR root directory also known as ADR base.

Each instance's diagnostic data is stored in its own ADR home directory. Under ADR base there are multiple ADR homes. Each ADR home is the root directory for all traces within particular instance.

ADR base/diag
        /rdbms
                /dbname
                            /alerts
                            /cdump
                            /incident
                            /trace


show parameter diag - displays the ADR base