IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Import/Export Oracle Discussion :

Probleme avec dbstart sous Oracle 10.2.0.1.0 Unix


Sujet :

Import/Export Oracle

  1. #1
    Membre du Club Avatar de smooncef
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    118
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 118
    Points : 66
    Points
    66
    Par défaut Probleme avec dbstart sous Oracle 10.2.0.1.0 Unix
    Bonjour,

    Voici ce que m'affiche le startup.log, je ne comprends pas j'ai bien renseigné la variable ORACLE_HOME ; ORACLE_SID ; ORACLE_HOME_LISTNER dans mon .profile, mais rien n'y fait, il m'affiche cette même erreur lorsque je lance un dbstart !!!

    Please meeeeee !!!!!!!!

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
     
    dbstart: Starting up database "APIS"
    Wed Jan  9 09:09:44 MET 2008
     
    Error 6 initializing SQL*Plus
    Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    Error 6 initializing SQL*Plus
    Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    logger: illegal option -- s
    Usage:  logger string
            logger [-i] [-f filename] [-p priority] [-t tag] [message] ...
    logger: illegal option -- s
    Usage:  logger string
            logger [-i] [-f filename] [-p priority] [-t tag] [message] ...
    Peace ...

  2. #2
    Membre du Club Avatar de smooncef
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    118
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 118
    Points : 66
    Points
    66
    Par défaut
    Citation Envoyé par smooncef Voir le message
    Bonjour,

    Voici ce que m'affiche le startup.log, je ne comprends pas j'ai bien renseigné la variable ORACLE_HOME ; ORACLE_SID ; ORACLE_HOME_LISTNER dans mon .profile, mais rien n'y fait, il m'affiche cette même erreur lorsque je lance un dbstart !!!

    Please meeeeee !!!!!!!!

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
     
    dbstart: Starting up database "APIS"
    Wed Jan  9 09:09:44 MET 2008
     
    Error 6 initializing SQL*Plus
    Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    Error 6 initializing SQL*Plus
    Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    logger: illegal option -- s
    Usage:  logger string
            logger [-i] [-f filename] [-p priority] [-t tag] [message] ...
    logger: illegal option -- s
    Usage:  logger string
            logger [-i] [-f filename] [-p priority] [-t tag] [message] ...
    Ok pour ça j'ai réussi à trouver le soucis, mais un problème en cache souvent un autre alors voici ce qu'il y a maintenant :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    dbstart: Starting up database "APIS"
    Wed Jan  9 10:02:51 MET 2008
     
    dbstart: test: unknown operator /export/home/oracle/oracle/product/10.2.0/db_2/dbs/spfileAPIS.ora
    Et là je ne sais pas ce qu'il se passe !
    Merci de me donner un grand coup de main...
    Peace ...

  3. #3
    Expert éminent sénior
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    le fichier /export/home/oracle/oracle/product/10.2.0/db_2/dbs/spfileAPIS.ora existe ?

  4. #4
    Membre du Club Avatar de smooncef
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    118
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 118
    Points : 66
    Points
    66
    Par défaut
    Citation Envoyé par orafrance Voir le message
    le fichier /export/home/oracle/oracle/product/10.2.0/db_2/dbs/spfileAPIS.ora existe ?
    Oui il existe bien, et voici le contenu :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
     
    Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
    $ cat /export/home/oracle/oracle/product/10.2.0/db_2/dbs/spfileAPIS.ora
    Ë¿ÇZ&APIS.__db_cache_size=159383552
    APIS.__java_pool_size=4194304
    APIS.__large_pool_size=4194304
    APIS.__shared_pool_size=117440512
    APIS.__streams_pool_size=0
    *.audit_file_dest='/export/home/oracle/oracle/product/10.2.0/db_2/admin/APIS/adump'
    *.background_dump_dest='/export/home/oracle/oracle/product/10.2.0/db_2/admin/APIS/bdump'
    *.compatible='10.2.0.2.0'
    *.control_files='/export/home/oracle/oracle/product/10.2.0/oradata/APIS/control01.ctl','/export/home/oracle/orac'
    *.core_dump_dest='/export/home/oracle/oracle/product/10.2.0/db_2/admin/APIS/cdump'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='APIS'
    *.db_recovery_file_dest='/export/home/oracle/oracle/product/10.2.0/db_2/flash_recovery_area'
    *.db_recovery_file_dest_size=2147483648
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=APISXDB)'
    *.job_queue_processes=10
    *.open_cursors=300
    *.pga_aggregate_target=96468992
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=289406976
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='/export/home/oracle/oracle/product/10.2.0/db_2/admin/APIS/udump'
    $
    C'est grave docteur ???
    Peace ...

  5. #5
    Expert éminent sénior
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    et y'a pas un truc qui te semble étrange ?

  6. #6
    Membre du Club Avatar de smooncef
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    118
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 118
    Points : 66
    Points
    66
    Par défaut
    Citation Envoyé par orafrance Voir le message
    et y'a pas un truc qui te semble étrange ?
    Bah pourquoi ?
    Peace ...

  7. #7
    Expert éminent sénior
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    je sais pas moi... Ë¿ÇZ&APIS ça parait pas un peu bizarre ?

  8. #8
    Membre du Club Avatar de smooncef
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    118
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 118
    Points : 66
    Points
    66
    Par défaut
    Citation Envoyé par orafrance Voir le message
    je sais pas moi... Ë¿ÇZ&APIS ça parait pas un peu bizarre ?
    Bah j'en sais fichtre rien, j'ai regardé dan une autre base de données installée sur une autre machine Solaris et c'est la même chose, on a les mêmes caractères de début de fichier, et là ça fonctionne très bien :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
     
    $ cat spfileOGAN.ora
    $&[Ÿ¥OGAN.__db_cache_size=184549376
    OGAN.__java_pool_size=4194304
    OGAN.__large_pool_size=4194304
    OGAN.__shared_pool_size=96468992
    OGAN.__streams_pool_size=0
    *.audit_file_dest='/opt/oracle/product/10.2.0/admin/OGAN/adump'
    *.background_dump_dest='/opt/oracle/product/10.2.0/admin/OGAN/bdump'
    *.compatible='10.2.0.1.0'
    *.control_files='/opt/oracle/product/oradata/OGAN/control01.ctl','/opt/oracle/product/oradata/'
    *.core_dump_dest='/opt/oracle/product/10.2.0/admin/OGAN/cdump'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='OGAN'
    *.db_recovery_file_dest='/opt/oracle/product/10.2.0/flash_recovery_area'
    *.db_recovery_file_dest_size=2147483648
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=OGANXDB)'
    *.job_queue_processes=10
    *.open_cursors=300
    *.pga_aggregate_target=96468992
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=290455552
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='/opt/oracle/product/10.2.0/admin/OGAN/udump'
    Peace ...

  9. #9
    Expert éminent sénior
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    et dans dbstart t'as quoi ? et dans l'alert.log t'as regardé si tu avais des erreurs ?

  10. #10
    Membre du Club Avatar de smooncef
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    118
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 118
    Points : 66
    Points
    66
    Par défaut
    Citation Envoyé par orafrance Voir le message
    et dans dbstart t'as quoi ? et dans l'alert.log t'as regardé si tu avais des erreurs ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
     
    $ cat dbstart
    :
    #
    # $Id: dbstart.sh.pp 25-may-2005.14:52:00 vikrkuma Exp $ 
    # Copyright (c) 1991, 2005, Oracle. All rights reserved.  
    #
     
    ###################################
    # 
    # usage: dbstart $ORACLE_HOME
    #
    # This script is used to start ORACLE from /etc/rc(.local).
    # It should ONLY be executed as part of the system boot procedure.
    #
    # This script will start all databases listed in the oratab file
    # whose third field is a "Y".  If the third field is set to "Y" and
    # there is no ORACLE_SID for an entry (the first field is a *),
    # then this script will ignore that entry.
    #
    # This script requires that ASM ORACLE_SID's start with a +, and 
    # that non-ASM instance ORACLE_SID's do not start with a +.
    #
    # If ASM instances are to be started with this script, it cannot
    # be used inside an rc*.d directory, and should be invoked from
    # rc.local only. Otherwise, the CSS service may not be available
    # yet, and this script will block init from completing the boot
    # cycle.
    #
    # If you want dbstart to auto-start a single-instance database that uses
    # an ASM server that is auto-started by CRS (this is the default behavior
    # for an ASM cluster), you must change the database's ORATAB entry to use
    # a third field of "W" and the ASM's ORATAB entry to use a third field of "N".
    # These values specify that dbstart auto-starts the database only after
    # the ASM instance is up and running.
    #
    # Note:
    # Use ORACLE_TRACE=T for tracing this script.
    #
    # The progress log for each instance bringup plus Error and Warning message[s]
    # are logged in file $ORACLE_HOME/startup.log. The error messages related to 
    # instance bringup are also logged to syslog (system log module).
    # The Listener log is located at $ORACLE_HOME_LISTNER/listener.log
    # 
    # To configure:
    # 1) Set ORATAB:
    #    On Solaris 
    #      ORATAB=/var/opt/oracle/oratab
    #    All other UNIX platforms
    #      ORATAB=/etc/oratab
    #
    # 2) Update $ORATAB/oratab with Database Instances that need to be started up.
    #    Entries are of the form:
    #    $ORACLE_SID:$ORACLE_HOME:<N|Y|W>:
    #    An example entry:
    #    main:/usr/lib/oracle/emagent_10g:Y
    #
    # Overall algorithm:
    # 1) Bring up all ASM instances with 'Y' entry in status field in oratab entry
    # 2) Bring up all Database instances with 'Y' entry in status field in
    #    oratab entry
    # 3) If there are Database instances with 'W' entry in status field
    #    then
    #      iterate over all ASM instances (irrespective of 'Y' or 'N') AND
    #      wait for all of them to be started
    #    fi
    # 4) Bring up all Database instances with 'W' entry in status field in
    #    oratab entry
    #
    #####################################
     
    ORACLE_HOME="/export/home/oracle/oracle/product/10.2.0/db_2"
    LOGMSG="logger -puser.alert -s "
     
    trap 'exit' 1 2 3
     
    # for script tracing
    case $ORACLE_TRACE in
        T) set -x ;;
    esac
     
    # Set path if path not set (if called from /etc/rc)
    case $PATH in
        "") PATH=/bin:/usr/bin:/etc
            export PATH ;;
    esac
    # Save LD_LIBRARY_PATH
    SAVE_LLP=$LD_LIBRARY_PATH
     
    # First argument is used to bring up Oracle Net Listener
    ORACLE_HOME_LISTNER=$ORACLE_HOME
    if [ ! $ORACLE_HOME_LISTNER ] ; then
      echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
      echo "Usage: $0 ORACLE_HOME"
    else
      LOG=$ORACLE_HOME_LISTNER/listener.log
     
      # Start Oracle Net Listener
      if [ -x $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
        echo "$0: Starting Oracle Net Listener" >> $LOG 2>&1
        $ORACLE_HOME_LISTNER/bin/lsnrctl start >> $LOG 2>&1 &
    #    export VER10LIST=`$ORACLE_HOME_LISTNER/bin/lsnrctl version | grep "LSNRCTL for " | cut -d' ' -f5 | cut -d'.`
      else
        echo "Failed to auto-start Oracle Net Listener using $ORACLE_HOME_LISTNER/bin/tnslsnr"
      fi
    fi
     
    # Set this in accordance with the platform
     
    ORATAB=/var/opt/oracle/oratab
     
    if [ ! $ORATAB ] ; then
      echo "Set ORATAB to dir where oratab file is located"
      exit 1;
    fi
     
    # Checks Version Mismatch between Listener and Database Instance.
    # A version 10 listener is required for an Oracle Database 10g database.
    # Previous versions of the listener are not supported for use with an Oracle
    # Database 10g database. However, it is possible to use a version 10 listener
    # with previous versions of the Oracle database.
    #checkversionmismatch() {
    #  if [ $VER10LIST ] ; then
    #    VER10INST=`sqlplus -V | grep "Release " | cut -d' ' -f3 | cut -d'.' -f1`
    #    case $VER10INST in
    #      "10")
    #      if [ $VER10LIST != "10" ] ; then
    #        $LOGMSG "Warning: Version 10 listener is required for Oracle Database 10g"
    #        $LOGMSG "Version $VER10LIST for Listener is NOT supported with Database version $VER10INST"
    #        $LOGMSG "Restart Oracle Net Listener using an alternate ORACLE_HOME_LISTNER: lsnrctl start"
    #      fi
    #      ;;
    #      *) ;;
    #    esac
    #  fi
    #}
     
    # Starts a Database Instance
    startinst() {
      # Called programs use same database ID
      export ORACLE_SID
     
      # Put $ORACLE_HOME/bin into PATH and export.
      PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ; export PATH
      # add for bug # 652997
      LD_LIBRARY_PATH=${SAVE_LLP}:${ORACLE_HOME}/lib ; export LD_LIBRARY_PATH
      PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
      SPFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
      SPFILE1=${ORACLE_HOME}/dbs/spfile.ora
     
      echo ""
      echo "$0: Starting up database \"$ORACLE_SID\""
      date
      echo ""
     
    #  checkversionmismatch
     
      # See if it is a V6 or V7 database
      VERSION=undef
      if [ -f $ORACLE_HOME/bin/sqldba ] ; then
        SQLDBA=sqldba
        VERSION=`$ORACLE_HOME/bin/sqldba command=exit | awk '
          /SQL\*DBA: (Release|Version)/ {split($3, V, ".") ;
          print V[1]}'`
        case $VERSION in
          "6") ;;
          *) VERSION="internal" ;;
        esac
      else
        if [ -f $ORACLE_HOME/bin/svrmgrl ] ; then
          SQLDBA=svrmgrl
          VERSION="internal"
        else
          SQLDBA="sqlplus /nolog"
        fi
      fi
     
      STATUS=1
      if [ -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.dbf ] ; then
        STATUS="-1"
      fi
      if [ -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.ora ] ; then
        STATUS="-1"
      fi
      pmon=`ps -ef | egrep pmon_$ORACLE_SID  | grep -v grep`
      if [ "$pmon" != "" ]; 
      then
        STATUS="-1"
        $LOGMSG "Warning: ${INST} \"${ORACLE_SID}\" already started."
      fi
     
      if test $STATUS -eq -1 ; then
        $LOGMSG "Warning: ${INST} \"${ORACLE_SID}\" possibly left running when system went down (system crash?)."
        $LOGMSG "Action: Notify Database Administrator."
        case $VERSION in
          "6")  sqldba "command=shutdown abort" ;;
          "internal")  $SQLDBA $args <<EOF
    connect internal
    shutdown abort
    EOF
            ;;
          *)  $SQLDBA $args <<EOF
    connect / as sysdba
    shutdown abort
    quit
    EOF
            ;;
        esac
     
        if test $? -eq 0 ; then
          STATUS=1
        else
          $LOGMSG "Error: ${INST} \"${ORACLE_SID}\" NOT started."
        fi
      fi
     
      if test $STATUS -eq 1 ; then
        if [ -e $SPFILE -o -e $SPFILE1 -o -e $PFILE ] ; then
          case $VERSION in
            "6")  sqldba command=startup ;;
            "internal")  $SQLDBA <<EOF 
    connect internal
    startup
    EOF
              ;;
            *)  $SQLDBA <<EOF 
    connect / as sysdba
    startup
    quit
    EOF
              ;;
          esac
     
          if test $? -eq 0 ; then
            echo "" 
            echo "$0: ${INST} \"${ORACLE_SID}\" warm started." 
          else
            $LOGMSG "" 
            $LOGMSG "Error: ${INST} \"${ORACLE_SID}\" NOT started." 
          fi
        else
          $LOGMSG "" 
          $LOGMSG "Can't find init file for ${INST} \"${ORACLE_SID}\"." 
          $LOGMSG "Error: ${INST} \"${ORACLE_SID}\" NOT started." 
        fi
      fi
    }
     
    # Starts an ASM Instance
    startasminst() {
      # Called programs use same database ID
      export ORACLE_SID
      ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
      # Called scripts use same home directory
      export ORACLE_HOME
     
      # For ASM instances, we have a dependency on the CSS service.
      # Wait here for it to become available before instance startup.
     
      # Is the 10g install intact? Are all necessary binaries present?
      if [ ! -x $ORACLE_HOME/bin/crsctl ]; then
        $LOGMSG "$ORACLE_HOME/bin/crsctl not found when attempting to start"
        $LOGMSG "  ASM instance $ORACLE_SID."
     
      else 
        COUNT=0
        $ORACLE_HOME/bin/crsctl check css
        RC=$?
        while [ "$RC" != "0" ];
          do
          'COUNT=$((COUNT+1))'
          if [ $COUNT = 15 ] ; then
            # 15 tries with 20 sec interval => 5 minutes timeout
            $LOGMSG "Timed out waiting to start ASM instance $ORACLE_SID"         
            $LOGMSG "  CSS service is NOT available."
            exit $COUNT
          fi
          $LOGMSG "Waiting for Oracle CSS service to be available before starting "
          $LOGMSG " ASM instance $ORACLE_SID. Wait $COUNT."
          sleep 20
          $ORACLE_HOME/bin/crsctl check css
          RC=$?
        done
      fi
      startinst
    }
     
    # Start of dbstartup script
    #
    # Loop for every entry in oratab file and and try to start
    # that ORACLE.
    #
    # ASM instances need to be started before 'Database instances'
    # ASM instance is identified with '+' prefix in ORACLE_SID
    # Following loop brings up ASM instance[s]
     
    cat $ORATAB | while read LINE
    do
    case $LINE in
      \#*)                ;;        #comment-line in oratab
      *)
      ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
      if [ "$ORACLE_SID" = '*' ] ; then
        # same as NULL SID - ignore this entry
        ORACLE_SID=""
        continue
      fi
      # Proceed only if last field is 'Y'.
      if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then
        # If ASM instances
        if [ `echo $ORACLE_SID | cut -b 1` = '+' ]; then
          INST="ASM instance"
          ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
          # Called scripts use same home directory
          export ORACLE_HOME
          # file for logging script's output
          LOG=$ORACLE_HOME/startup.log
          touch $LOG
          chmod a+r $LOG
          echo "Processing $INST \"$ORACLE_SID\": log file $ORACLE_HOME/startup.log"
          startasminst >> $LOG 2>&1
        fi
      fi
      ;;
    esac
    done
     
    # exit if there was any trouble bringing up ASM instance[s]
    if [ "$?" != "0" ] ; then
      exit 2
    fi
     
    #
    # Following loop brings up 'Database instances'
    #
    cat $ORATAB | while read LINE
    do
    case $LINE in
      \#*)                ;;        #comment-line in oratab
      *)
      ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
      if [ "$ORACLE_SID" = '*' ] ; then
        # same as NULL SID - ignore this entry
        ORACLE_SID=""
        continue
      fi
      # Proceed only if last field is 'Y'.
      if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then
        # If non-ASM instances
        if [ `echo $ORACLE_SID | cut -b 1` != '+' ]; then
          INST="Database instance"
          ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
          # Called scripts use same home directory
          export ORACLE_HOME
          # file for logging script's output
          LOG=$ORACLE_HOME/startup.log
          touch $LOG
          chmod a+r $LOG
          echo "Processing $INST \"$ORACLE_SID\": log file $ORACLE_HOME/startup.log"
          startinst >> $LOG 2>&1
        fi
      fi
      ;;
    esac
    done
     
    #
    # Following loop brings up 'Database instances' that have wait state 'W'
    #
    cat $ORATAB | while read LINE
    do
    case $LINE in
      \#*)                ;;        #comment-line in oratab
      *)
      ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
      if [ "$ORACLE_SID" = '*' ] ; then
        # same as NULL SID - ignore this entry
        ORACLE_SID=""
        continue
      fi
      # Proceed only if last field is 'W'.
      if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "W" ] ; then
        W_ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
        # DB instances with 'W' (wait state) have a dependency on ASM instances via CRS.
        # Wait here for 'all' ASM instances to become available.
        cat $ORATAB | while read LINE
        do
        case $LINE in
          \#*)                ;;        #comment-line in oratab
          *)
          ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
          if [ "$ORACLE_SID" = '*' ] ; then
            # same as NULL SID - ignore this entry
            ORACLE_SID=""
            continue
          fi
          if [ `echo $ORACLE_SID | cut -b 1` = '+' ]; then
            INST="ASM instance"
            ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
            if [ -x $ORACLE_HOME/bin/srvctl ] ; then
              COUNT=0
              NODE=`olsnodes -l`
              RNODE=`srvctl status asm -n $NODE | grep "$ORACLE_SID is running"`
              RC=$?
              while [ "$RC" != "0" ]; # wait until this comes up!
              do
                'COUNT=$((COUNT+1))'
                if [ $COUNT = 5 ] ; then
                  # 5 tries with 60 sec interval => 5 minutes timeout
                  $LOGMSG "Error: Timed out waiting on CRS to start ASM instance $ORACLE_SID"         
                  exit $COUNT
                fi
                $LOGMSG "Waiting for Oracle CRS service to start ASM instance $ORACLE_SID"
                $LOGMSG "Wait $COUNT."
                sleep 60
                RNODE=`srvctl status asm -n $NODE | grep "$ORACLE_SID is running"`
                RC=$?
              done
            else
              $LOGMSG "Error: \"${W_ORACLE_SID}\" has dependency on ASM instance \"${ORACLE_SID}\""
              $LOGMSG "Error: Need $ORACLE_HOME/bin/srvctl to check this dependency"
            fi
          fi     # asm instance
          ;;
        esac
        done # innner while
      fi
      ;;
    esac
    done # outer while
     
    # by now all the ASM instances have come up and we can proceed to bring up
    # DB instance with 'W' wait status
     
    cat $ORATAB | while read LINE
    do
    case $LINE in
      \#*)                ;;        #comment-line in oratab
      *)
      ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
      if [ "$ORACLE_SID" = '*' ] ; then
        # same as NULL SID - ignore this entry
        ORACLE_SID=""
        continue
      fi
      # Proceed only if last field is 'W'.
      if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "W" ] ; then
        INST="Database instance"
        if [ `echo $ORACLE_SID | cut -b 1` = '+' ]; then
          $LOGMSG "Error: ${INST} \"${ORACLE_SID}\" NOT started"
          $LOGMSG "Error: incorrect usage: 'W' not allowed for ASM instances"
          continue
        fi
        ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
        # Called scripts use same home directory
        export ORACLE_HOME
        # file for logging script's output
        LOG=$ORACLE_HOME/startup.log
        touch $LOG
        chmod a+r $LOG
        echo "Processing $INST \"$ORACLE_SID\": log file $ORACLE_HOME/startup.log"
        startinst >> $LOG 2>&1
      fi
      ;;
    esac
    done
    Et voici ce que contiennent les log :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    51
    52
    53
    54
    55
    56
    57
    $ cat shutdown.log
    
    SQL*Plus: Release 10.2.0.2.0 - Production on Wed Jan 9 14:25:28 2008
    
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    
    SQL> Connected to an idle instance.
    SQL> ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Intel SVR4 UNIX Error: 2: No such file or directory
    SQL> Disconnected
    Database instance "APIS" shut down.
    $ cat listener.log
    dbshut: Stoping Oracle Net Listener
    
    LSNRCTL for Solaris: Version 10.2.0.2.0 - Production on 09-JAN-2008 14:25:27
    
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    The command completed successfully
    dbstart: Starting Oracle Net Listener
    
    LSNRCTL for Solaris: Version 10.2.0.2.0 - Production on 09-JAN-2008 14:25:38
    
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    
    Starting /export/home/oracle/oracle/product/10.2.0/db_2/bin/tnslsnr: please wait...
    
    TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
    Log messages written to /export/home/oracle/oracle/product/10.2.0/db_2/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=toto)(PORT=1521)))
    
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Solaris: Version 10.2.0.2.0 - Production
    Start Date                09-JAN-2008 14:25:38
    Uptime                    0 days 0 hr. 0 min. 0 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Log File         /export/home/oracle/oracle/product/10.2.0/db_2/network/log/listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=toto)(PORT=1521)))
    The listener supports no services
    The command completed successfully
    $ cat startup.log
    
    dbstart: Starting up database "APIS"
    Wed Jan  9 14:25:38 MET 2008
    
    dbstart: test: unknown operator /export/home/oracle/oracle/product/10.2.0/db_2/dbs/spfileAPIS.ora
    $ cat sqlnet.log
    $
    Peace ...

  11. #11
    Expert éminent sénior
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    sauf qu'il manque celui que j'ai demandé

    à y réfléchir, il me semble que c'est un problème de bash, sh au lieu de ksh ou un truc du style

  12. #12
    Membre du Club Avatar de smooncef
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    118
    Détails du profil
    Informations personnelles :
    Âge : 47
    Localisation : France

    Informations forums :
    Inscription : Octobre 2007
    Messages : 118
    Points : 66
    Points
    66
    Par défaut
    Citation Envoyé par orafrance Voir le message
    sauf qu'il manque celui que j'ai demandé

    à y réfléchir, il me semble que c'est un problème de bash, sh au lieu de ksh ou un truc du style
    J'ai recherché le fichier alert.log, mais il n'est pas sur mon système.

    Par contre j'ai réussi à relcancer la base de données :

    sqlplus connect / as sysdba
    sql>startup

    Et c'est reparti.
    La solution était dans mon dbstart, mais il faut que je le modifie car il effectue des test qui font qu'il plante avant même de lancer la base.

    Merci pour l'aide en tous cas.

    Peace ...
    Peace ...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 0
    Dernier message: 22/02/2010, 08h35
  2. probleme avec to_date sous oracle
    Par hoolako dans le forum SQL
    Réponses: 5
    Dernier message: 13/03/2009, 20h38
  3. Probleme avec dbms_scheduler sous Oracle 10.2.0.1.0
    Par edi@csb.nc dans le forum SQL
    Réponses: 2
    Dernier message: 08/10/2006, 23h22
  4. Problème avec GLUT sous borland c++ builder X
    Par hiko-seijuro dans le forum GLUT
    Réponses: 1
    Dernier message: 04/11/2004, 12h47
  5. Problème avec phpize sous debian woody
    Par nipepsi dans le forum Debian
    Réponses: 3
    Dernier message: 09/09/2004, 11h54

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo