Solved

Connecting Oracle 11G in Windows 2012

Posted on 2013-10-22
10
1,201 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
10 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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 34

Expert Comment

by:Mark Geerlings
Comment Utility
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
Comment Utility
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
 

Author Comment

by:Randy Rich
Comment Utility
To Markgeer

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

Author Comment

by:Randy Rich
Comment Utility
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
have you tried the ip address instead of localhost ?
or the machine name ?
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
Comment Utility
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
Comment Utility
YES!  That did it!  So why does the normal installation and configuration of the database not add that line?
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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
Comment Utility
Ok, thanks a bunch!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now