Oracle - Startup error with oracle_unqname












0















I can not run /etc/init.d/dbora.
When running through the terminal it reports the following problem:



Shell




[root@localhost init.d]# ./dbora start Starting... Processing Database
instance "ORA11G": log file
/ora01/app/oracle/product/11.2.0/db_1/startup.log Environment variable
ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database
unique name.




My User Linux: oracle



Script




!/bin/bash



# versao: 1.0  
export TMP=/tmp
export ORACLE_HOSTNAME=centos7.dbaora.com
export ORACLE_UNQNAME=oracle
export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=ORA11G
export ORACLE_OWNER=oracle

PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'

umask 022

start(){
echo "Starting..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
touch /var/lock/subsys/dbora
}

stop(){
echo "Stopping..."
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
rm -f /var/lock/subsys/dbora
}

restart(){
stop
start
}

usage(){
echo "usage: $0 {start|stop|restart}"
}

if [ `id -u` -ne 0 ]
then
echo "Este script deve ser executado como root"
exit
fi

case $1 in
'start') start;;
'stop') stop;;
'restart') restart;;
*) usage;;
esac










share|improve this question





























    0















    I can not run /etc/init.d/dbora.
    When running through the terminal it reports the following problem:



    Shell




    [root@localhost init.d]# ./dbora start Starting... Processing Database
    instance "ORA11G": log file
    /ora01/app/oracle/product/11.2.0/db_1/startup.log Environment variable
    ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database
    unique name.




    My User Linux: oracle



    Script




    !/bin/bash



    # versao: 1.0  
    export TMP=/tmp
    export ORACLE_HOSTNAME=centos7.dbaora.com
    export ORACLE_UNQNAME=oracle
    export ORACLE_BASE=/ora01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
    export ORACLE_SID=ORA11G
    export ORACLE_OWNER=oracle

    PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
    export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

    alias cdob='cd $ORACLE_BASE'
    alias cdoh='cd $ORACLE_HOME'
    alias tns='cd $ORACLE_HOME/network/admin'
    alias envo='env | grep ORACLE'

    umask 022

    start(){
    echo "Starting..."
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
    touch /var/lock/subsys/dbora
    }

    stop(){
    echo "Stopping..."
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
    su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
    rm -f /var/lock/subsys/dbora
    }

    restart(){
    stop
    start
    }

    usage(){
    echo "usage: $0 {start|stop|restart}"
    }

    if [ `id -u` -ne 0 ]
    then
    echo "Este script deve ser executado como root"
    exit
    fi

    case $1 in
    'start') start;;
    'stop') stop;;
    'restart') restart;;
    *) usage;;
    esac










    share|improve this question



























      0












      0








      0








      I can not run /etc/init.d/dbora.
      When running through the terminal it reports the following problem:



      Shell




      [root@localhost init.d]# ./dbora start Starting... Processing Database
      instance "ORA11G": log file
      /ora01/app/oracle/product/11.2.0/db_1/startup.log Environment variable
      ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database
      unique name.




      My User Linux: oracle



      Script




      !/bin/bash



      # versao: 1.0  
      export TMP=/tmp
      export ORACLE_HOSTNAME=centos7.dbaora.com
      export ORACLE_UNQNAME=oracle
      export ORACLE_BASE=/ora01/app/oracle
      export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
      export ORACLE_SID=ORA11G
      export ORACLE_OWNER=oracle

      PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

      export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
      export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

      alias cdob='cd $ORACLE_BASE'
      alias cdoh='cd $ORACLE_HOME'
      alias tns='cd $ORACLE_HOME/network/admin'
      alias envo='env | grep ORACLE'

      umask 022

      start(){
      echo "Starting..."
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
      touch /var/lock/subsys/dbora
      }

      stop(){
      echo "Stopping..."
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
      rm -f /var/lock/subsys/dbora
      }

      restart(){
      stop
      start
      }

      usage(){
      echo "usage: $0 {start|stop|restart}"
      }

      if [ `id -u` -ne 0 ]
      then
      echo "Este script deve ser executado como root"
      exit
      fi

      case $1 in
      'start') start;;
      'stop') stop;;
      'restart') restart;;
      *) usage;;
      esac










      share|improve this question
















      I can not run /etc/init.d/dbora.
      When running through the terminal it reports the following problem:



      Shell




      [root@localhost init.d]# ./dbora start Starting... Processing Database
      instance "ORA11G": log file
      /ora01/app/oracle/product/11.2.0/db_1/startup.log Environment variable
      ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database
      unique name.




      My User Linux: oracle



      Script




      !/bin/bash



      # versao: 1.0  
      export TMP=/tmp
      export ORACLE_HOSTNAME=centos7.dbaora.com
      export ORACLE_UNQNAME=oracle
      export ORACLE_BASE=/ora01/app/oracle
      export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
      export ORACLE_SID=ORA11G
      export ORACLE_OWNER=oracle

      PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

      export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
      export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

      alias cdob='cd $ORACLE_BASE'
      alias cdoh='cd $ORACLE_HOME'
      alias tns='cd $ORACLE_HOME/network/admin'
      alias envo='env | grep ORACLE'

      umask 022

      start(){
      echo "Starting..."
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
      touch /var/lock/subsys/dbora
      }

      stop(){
      echo "Stopping..."
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
      su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
      rm -f /var/lock/subsys/dbora
      }

      restart(){
      stop
      start
      }

      usage(){
      echo "usage: $0 {start|stop|restart}"
      }

      if [ `id -u` -ne 0 ]
      then
      echo "Este script deve ser executado como root"
      exit
      fi

      case $1 in
      'start') start;;
      'stop') stop;;
      'restart') restart;;
      *) usage;;
      esac







      oracle centos






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 '18 at 15:13









      APC

      118k15118229




      118k15118229










      asked Nov 17 '18 at 13:54









      JúniorJúnior

      225




      225
























          1 Answer
          1






          active

          oldest

          votes


















          1














          ORACLE_UNQNAME is an OS environmental variable used by Oracle Enterprise Manager; it supports managing multiple databases from one OEM instance.



          It looks like you haven't set a value yourself, probably because you only have the one database so it's already unique, right :) Nevertheless you need to give it a different value from oracle: orcl is traditional and will do the trick. In Linux you can set it from the command line using export like any other environment variable, or just change the value in your script.






          share|improve this answer
























          • After the command line 'export ORACLE OWNER = oracle' I added the line 'export ORACLE_UNQNAME' and even then the Script does not recognize. Could you correct me?

            – Júnior
            Nov 18 '18 at 9:28











          • Apologies for not being clear. You need to change the default value oracle to something different.

            – APC
            Nov 18 '18 at 11:14











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53351868%2foracle-startup-error-with-oracle-unqname%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          ORACLE_UNQNAME is an OS environmental variable used by Oracle Enterprise Manager; it supports managing multiple databases from one OEM instance.



          It looks like you haven't set a value yourself, probably because you only have the one database so it's already unique, right :) Nevertheless you need to give it a different value from oracle: orcl is traditional and will do the trick. In Linux you can set it from the command line using export like any other environment variable, or just change the value in your script.






          share|improve this answer
























          • After the command line 'export ORACLE OWNER = oracle' I added the line 'export ORACLE_UNQNAME' and even then the Script does not recognize. Could you correct me?

            – Júnior
            Nov 18 '18 at 9:28











          • Apologies for not being clear. You need to change the default value oracle to something different.

            – APC
            Nov 18 '18 at 11:14
















          1














          ORACLE_UNQNAME is an OS environmental variable used by Oracle Enterprise Manager; it supports managing multiple databases from one OEM instance.



          It looks like you haven't set a value yourself, probably because you only have the one database so it's already unique, right :) Nevertheless you need to give it a different value from oracle: orcl is traditional and will do the trick. In Linux you can set it from the command line using export like any other environment variable, or just change the value in your script.






          share|improve this answer
























          • After the command line 'export ORACLE OWNER = oracle' I added the line 'export ORACLE_UNQNAME' and even then the Script does not recognize. Could you correct me?

            – Júnior
            Nov 18 '18 at 9:28











          • Apologies for not being clear. You need to change the default value oracle to something different.

            – APC
            Nov 18 '18 at 11:14














          1












          1








          1







          ORACLE_UNQNAME is an OS environmental variable used by Oracle Enterprise Manager; it supports managing multiple databases from one OEM instance.



          It looks like you haven't set a value yourself, probably because you only have the one database so it's already unique, right :) Nevertheless you need to give it a different value from oracle: orcl is traditional and will do the trick. In Linux you can set it from the command line using export like any other environment variable, or just change the value in your script.






          share|improve this answer













          ORACLE_UNQNAME is an OS environmental variable used by Oracle Enterprise Manager; it supports managing multiple databases from one OEM instance.



          It looks like you haven't set a value yourself, probably because you only have the one database so it's already unique, right :) Nevertheless you need to give it a different value from oracle: orcl is traditional and will do the trick. In Linux you can set it from the command line using export like any other environment variable, or just change the value in your script.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 17 '18 at 16:48









          APCAPC

          118k15118229




          118k15118229













          • After the command line 'export ORACLE OWNER = oracle' I added the line 'export ORACLE_UNQNAME' and even then the Script does not recognize. Could you correct me?

            – Júnior
            Nov 18 '18 at 9:28











          • Apologies for not being clear. You need to change the default value oracle to something different.

            – APC
            Nov 18 '18 at 11:14



















          • After the command line 'export ORACLE OWNER = oracle' I added the line 'export ORACLE_UNQNAME' and even then the Script does not recognize. Could you correct me?

            – Júnior
            Nov 18 '18 at 9:28











          • Apologies for not being clear. You need to change the default value oracle to something different.

            – APC
            Nov 18 '18 at 11:14

















          After the command line 'export ORACLE OWNER = oracle' I added the line 'export ORACLE_UNQNAME' and even then the Script does not recognize. Could you correct me?

          – Júnior
          Nov 18 '18 at 9:28





          After the command line 'export ORACLE OWNER = oracle' I added the line 'export ORACLE_UNQNAME' and even then the Script does not recognize. Could you correct me?

          – Júnior
          Nov 18 '18 at 9:28













          Apologies for not being clear. You need to change the default value oracle to something different.

          – APC
          Nov 18 '18 at 11:14





          Apologies for not being clear. You need to change the default value oracle to something different.

          – APC
          Nov 18 '18 at 11:14


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53351868%2foracle-startup-error-with-oracle-unqname%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini