Solved

Connecting Oracle 11G in Windows 2012

Posted on 2013-10-22
10
1,259 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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 38

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

Industry Leaders: 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!

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses

617 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