Précédent   Forum des professionnels en informatique > Bases de données > Oracle > Administration
Administration Forum d'entraide sur l'administration du serveur Oracle
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 30/05/2011, 07h13   #1
Invité de passage
 
Inscription : mai 2006
Messages : 66
Détails du profil
Informations forums :
Inscription : mai 2006
Messages : 66
Points : 3
Points : 3
Par défaut Script de démarrage - TNS-01106

Bonjour,

J'essai de démarrer automatiquement la base Oracle 11gR2 installée sur mon serveur Ubuntu 10.04.
Lorsque je saisi les commandes à la main, tout va bien.

Lorsque j'essai de démarrer la base via le script, j'obtiens l'erreur suivante

Code :
1
2
3
4
5
6
7
8
9
10
11
 
root@node:~# /etc/init.d/oracledb start
Starting Oracle: 
LSNRCTL FOR Linux: Version 11.2.0.1.0 - Production ON 30-MAY-2011 16:04:56
 
Copyright (c) 1991, 2009, Oracle.  ALL rights reserved.
 
TNS-01106: Message 1106 NOT found; No message file FOR product=network, facility=TNS	[LISTENER]
Failed TO auto-start Oracle Net Listener USING $ORACLE_BASE/product/11.2.0/dbhome_1/bin/tnslsnr
Processing DATABASE instance "nodedata": log file /u01/app/oracle/product/11.2.0/dbhome_1/startup.log
OK
Et la base ne démarre pas.

Mon script est le suivante :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab
 
 
export TNS_ADMIN=$ORA_HOME/network/admin
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin
 
IF [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
    echo "Oracle startup: cannot start"
    exit 1
fi
 
case "$1" IN
    start)
        # Oracle listener and instance startup
        echo -n "Starting Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
#       $ORACLE_HOME/bin/lsnrctl start
#       $ORACLE_HOME/bin/dbstart $ORACLE_HOME
        touch /var/LOCK/oracle
        echo "OK"
        ;;
    stop)
        # Oracle listener and instance shutdown
        echo -n "Shutdown Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
        rm -f /var/LOCK/oracle
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: `basename $0` start|stop|restart|reload"
        exit 1
esac
 
exit 0
Avez-vous une idée pour m'aider à résoudre le problème ?

Bonne Journée,
villegente est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/05/2011, 08h51   #2
Membre régulier
 
Inscription : novembre 2004
Messages : 657
Détails du profil
Informations forums :
Inscription : novembre 2004
Messages : 657
Points : 81
Points : 81
Bonjour,

votre listener a-t-il un nom ? alors ajoutez-le dans l'instruction :
Code :
1
2
 
$ORACLE_HOME/bin/lsnrctl start
Si c'est le nom par defaut c'est à dire LISTENER , essayez :
Code :
1
2
 
$ORACLE_HOME/bin/lsnrctl start LISTENER
Peut être ça marche avec ça.
big1 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/05/2011, 00h45   #3
Invité de passage
 
Inscription : mai 2006
Messages : 66
Détails du profil
Informations forums :
Inscription : mai 2006
Messages : 66
Points : 3
Points : 3
J'ai effectué les modifications que tu conseil, corrigé ma variable TNS_ADMIN=$ORA_HO... par TNS_ADMIN=$ORACLE_HOME... et changé l'ordre des variables.

Le message d'erreur est maintenant :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
root@node:~# /etc/init.d/oracledb start
Starting Oracle: 
LSNRCTL FOR Linux: Version 11.2.0.1.0 - Production ON 31-MAY-2011 09:40:14
 
Copyright (c) 1991, 2009, Oracle.  ALL rights reserved.
 
Message 1070 NOT found; No message file FOR product=network, facility=TNSTNS-12546: Message 12546 NOT found; No message file FOR product=network, facility=TNS
 TNS-12560: Message 12560 NOT found; No message file FOR product=network, facility=TNS
  TNS-00516: Message 516 NOT found; No message file FOR product=network, facility=TNS
   Linux Error: 13: Permission denied
Failed TO auto-start Oracle Net Listener USING $ORACLE_BASE/product/11.2.0/dbhome_1/bin/tnslsnr
Processing DATABASE instance "nodedata": log file /u01/app/oracle/product/11.2.0/dbhome_1/startup.log
OK
villegente est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/05/2011, 02h06   #4
Invité de passage
 
Inscription : mai 2006
Messages : 66
Détails du profil
Informations forums :
Inscription : mai 2006
Messages : 66
Points : 3
Points : 3
Je viens de résoudre mon problème en ajoutant une série d'instruction "EXPORT" dans mon fichier "/etc/environment".

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
TNS_ADMIN=$ORACLE_HOME/network/admin
ORACLE_SID=nodedata
LD_LIBRARY_PATH=$ORACLE_HOME/lib
EDITOR=/usr/bin/vi
PATH=/usr/LOCAL/sbin:/usr/LOCAL/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$ORACLE_HOME/bin
 
export ORACLE_BASE
export ORACLE_HOME
export TNS_ADMIN
export ORACEL_SID
export LD_LIBRARY_PATH
export PATH
villegente est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 17h11.


 
 
 
 
Partenaires

Hébergement Web