Monday, December 1, 2008

ASM cannot be used until Oracle CSS service is started on AIX

Environment : oracle10gR2 on AIX5.3

Problem : When i run the script localconfig add from command prompt on $ORACLE_HOME/bin path as root user to configure and start CSS
# id
uid=0(root) gid=0(root)
#./$ORACLE_HOME/bin/localconfig add

Solution: Install the below Apar’s
xlC.aix50.rte:7.0.0.4
xlC.rte:7.0.0.1
rsct.basic.rte
rsct.compat.clients.rte
rsct.basic.rte
rsct.compat.clients.rte
and run again same command or
#./$ORACLE_HOME/bin/localconfig reset

Note: TO configure ASM Cluser Synchronization Service(CSS) must be configured and started.

Wednesday, November 26, 2008

How to Drop Database in Oracle 10g?

connect to database as sysdba user
$sqlplus /nolog

SQL>conn sys/@connectionstring as sysdba
Ex: SQL>conn sys/sys123@oradb as sysdba

SQL> shutdown immediate;
oracle database closed
oracle database dismounted
oracle instance shutdown

Start the database to restrict mode
SQL> startup restrict mount;
or
SQL>startup mount exclusive restrict;

Confirm the database name before dropping.
SQL> select name from v$database;
NAME
---------
ORADB

SQL> drop database;
Database dropped

Just check the alertlog file what are the files deleted.

This will drop only database physical files not trace file parameter files.

Tuesday, November 25, 2008

ORA-12638 credential retrieval failed

windows oracle10gR2 install error
Solution : In sqlnet.ora in $ORACLE_HOME/network/admin path.
Original Entry - SQLNET.AUTHENTICATION_SERVICES= (NTS)
Modified Entry - SQLNET.AUTHENTICATION_SERVICES= (NONE)

Unable to do any operation on DB

Problem: Oracle non relevent patch applied. Unable to do any operations like create,insert export etc.
Solution : Run utlip.sql

ORA-03135: connection lost contact

When tried to connect to standby got the error
ORA-03135: connection lost contact
Solution: The solution was to set SQLNET.EXPIRE_TIME =5 in sqlnet.ora in database server

Error while installing oracle10R2 on RHEL4 ES update 6.

1.Error in invoking target 'install' of makefile '/oracle/product/10g/ctx/lib/ins_ctx.mk'. See '/oracle/product/oraInventory/logs/installActions2006-07-28_12-32-28PM.log' for Details.

2. Error in invoking target 'agent nmo nmb' of makefile '/oracle/product/10g/sysman/lib/ins_sysman.mk'. See '/oracle/product/oraInventory/logs/installActions2006-07-28_12-32-28PM.log' for Details.

3. Error in invoking target 'all_no_orcl' of makefile '/oracle/product/10g/rdbms/lib/ins_rdbms.mk'. See '/oracle/product/oraInventory/logs/installActions2006-07-28_12-32-28PM.log' for Details.

Solution: So try execute
# rpm -qa grep libgcc
# rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" grep libgcc
Output should be below version and above it
libgcc-3.4.6.9 (i386)
libgcc-3.4.6.9 (x86_64)
compat-libgcc-296-2.96.132.7.2 (i386)
# rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" grep glibc-devel
Output should be below version and above it
glibc-devel-2.3.4.2.39 (x86_64)
glibc-devel-2.3.4.2.39 (i386)
For Error in invoking target 'agent nmo nmb' of makefile '/oracle/product/10g/sysman/lib/ins_sysman.mk'
# rpm -Uvh glibc-devel-2.3.4-2.13.i386.rpm

For error in invoking target 'all_no_orcl' of makefile '/oracle/product/10g/rdbms/lib/ins_rdbms.mk'.
# rpm -Uvh compat-libstdc++-33-3.2.3-47.3.x86_64.rpm

dbca error ORA-12547: TNS:lost contact

SQL> conn sys as sysdba
Enter password:
oraclelion: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact
Solved by installing rpm libaio-0.3.103-3.x86_64.rpm
Try to apply using force option as
#rpm –Uvh - - force
Check the version of rpm installed by using the below view
# rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH}\n' grep libaio
libaio-0.3.104-2(x86_64libaio-devel-0.3.104-2(x86_64

Segmentation fault when connect to sqlplus

Problem : Segmentation fault when connect to sqlplus
Solution
It seems there is a linking problem for sqlplus which causes dbca to fail while creating repository database.Follow the below action plan.Ensure libgcc 3.4.6 for i386 and x86_64 architectures are installed. Then,
cd /usr/bin (as root)2. mv gcc gcc.script3. mv g++ g++.script4. ln -s gcc32 gcc5. ln -s g++32 g++6. login as oracle software owner (make sure environment is correct)7. cd $ORACLE_HOME/bin (The db10g ORACLE_HOME)8. relink all9. cd /opt/oracle/product/db10g/bin./sqlplus
Now the problem is solved.

Gzip of the file is failing to do zip.

Problem: Gzip of the file is failing to do zip.
Solution: Type the command which zip
$which gzip
Output will be /usr/local/bin/gzip
Set the zip path in PATH= as below
PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/etc; export PATH
Now gzip is working fine.

ORA-19809: limit exceeded for recovery files

Rman backup fail.

RMAN> backup database filesperset 3;

Starting backup at 07-FEB-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00003 name=C:\DATABASE\SATHISH\SYSAUX01.DBF
input datafile fno=00005 name=C:\DATABASE\SATHISH\UNDOTBS02.DBF
input datafile fno=00006 name=C:\DATABASE\SATHISH\DEF10GTBS01.DBF
channel ORA_DISK_1: starting piece 1 at 07-FEB-08
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/07/2008 19:05:13
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 2147483648 limit
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=C:\DATABASE\SATHISH\SYSTEM01.DBF
input datafile fno=00004 name=C:\DATABASE\SATHISH\USERS01.DBF
input datafile fno=00002 name=C:\DATABASE\SATHISH\TEST1.DBF
channel ORA_DISK_1: starting piece 1 at 07-FEB-08
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/07/2008 19:05:21
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 2147483648 limit

Solution:
Increased db_recovery_dest size solves the problem.
SQL> alter system set db_recovery_file_dest_size=10g;
System altered.

ORA-01031: insufficient privileges

solution 1.
SQL> conn sys/sys123@orat32 as sysdba
ERROR:
ORA-01031: insufficient privileges
Warning: You are no longer connected to ORACLE.
Recreated the service using ORDIM

solution 2.
I changed the permission of passwordfile in dbs path and recreated the password file.
In windows I am getting this error I made remote_passwordfile=exclusive to NONE

solution 3.
Changed the owner of the passwordfile in dbs path from oraguest to oracle.
#cd $ORACLE_HOME/dbs
# chown oracle:oinstall orapwORAT33

solution 4.
Solution:In TNSNAMES.ORA (SERVICE_NAME=SID) given wrong.

Now it is working fine.

ORA-01031: insufficient privileges

SQL> conn sys/sys123@oradb as sysdba
ERROR:
ORA-01031: insufficient privileges
Warning: You are no longer connected to ORACLE.
Recreated the service using ORDIM
Now it is working fine.

Change home directory of OS user

Go to the path and create a directory(where i need) with new name and move the contents from old directory to new directory if any and do as below.
Vi /etc/passwd
Rename the old home to new home directory
Ex I need to change from /export/vol01 to /export/vol02
Earlier
oraguest:x:176:117::/export/vol01/home/oraguest:/bin/ksh
#later chage to
oraguest:x:176:117::/export/vol02/home/oraguest:/bin/ksh
and save it
:wq