Select Page

Oracle Please set ORACLE_UNQNAME to database unique name

Oracle Please set ORACLE_UNQNAME to database unique name

if you encounter this error while starting oracle

/etc/init.d/oraemctl start Starting Oracle EM DB Console: Environment variable ORACLE_UNQNAME not defined.  Please set ORACLE_UNQNAME to database unique name. OK

One possible solution is to edit the script

# vi /etc/init.d/oraemctl

and add the following code in blue

#!/bin/bash # # oraemctl Starting and stopping Oracle Enterprise Manager Database Control. # Script is valid for 10g and 11g versions. # # chkconfig: 35 80 30 # description: Enterprise Manager DB Control startup script  # Source function library.  . /etc/rc.d/init.d/functions  ORACLE_OWNER="oracle" #ORACLE_HOME="/opt/oracle/otk/home" ORACLE_HOME="/opt/oracle/otk/home/app/oracle/product/11.2.0/dbhome_1" ORACLE_SID=orcl  case "$1" in  start)   echo -n $"Starting Oracle EM DB Console:"   su - $ORACLE_OWNER -c "ORACLE_SID=$ORACLE_SID $ORACLE_HOME/bin/emctl start dbconsole"   echo "OK"   ;;  stop)   echo -n $"Stopping Oracle EM DB Console:"   su - $ORACLE_OWNER -c "ORACLE_SID=$ORACLE_SID $ORACLE_HOME/bin/emctl stop dbconsole"   echo "OK"   ;;  *)  echo $"Usage: $0 {start|stop}" ;; esac ~

Use of course the right SID, after that Oracle Enterprise manager will start correctly

# /etc/init.d/oraemctl start
Starting Oracle EM DB Console:Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
– An instance of Oracle Enterprise Manager 11g Database Control is already running.
OK

About The Author

Cédric Walter

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.

Categories