2016-07-01 6 views
1

Ich muss Oracle-Datenbank eines Remote-Servers konfigurieren, um beim Systemstart zu starten. Ich folgte das ist fast das gleiche wie andere. Ich darf den Server nicht neu starten, kann nur dem Besitzer vorschlagen, etwas auf dem Server zu tun.Oracle startet nicht beim Systemstart

Die Serverkonfigurationen ähneln denen im Lernprogramm, aber die Oracle-Datenbank startet nicht beim Systemstart. Dies ist die Datei/etc/dbora und /etc/init.d/oratab Dateiinhalt:

dbora:

#!/bin/sh 
# chkconfig: 345 99 10 
# description: Oracle auto start-stop script. 
# 
# Set ORA_HOME to be equivalent to the $ORACLE_HOME 
# from which you wish to execute 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/11.2.0/db_1 
ORA_OWNER=oracle 

if [ ! -f $ORA_HOME/bin/dbstart ] 
then 
    echo "Oracle startup: cannot start" 
    exit 
fi 

case "$1" in 
    'start') 
     su $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" & 
     su $ORA_OWNER -c $ORA_HOME/bin/dbstart & 
     touch /var/lock/subsys/dbora 
     ;; 
    'stop') 
     su $ORA_OWNER -c $ORA_HOME/bin/dbshut 
     su $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" 
     rm -f /var/lock/subsys/dbora 
     ;; 
esac 

oratab:

# This file is used by ORACLE utilities. It is created by root.sh 
    # and updated by the Database Configuration Assistant when creating 
    # a database. 

     # A colon, ':', is used as the field terminator. A new line terminates 
     # the entry. Lines beginning with a pound sign, '#', are comments. 
     # 
     # Entries are of the form: 
     # $ORACLE_SID:$ORACLE_HOME:<N|Y>: 
     # 


# The first and second fields are the system identifier and home 
    # directory of the database respectively. The third filed indicates 
    # to the dbstart utility that the database should , "Y", or should not, 
    # "N", be brought up at system boot time. 
    # 
    # Multiple entries with the same $ORACLE_SID are not allowed. 
    # 
    # 
    orcl:/u01/app/oracle/product/11.2.0/db_1:Y 
    orcl:/u01/app/oracle/product/11.2.0/db_1:N 

Was mit diesen Dateien ist falsch?

+0

je nach Server-Betriebssystem Sie someting wie chkconfig --add Orakel tun sollte (für CentOS/Redhat/Fedora). Bitte geben Sie mir den Server OS –

+0

@NoelCarcases Der Server ist Oracle Linux –

+0

Das gleiche ... chkconfig --add Oracle oder chkconfig --level 2345 Oracle auf. Lass es mich wissen, wenn es funktioniert –

Antwort

1

lassen nur die erste Zeile

**# Multiple entries with the same $ORACLE_SID are not allowed.** 
# 
# 
orcl:/u01/app/oracle/product/11.2.0/db_1:Y