Support

Forums

Contact Me

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

You might also like:
Oracle ORA-00054: resource busy and acquire with NOWAIT spec
76 days ago
Oracle ORA-00054: resource busy and acquire with NOWAIT spec
ORA-00054: resource busy and acquire with NOWAIT specified Cause: Resource interested is busy.
Install XEN Server without an Optical Drive
597 days ago
Install XEN Server without an Optical Drive
Citrix XenServer is a complete, managed server virtualization platform built on the powerful Xe
Map Synology network drive under linux
1030 days ago
Map Synology network drive under linux
How to mount your Synology NAS (or any other NAS brand) shared folder under Linux using CIFS. C
Advanced Oracle Weblogic start/stop script
1032 days ago
Advanced Oracle Weblogic start/stop script
The Oracle WebLogic 11g application server product line is the industry's most comprehensive J
Basic operations with XEN server: export, import of VM templ
1032 days ago
Basic operations with XEN server: export, import of VM templ
More and more I am using XEN at work, and here is a small how to of some very common operations.
Debian Lenny how to
1362 days ago
Debian Lenny how to
  Short description of how to accomplish some specific task in Debian Lenny. How to install Sun ja
blog comments powered by Disqus

Donations

Thank You for supporting my work