Wednesday, July 23, 2008

Oracle auto start Script for Solaris x86 / Solaris 10

We have 10+ oracle 10g instances on Solaris different versions, I have worked alot with linux(EL, AS, Fedora4-9), but now days I am working with Solaris......
task is to configure oracle autostartup.

i made a file at /etc/rc3.d/S98oradbstart

-------------------------------------------------------------------------------------
#!/bin/sh
#
#echo "Starting Oracle Database" > /dev/consoleORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATHexport ORACLE_HOME LD_LIBRARY_PATH
su oracle -c "${ORACLE_HOME}/bin/dbstart" < /dev/nullexit 0
-------------------------------------------------------------------------------------
now either you will run level 3 or 5 your oracle plus listener will be started automatically.
Here was some error that i faced.
1.
/u01/app/oracle/product/10.2.0/db_1/bin/dbstart: VER10LIST=10: is not an identifier
i looked into file /u01/app/oracle/product/10.2.0/db_1/bin/dbstart
and changed
this export VER10LIST=`$ORACLE_HOME_LISTNER/bin/lsnrctl version grep "LSNRCTL for " cut -d' ' -f5 cut -d'.' -f1`
to

VER10LIST=`$ORACLE_HOME_LISTNER/bin/lsnrctl version grep "LSNRCTL for " cut -d' ' -f5 cut -d'.' -f1`; export VER10LIST

then faced
2. “`COUNT=$’ unexpected” at or near line 259
i changed in dbstart scropt
from
COUNT=$((COUNT+1))toCOUNT=`expr $COUNT + 1`

Now life is good.

Wednesday, March 12, 2008

Failed to allocate port(s) in the specified range(s) for the following process(es):

Failed to allocate port(s) in the specified range(s) for the following process(es): JMS [5540-5559],RMI [5520-5539],Database Control [5500-5519],EM Agent [3938] [1830-1849]
Refer to the log file at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2008-03-12_03-42-45-PM.log for more details.
Could not complete the configuration. Refer to the log file at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/orcl/emca_2008-03-12_03-42-45-PM.log for more details.
I just added ip-address machinename in /etc/hosts file

Wednesday, January 30, 2008

TNS-00584: Valid node checking configuration error

Hi guys,

wonderful error duing my jubb.
"TNS-00584: Valid node checking configuration error"
I was asked from my repected developer to add his IP to my Database server,
I just edited my sqlnet.ora file with his ip againt " tcp.invited_nodes " and restared the listener, and i got "Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1521)))TNS-12560: TNS:protocol adapter error TNS-00584: Valid node checking configuration error"

hmmm this error was due to my wrong entry in sqlnet.ora file, there was a dot(.) was missing in IP address. I just corrected it and started the linstener ...


Now all is well,


cheers.

Tuesday, January 29, 2008

ORA-00313: open failed for members of log group

Errors in file /u01/app/oracle/admin/ORCL/bdump/orcl_arc1_7586.trc:
ORA-00313: open failed for members of log group 4 of thread 1.

I encountered this error when group 4 was current and i just added a log member in this group.
After that I make too many log switch with
alter database switch logfile;
and not got any errors.

due to frequent log switches I got "Thread 1 cannot allocate new log, sequence 161
Private strand flush not complete"
This issue is infact not a bug and is expected behavior.
This is the same as "Checkpoint not completed" this is due to that all the redo entries from buffers have not been just written to redo files.
Strand is the new technology in 10g that deals with redo latches. this machnism allows multiple redo buffer latches to be written in redo, same parallel redo writing in 9i.

ref.Doc ID: Note:372557.1
A good discussion .....
http://www.lazydba.com/oracle/0__26265.html

Tuesday, January 8, 2008

Installation of Oracle express on Fedora 8

Hi,
Last day i did installation on Fedora 8, so what I did is here below...

check entry in /etc/hosts file for localhost.localdomain it should be like this
IP address localhost.localdomain localhost
there are two packages that must be installed before Oracle Ex installation......those are
# rpm -ivh libaio-*warning: libaio-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2Preparing... ########################################### [100%] 1:libaio ########################################### [ 33%] 2:libaio-devel ########################################### [ 67%] 3:libaio warning: user brewbuilder does not exist - using rootwarning: group brewbuilder does not exist - using rootwarning: user brewbuilder does not exist - using rootwarning: group brewbuilder does not exist - using root########################################### [100%]
# Kernel sysctl configuration file for Red Hat Linux## For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and# sysctl.conf(5) for more details.
# Controls IP packet forwardingnet.ipv4.ip_forward = 0
# Controls source route verificationnet.ipv4.conf.default.rp_filter = 1# Do not accept source routingnet.ipv4.conf.default.accept_source_route = 0# Controls the System Request debugging functionality of the kernelkernel.sysrq = 0# Controls whether core dumps will append the PID to the core filename.# Useful for debugging multi-threaded applications.kernel.core_uses_pid = 1# Controls the use of TCP syncookiesnet.ipv4.tcp_syncookies = 1kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000
# vi /etc/sysctl.conf # # # # # # rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpmPreparing... ########################################### [100%] 1:oracle-xe-univ ########################################### [100%]Executing Post-install steps...You must run '/etc/init.d/oracle-xe configure' as the root user toconfigure the database.
Now configure Oracle for
port number for Oracle Application Express and for listener.auto-startup on recycling
# /etc/init.d/oracle-xe configure
Oracle Database 10g Express Edition Configuration-------------------------------------------------This will configure on-boot properties of Oracle Database 10g ExpressEdition. The following questions will determine whether the database shouldbe starting upon system boot, the ports it will use, and the passwords thatwill be used for database accounts. Press to accept the defaults.Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]:8080
Specify a port that will be used for the database listener [1521]:1521
Specify a password to be used for database accounts. Note that the samepassword will be used for SYS and SYSTEM. Oracle recommends the use ofdifferent passwords for each database account. This can be done afterinitial configuration:Confirm the password:
Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:y
Starting Oracle Net Listener...DoneConfiguring Database...DoneStarting Oracle Database 10g Express Edition Instance...DoneInstallation Completed Successfully.To access the Database Home Page go to "http://127.0.0.1:8080/apex"

So installation completed i just added oracle envirnment variables in .bash_profile.

Rest is good!

Monday, January 7, 2008

ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], []

Hi,
After a long time I have an error of ora-00600.
One of my Database is Oracle Express10.2.0.1.0

Cause:
In log we were receiving these errors.
Oracle Server was not resolving HOSTNAME.

Mon Jan 7 14:58:48 2008Errors in file /usr/lib/oracle/xe/app/oracle/admin/XE/udump/xe_ora_2462.trc:ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], []USER: terminating instance due to error 600

Solution:
added an entry for localhost in /etc/hosts.
open /etc/hosts file
vi /etc/hosts
:0:1 localhost.localdomain localhost
alter this to ....
127.0.0.1 localhost.localdomain localhost
or
ip_of_your_DBbox localhost.localdomain localhost


after that now check

-bash-3.1$ sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 7 15:05:56 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> select count(*) from tab;
COUNT(*)
----------
3535


So, Be Happy!