Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a batch file which starts the Oracle Services

net start OracleOraDb11g_home1TNSListener
net start OracleServiceORCL
call C:\app\Edifixio\product\11.2.0\dbhome_1\BIN\emctl.bat start dbconsole
pause

But on executing the script I am getting:

C:\windows\system32>net start OracleOraDb11g_home1TNSListener
The requested service has already been started.

More help is available by typing NET HELPMSG 2182.


C:\windows\system32>net start OracleServiceORCL
The OracleServiceORCL service is starting.........
The OracleServiceORCL service was started successfully.


C:\windows\system32>call C:\app\Edifixio\product\11.2.0\dbhome_1\BIN\emctl.bat start dbconsole
Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
Press any key to continue . . .

I am using Windows 7 64 bit with Oracle 11gR2 64 bit. Any information will be very helpful. Thanks and Regards.

share|improve this question
Which part are you having trouble with, setting the variable, or picking the name? – Ignacio Vazquez-Abrams Nov 17 '11 at 7:55
@Ignacio Vazquez-Abrams I found that I have to set ORACLE_UNQNAME to some value before invocation of the line call C:\app\Edifixio\product\11.2.0\dbhome_1\BIN\emctl.bat start dbconsole. But what is the value which is to be set? – Tapas Bose Nov 17 '11 at 8:01

2 Answers

up vote 2 down vote accepted

Having installed Oracle about 20 times today, basically until I got it all working, and having experienced this problem, here are the two tips that really helped:

  1. If you have multiple IP addresses, ensure the static address adapter is the primary, or add a Microsoft Loopback adapter with a 10.10.10.10 address per the Oracle pre-installation instructions. Oracle Pre-installation Reqs

  2. Add ORACLE_HOSTNAME and a value of [computer name] to your environment variables. This was the final step that finally fixed my em install. Note you need to check that you can resolve your machine to that address by both the qualified and unqualified machine name. You may need to tweak HOSTS to do this. Installing on Computers with Multiple IP Addresses

If these two things are correct, your listener.ora and tnsnames.ora will correctly match the separate em configuration, and you should avoid the requirement to set ORACLE_UNQNAME.

Best Wishes!

share|improve this answer

You need to set your global SID [1]. Your SID seems to be ORCL. from below line.

OracleServiceORCL

try using

SET ORACLE_UNQNAME=ORCL

if it fails

SET ORACLE_UNQNAME=ORCL.yourdomain.com

According to [2] "I suspect ... that this was added to handle the situation where the SID and the unique name are different."

You can find db name and db_unique name with following SQL

Select name,DB_UNIQUE_NAME from v$database;

References :

[1] https://forums.oracle.com/forums/thread.jspa?threadID=1035888 Last answer of 892845

[2] http://www.appsdba.com/blog/?p=305 :

share|improve this answer
Thanks for reply. I name and DB_UNIQUE_NAME is ORCL and orcl respectively. I have added SET ORACLE_UNQNAME=ORCL before call C:\app\Edifixio\product\11.2.0\dbhome_1\BIN\emctl.bat start dbconsole but I am getting OC4J Configuration issue. C:\app\Edifixio\product\11.2.0\dbhome_1/oc4j/j2ee/OC4J_DBConsole_EDFX-LAPTOP-16_‌​orcl not found. – Tapas Bose Nov 17 '11 at 9:35
can you give contents of C:\app\Edifixio\product\11.2.0\dbhome_1/oc4j/j2ee/ directory – Atilla Ozgur Nov 17 '11 at 9:52
1. home, 2. oc4j_applications, 3. OC4J_DBConsole, 4. OC4J_DBConsole_localhost_orcl, 5. OC4J_Workflow_Component_Container, 6. OC4J_Workflow_Management_Container, 7. utilities, all of these are folder and 8. deploy_db_wf is a file. This the content. – Tapas Bose Nov 17 '11 at 10:21
try to copy OC4J_DBConsole_localhost_orcl --> OC4J_DBConsole_EDFX-LAPTOP-16_orcl. Normally you should have a directory OC4J_DBConsole_MACHINE_NAME_SID there. Do your oracle machine have static IP? – Atilla Ozgur Nov 17 '11 at 11:12
EDFX-LAPTOP-16 is the hostname of the machine. Yes its static ip. Actually the public ip is static but the private one is dynamic. – Tapas Bose Nov 17 '11 at 11:39
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.