Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Connecting Oracle 11G in Windows 2012

Posted on 2013-10-22
10
Medium Priority
?
1,298 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 78

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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

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 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 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 78

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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

824 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