Randy Rich
asked on
Problem with listener ora-12514: TNS: listener does not currently know of service requested in connect discriptor
I've just installed Oracle 11g on a Windows 2003 machine. The database is up and running fine but I can't use the listener. When I try to connect I get the above error. This was installed several hours ago so it's not a time issue. I've logged in and ran ALTER SYSTEM REGISTER; I've bounced the database, listener, and server several times but nothing seems to work.
Here is the contents of the listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai n.Local)(P ORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = D:\app\Administrator
Here is the contents of my tnsnames.ora:
ORACLE1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
# WINSVR-FALCON.Falcon-Domai n.Local
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai n.Local)(P ORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.Falcon-Domain.Local)
)
)
I've run lsnrctl status and lsnrctl services and attached the content to this incident.
Thanks
status.JPG
services.JPG
Here is the contents of the listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = D:\app\Administrator
Here is the contents of my tnsnames.ora:
ORACLE1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
# WINSVR-FALCON.Falcon-Domai
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.Falcon-Domain.Local)
)
)
I've run lsnrctl status and lsnrctl services and attached the content to this incident.
Thanks
status.JPG
services.JPG
ASKER
I figured it out. What I had to do was run the lsnrctl services command and get the exact name of the services registered with the listener. Then make sure that name was plugged into the tnsnames.ora file as the service name for the particular alias.
ASKER
Here's what happens. The database runs fine at first. But after running multiple reports etc, the listener stops receiving messages. Actually it blocks the instance I'm trying to connect to. When I run lsnrctl services I get the following:
Service "CLRExtProc" has 1 instances(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service ...
Handlers(s):
"DEDICATED" established:346 refused 0
LOCAL SERVER
Service "orcl.Falcon-Domain.Local" has 1 instances(s).
Instance "orcl", status READY, has 1 handler(s) for this service ...
Handlers(s):
"DEDICATED" established:346 refused 0 state:blocked
LOCAL SERVER
Service "orclXDB.Falcon-Domain.loc al" has 1 instances(s).
Instance "orcl", status READY, has 1 handler(s) for this service ...
Handlers(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: WINSVR-FALCON, pid 9300>
(ADDRESS=(PROTOCOL=tcp)(HO ST=WINSVR- FALCON.Fal con-Domain .local)(PO RT=1689))
When I try to connect in sql plus to any user using an alias I get
ORA-12516: TNS:listener could not find available handler with matching protocol stack.
When I try to connect / as sysdba i get
ERROR: ORA-00020: maximum number of processes (300) exceeded.
Here is the contents of my init.ora
########################## ########## ########## ########## ########## ########## ##
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
########################## ########## ########## ########## ########## ########## ##
########################## ########## #######
# Cache and I/O
########################## ########## #######
db_block_size=8192
########################## ########## #######
# Cursors and Library Cache
########################## ########## #######
open_cursors=300
########################## ########## #######
# Database Identification
########################## ########## #######
db_domain=Falcon-Domain.Lo cal
db_name=orcl
########################## ########## #######
# File Configuration
########################## ########## #######
control_files=("D:\app\Adm inistrator \oradata\o rcl\contro l01.ctl", "D:\app\Administrator\flas h_recovery _area\orcl \control02 .ctl")
db_recovery_file_dest=D:\a pp\Adminis trator\fla sh_recover y_area
db_recovery_file_dest_size =403911475 2
########################## ########## #######
# Miscellaneous
########################## ########## #######
compatible=11.2.0.0.0
diagnostic_dest=D:\app\Adm inistrator
memory_target=1288699904
########################## ########## #######
# Processes and Sessions
########################## ########## #######
processes=300
########################## ########## #######
# Security and Auditing
########################## ########## #######
audit_file_dest=D:\app\Adm inistrator \admin\orc l\adump
audit_trail=db
remote_login_passwordfile= shared
########################## ########## #######
# Shared Server
########################## ########## #######
dispatchers="(PROTOCOL=TCP ) (SERVICE=orclXDB)"
########################## ########## #######
# System Managed Undo and Rollback Segments
########################## ########## #######
undo_tablespace=UNDOTBS1
Here is the contents of my listener.ora
# listener.ora Network Configuration File: D:\app\Administrator\produ ct\11.2.0\ dbhome_1\n etwork\adm in\listene r.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\Administrator\produ ct\11.2.0\ dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\ Administra tor\produc t\11.2.0\d bhome_1\bi n\oraclr11 .dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai n.Local)(P ORT = 1521))
)
)
ADR_BASE_LISTENER = D:\app\Administrator
Here is the contents of my tnsnames.ora
# tnsnames.ora Network Configuration File: D:\app\Administrator\produ ct\11.2.0\ dbhome_1\n etwork\adm in\tnsname s.ora
# Generated by Oracle configuration tools.
ORACLE1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl.Falcon-Domain.Local)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai n.Local)(P ORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.Falcon-Domain.Local)
)
)
Service "CLRExtProc" has 1 instances(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service ...
Handlers(s):
"DEDICATED" established:346 refused 0
LOCAL SERVER
Service "orcl.Falcon-Domain.Local"
Instance "orcl", status READY, has 1 handler(s) for this service ...
Handlers(s):
"DEDICATED" established:346 refused 0 state:blocked
LOCAL SERVER
Service "orclXDB.Falcon-Domain.loc
Instance "orcl", status READY, has 1 handler(s) for this service ...
Handlers(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: WINSVR-FALCON, pid 9300>
(ADDRESS=(PROTOCOL=tcp)(HO
When I try to connect in sql plus to any user using an alias I get
ORA-12516: TNS:listener could not find available handler with matching protocol stack.
When I try to connect / as sysdba i get
ERROR: ORA-00020: maximum number of processes (300) exceeded.
Here is the contents of my init.ora
##########################
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
##########################
##########################
# Cache and I/O
##########################
db_block_size=8192
##########################
# Cursors and Library Cache
##########################
open_cursors=300
##########################
# Database Identification
##########################
db_domain=Falcon-Domain.Lo
db_name=orcl
##########################
# File Configuration
##########################
control_files=("D:\app\Adm
db_recovery_file_dest=D:\a
db_recovery_file_dest_size
##########################
# Miscellaneous
##########################
compatible=11.2.0.0.0
diagnostic_dest=D:\app\Adm
memory_target=1288699904
##########################
# Processes and Sessions
##########################
processes=300
##########################
# Security and Auditing
##########################
audit_file_dest=D:\app\Adm
audit_trail=db
remote_login_passwordfile=
##########################
# Shared Server
##########################
dispatchers="(PROTOCOL=TCP
##########################
# System Managed Undo and Rollback Segments
##########################
undo_tablespace=UNDOTBS1
Here is the contents of my listener.ora
# listener.ora Network Configuration File: D:\app\Administrator\produ
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\Administrator\produ
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai
)
)
ADR_BASE_LISTENER = D:\app\Administrator
Here is the contents of my tnsnames.ora
# tnsnames.ora Network Configuration File: D:\app\Administrator\produ
# Generated by Oracle configuration tools.
ORACLE1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl.Falcon-Domain.Local)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WINSVR-FALCON.Falcon-Domai
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.Falcon-Domain.Local)
)
)
If the database is blocked somehow (maximum processes exceeded), then I believe it "blocks" itself in the listener to stop more incoming connections... as shown here "state:blocked":
You should increase the number of processes and restart your database... or a probably better solution is to find out who is using so many connections:
If you had your database hard-wired into the listener.ora via SID_LIST, then you won't get the listener error... but you still won't be able to connect to the database because of the sessions issue. The simple solution is to increase the processes and restart the database (Taking a backup of the spfile in text format before doing so... just in case you need it):
Service "orcl.Falcon-Domain.Local" has 1 instances(s).
Instance "orcl", status READY, has 1 handler(s) for this service ...
Handlers(s):
"DEDICATED" established:346 refused 0 state:blocked
LOCAL SERVER
You should increase the number of processes and restart your database... or a probably better solution is to find out who is using so many connections:
select username, machine, count(*)
from v$session
group by username, machine
order by username, machine;
If you had your database hard-wired into the listener.ora via SID_LIST, then you won't get the listener error... but you still won't be able to connect to the database because of the sessions issue. The simple solution is to increase the processes and restart the database (Taking a backup of the spfile in text format before doing so... just in case you need it):
create pfile='/tmp/initSID.ora' from spfile;
alter database set processes=600 scope=spfile;
shutdown immediate
startup
if you're running out of processes, it could be because the client code is connecting multiple times but is not disconnecting thus creating orphan sesssions. if you're sure every client is cleaning up after itself then increase the processes/sessions parameters as noted above.
ASKER
Ok, what is happening here is that there is a user named SYSMAN that is spawning sessions. The only thing running is the database. I'm not launching my application at all. If I run SELECT COUNT(*), USERNAME FROM V$SESSION GROUP BY USERNAME; I see that I have 4 lines.
COUNT(*) USERNAME
--------------- -------------------------- ---------- ---------- ---------- ----------
21
55 SYSMAN
1 DBSNMP
1 SYS
The SYSMAN user will continue to increase until it goes over what ever I've set as the maximum processes (currently 300). I've installed 11G on a few other systems and haven't had this problem so I'm confused as to what may be causing it here.
COUNT(*) USERNAME
--------------- --------------------------
21
55 SYSMAN
1 DBSNMP
1 SYS
The SYSMAN user will continue to increase until it goes over what ever I've set as the maximum processes (currently 300). I've installed 11G on a few other systems and haven't had this problem so I'm confused as to what may be causing it here.
that's your enterprise manager agent. It shouldn't continue to grow like that. You may need to resintall it or you've encountered a bug.
as a workaround you could create a profile with SESSIONS_PER_USER set to some limit and then assign SYSMAN to that profile and simply let it fail when it tries to exceed that limit
as a workaround you could create a profile with SESSIONS_PER_USER set to some limit and then assign SYSMAN to that profile and simply let it fail when it tries to exceed that limit
I'm paranoid by nature, so can we rule out something else connecting as SYSMAN? It should only be Enterprise Manager... but just in case:
select username, machine, program, count(*)
from v$session
where username is not NULL
group by username, machine, program
order by 1,2,3;
ASKER
Thanks, before you responded I shut down a service which seems to have fixed the problem. But I'm not sure what they do and if they are critical to me. The service I shut down was oracledbconsole<sid>. Is this a service I need and what does it do?
It's the enterprise manager console to administrate/maintain the local database.
https://www.experts-exchange.com/questions/23656620/What-does-the-OracleDBConsole-sid-service-do.html
I presume you want Enterprise Manager to start/stop, manage your database? If not, then turn it off... but it does sound there is a bug or misconfiguration somewhere in there.
ASKER
I think there is too. I appreciate the help. I'm still trying to find out what the root problem is and when I do I'll close this questions. But the queries you provided really helped me to find out what was spawning the processes.
ASKER
Ok, here is what I did to fix this and I'm not sure what the problem was, but when the database was created, the domain name was being attached to every reference to the sid "orcl.Falcon-Domain.Local" . The sid name was orcl. So I uninstalled and reinstalled but this time forced the sid name to orcl only and after that had no problems. I still would love to know what the problem is.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
post text with cut-and-paste rather than screen captures - easier for you, easier for us, less data faster downloads, allows for cut-n-paste for the output back into answers as needed
win-win-win-win