Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12162: TNS:net service name is incorrectly specified

518205Jun 20 2006 — edited Jun 21 2006
hello all of you

Here are instructions in a script I used to automatically start Oracle database on system(red Hat Entreprise Linux ES3) startup:
############################################################################
#! /bin/sh -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for you installation

ORACLE_HOME=/u01/app/oracle

#
# change the value of ORACLE to the login name of the
# oracle owner at your site
#

ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#

LOG=$ORACLE_HOME/startup.log
touch $LOG
chmod a+r $LOG

LSTLOG=$ORACLE_HOME/network/log/listener.log
touch $LSTLOG
chmod a+r $LSTLOG
#

case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net Listener"
$ORACLE_HOME/bin/lsnrctl start >> $LOG 2>&1 &
fi
echo "Starting Oracle databases"
$ORACLE_HOME/bin/dbstart >> $LOG 2>&1 &
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "stopping Oracle Net Listener"
$ORACLE_HOME/bin/lsnrctl stop >> $LOG 2>&1 &
fi
echo "stopping Oracle databases"
$ORACLE_HOME/bin/dbshut >> $LOG 2>&1 &
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit
#########################################################################

This is a part of what I have after the starting up :

Listener Parameter File /u01/app/oracle/network/admin/listener.ora
Listener Log File /u01/app/oracle/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hysacamnat.hysacam.cm)(PORT=1521)))
Services Summary...
Service "hysacam" has 1 instance(s).
Instance "hysacam", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

SQL*Plus: Release 10.1.0.2.0 - Production on Tue Jun 20 08:46:59 2006

Copyright (c) 1982, 2004, Oracle. All rights reserved.

SQL> ERROR:
ORA-12162: TNS:net service name is incorrectly specified


SQL> ORA-12162: TNS:net service name is incorrectly specified
SQL>
Database "" warm started.

SQL*Plus: Release 10.1.0.2.0 - Production on Tue Jun 20 08:47:00 2006

Copyright (c) 1982, 2004, Oracle. All rights reserved.

SQL> ERROR:
ORA-01031: insufficient privileges


SQL> ORA-01031: insufficient privileges
SQL>
Database "hysacam" warm started.

May any one help me ?
these below are tnsnames.ora and listener.ora files
########################################################################
########################################################################
# tnsnames.ora Network Configuration File: /u01/app/oracle/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

HYSACAM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hysacamnat)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = hysacam)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SERVICE_NAME = hysacam)
(PRESENTATION = RO)
)
)
########################################################################
########################################################################
# listener.ora Network Configuration File: /u01/app/oracle/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = hysacam)
(ORACLE_HOME = /u01/app/oracle)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hysacamnat)(PORT = 1521))
)
)
)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2006
Added on Jun 20 2006
6 comments
2,430 views