Solved

Connecting Oracle 11G in Windows 2012

Posted on 2013-10-22
10
1,228 Views
Last Modified: 2013-10-24
I am trying to install Oracle 11g on windows 2012.  Everything seems to be configured correctly, but when I try to connect to the database in sqlplus I get the following results.  I'm simply trying to connect to the local database from the local machine.  Is this a problem trying to install 11G on windows 2012 or am I doing something wrong with my setup?

SQL> connect sysdba/masterkey@oracle1
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect discriptor


Here is the contents of listener.ora:

# listener.ora Network Configuration File: C:\oracle\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = C:\oracle\Administrator


SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = orcl
      (ORACLE_HOME = C:\oracle\Administrator\product\11.2.0)
      (SID_NAME = ORCL)
    )
  )

Here is the contents of tnsnames.ora:

# tnsnames.ora Network Configuration File: C:\oracle\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = LOCALHOST)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST
      (ADDRESS = (PROTOCOL = TCP)(HOST = LOCALHOST)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )
0
Comment
Question by:Randy Rich
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39592085
We need to make sure the listener is listening for ORCL.

From a CMD prompt, post the results of:
lsnrctl status

If ORCL isn't in the resulting list, manually try to register it.

From a sqlplus prompt:
conn / as sysdba
alter system register;
0
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 39592420
Make sure there is no Windows firewall blocking access to port 1521.

And, in case it helps you feel any better, I've installed numerous Oracle database versions on various versions of Windows, and the part that usually gave me trouble was getting the TNS configuration to work.  For some reason, that usually seems to be the most troublesome part of an Oracle install on Windows.  But, once you get the tnsnames.ora and listener.ora file configured correctly (sometimes the sqlnet.ora file must also be adjusted) an Oracle database usually runs very well on a Windows server.

I really like the Windows Performance Monitor with its ability to display file I/O graphically in real-time (along with memory and CPU usage).  I haven't found anything in the Linux world that comes close to this ability for monitoring disk I/O.
0
 

Author Comment

by:Randy Rich
ID: 39593035
To slightwv

I registered it and still orcl is not in the listener status results.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 12.1.0.1.0 - Production
Start Date                22-OCT-2013 20:52:18
Uptime                    0 days 0 hr. 7 min. 39 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\oracle\product\12.1.0\dbhome_1\network\admin\listener.ora
Listener Log File         C:\oracle\diag\tnslsnr\WIN-TFFV6PMC02M\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Randy Rich
ID: 39593045
To Markgeer

I checked the windows firewall and it's off.  I can also tnsping the service name.
0
 

Author Comment

by:Randy Rich
ID: 39593059
Let me submit a new tnsnames.ora, sqlnet.ora and listener.ora because I installed 12C thinking it might be a windows 2012 issue.

# listener.ora Network Configuration File: C:\oracle\product\12.1.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oracle\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\oracle\product\12.1.0\dbhome_1\bin\oraclr12.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )



# sqlnet.ora Network Configuration File: C:\oracle\product\12.1.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


# tnsnames.ora Network Configuration File: C:\oracle\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 39593551
have you tried the ip address instead of localhost ?
or the machine name ?
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 39593852
I'm running 12c on 2008R2 with no problems.  It might be an issue with 2012 but I doubt it.

Just for grins, try manual registration.

Change the listener.ora to add ORCL then restart the listener.
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oracle\product\12.1.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\oracle\product\12.1.0\dbhome_1\bin\oraclr12.dll")
    )
   (SID_DESC = 
      (ORACLE_HOME = C:\oracle\product\12.1.0\dbhome_1)
      (SID_NAME = ORCL)
   )       
  )

Open in new window

0
 

Author Closing Comment

by:Randy Rich
ID: 39593911
YES!  That did it!  So why does the normal installation and configuration of the database not add that line?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39593972
When Oracle went to automatic registration there 'should not' be a need for manual.

There was a bug in 10g where you still needed manual but it seems to have ben fixed in 11g.

Not sure why 12c wasn't working.  LISTENER should be the default the instance looks for so nothing should have to be done.  Maybe they have reintroduced a new bug?

You might also check the local_listener spfile parameter and possibly try setting it to LISTENER for grins.
0
 

Author Comment

by:Randy Rich
ID: 39599301
Ok, thanks a bunch!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ORA-00972: identifier is too long from Unix but not from Windows in SQLPLUS 17 108
use lov values 2 71
form builder not starting 3 71
error in oracle form 11 19
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question