Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: TNS:listener could not resolve SERVICE_NAME given in connect descriptor

Re: TNS:listener could not resolve SERVICE_NAME given in connect descriptor

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 31 Aug 2001 23:40:00 +0200
Message-ID: <9mp3g9$3hhpv$2@ID-62141.news.dfncis.de>

"Eric" <chaeri01_at_borabora.crchul.ulaval.ca> wrote in message news:3B8FB6D2.3CA3C324_at_borabora.crchul.ulaval.ca...
> When i try to run dbora (script) to start the Oracle database(murin) i
> received this message
>
> SQL> ORA-12514: TNS:listener could not resolve SERVICE_NAME given in
> connect
> descriptor
>
> Help will be appreciated !!!
>
> Thank's in advence !!!
>
> Here is my script :
> #!/bin/sh
>
> # Set ORA_HOME to be equivalent to the $ORACLE_HOME
> # from which you wish to excute dbstart and dbshut;
> #
> # Set ORA_OWNER to the user id of the owner of the
> # Oracle database in ORA_HOME.
>
> ORA_HOME=/u01/app/oracle/product/9.0.1
> ORA_OWNER=oracle
>
> if [! -f $ORA_HOME/bin/dbstart]
> then
> echo "Oracle startup: cannot start"
> exit
> fi
>
> case "$1" in
> 'start')
>
> # Start the Oracle database:
> # The following command assumes that the Oracle login
> # will not prompt the user for any value
>
> su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
> ;;
>
> 'stop')
> # Stop the Oracle database:
> # The following command assumes that the oracle login
> # will not prompt the user for any values
>
> su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
> ;;
>
> esac
>
>
> --
> ****************************************************
> Eric Chamberland
> Ingenieur de systemes
> Centre de recherche du CHUL
> 2705 Blv laurier
> Ste-Foy,Que
> G1V 4G2
> courriel: chamby_at_borabora.crchul.ulaval.ca
> tel: (418) 656-4141 ext 6331
> Fax: (418) 654-2761

In itself the error means the listener can't find the service name in it's listener.ora.
You need to be very careful about mixing the service_name syntax on the tnsnames.ora side and the sid syntax on the listener.ora side, and vice versa.
Usually that just doesn't work.

However it is very strange it surfaces in this context. I would do two things
1 Oracle recommends copying the dbstart to usr/local/bin or whatever is your local bin directory. You don't have to hardcode the path now 2 I have a feeling the su -c .... & is resulting in your problem. Probably ORACLE_SID isn't set when it comes to starting the database.

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Fri Aug 31 2001 - 16:40:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US