Solved

Connecting Oracle 11G in Windows 2012

Posted on 2013-10-22
10
1,208 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)
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
 

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
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 37

Expert Comment

by:Geert Gruwez
ID: 39593551
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
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 76

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
levels for reporting 5 65
PL/SQL LOOP CURSOR 3 58
case statement in where clause with not exist 15 46
'G_F01' is not a procedure or is undefined 3 12
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

867 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

17 Experts available now in Live!

Get 1:1 Help Now