1 LISTENER 2 DATABASES
Dear legends,
I have a doubt that if i work on single DB with single Listener it works fine.. but after that i created another DB using the same listener.. Now what's the prob is in EM i can access both the DB's but while in case of CMD am listening only to the Second DB.. I cant access the First DB in CMD..
1st DB - orcl
2nd DB - Oracledb2
Q1. Does Oracle supports the future of Handling multiple DB's with Single Listener or not?
Any kind of help would be appreciated..
Regards,
Karthik
My Listener Control
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.1.0.7.0 - Produ
ction
Start Date 04-APR-2012 11:31:12
Uptime 0 days 4 hr. 46 min. 42 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File E:\app\Administrator\product\11.1.0\db_1\network\admin
\listener.ora
Listener Log File e:\app\administrator\diag\tnslsnr\Server\listener\aler
t\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Server)(PORT=1521)))
Services Summary...
Service "oracledb2" has 1 instance(s).
Instance "oracledb2", status READY, has 1 handler(s) for this service...
Service "oracledb2XDB" has 1 instance(s).
Instance "oracledb2", status READY, has 1 handler(s) for this service...
Service "oracledb2_XPT" has 1 instance(s).
Instance "oracledb2", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
LISTENER.ORA
# listener.ora Network Configuration File: E:\app\Administrator\product\11.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = Server)(PORT = 1521))
)
Similar Messages
-
Oracle Listener / database error
When I try to connect to the database (10g) I get:
Oracle Connection Error received : Unable to make conection, ORA-12514: TNS:listerner does not currently know of service requested in connect descriptor.
I used it before and it was working fine, I tried to fix it by using the TNSPING orcl command, but no luck, so how can I fix this?
Thanks in advance!You can try to fix the error following Oracle Error Desciption,
First to make sure your database is up and running.
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Cause: The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
Action: - Wait a moment and try to connect a second time.
- Check which services are currently known by the listener by executing: lsnrctl services <listener name>
- Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.
- If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.
- Check for an event in the listener.log file. -
Unable to auto start database/listener/EM on Oracle Enterprise Linux 5
All Experts
I have install oracle 11g on Oracle Enterprize Linux 5 successfully.
done all post installating steps, but when i restart server oracle listener/database/EM not automatically start.
Please guide what is wron (server dbora error: /bin/sh: :No such file or directory).
1. Log in as the root user
2. Edit the oratab file (SID=Y)
3. Create a file called dbora
4.Run chmod and chgrp on the dbor file
# chgrp dba dbora
# chmod 750 dbora
6.Creat symbolic links to the dbora script
# ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
7. add service
# chkconfig --add dbora
# chkconfig –list dbora
0:off 1:off 2:off 3:on 4:off 5:on 6:off
# ls -l /etc/rc*.d/*dbora
# !/bin/sh -X
# chkconfig: 35 99 10
# description: Start and stop the Oracle database, listener, EM, and iSQLPlus
# Change the value of ORACLE_HOMe to specify the correct Oracle Home Firectory for your installation.
# Change the value of ORACLE to the login name of the oracle owner at your site
ORACLE_HOME=/oradisk/app/oracle/product/11.1.0/db
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST="hostname"
PLATFORM="uname"
export ORACLE_HOME PATH
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case $1 in
'start')
su - $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
'stop')
su - $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
echo "usage: $0 {start|stop}"
exit
esac
exitdoes the script work when you log on to your freshly started system, logon as root and execute /etc/init.d/dbora start?
the script does not have to have group membership of the dba group.
also, do not create symlinks yourself.
by adding the service using chkconfig the script is started and stopped as indicated by chkconfig --list, no need to do additional steps like creating symlinks. -
Listeneing to a Change Table in a Database
Dear Java Coders,
I would like to code a universal database synchronizer, I'm stuck at planning the project.
My software is server-side; configuration files are in XML and Databases are universally configured via the configuration files. Now my only "Newbie" difficulty I see, is a Listener for Database Data Change. For eg.
Database A : id = 01 < ==| Change Listener |== > Database B : id =02
Can someone please advise me on this ?Hi,
you can write your own Listener-methods.
Create an interface and implement in Database B this interface, in Database A implement a second interface that adds the Database B Listener to an array. If Database A will be changed call the interfaceDatabaseB-method.
This should work.
Sabine
Listener: Database B implements ListenerInterface
ListenerInterface
=> method callListener()
Caller : Database A implements ListenerCallerInterface
ListenerCallerInterface
=> method addListener -
Unable start up the Enterprise Manager is not able to connect to database
hi,
i am unable to start up the Enterprise Manager is not able to connect to the database instance.
This is the status
Host
chinna
Port
1521
SID
orcl
Oracle Home
C:\app\Administrator\product\11.1.0\db_3
Listener
Status
Down
Host
akil
Port
1521
Name
LISTENER
Oracle Home
C:\app\Administrator\product\11.1.0\db_3
Location
C:\app\Administrator\product\11.1.0\db_3\network\admin
Details TNS-12541: TNS:no listener
Agent Connection to Instance
Status
Failed
Details ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)Hi,
Details ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)Please check Listener, Database and enterprise manager Service is up and running.
regards,
Xaheer -
"dbstart" error in oracle 10g database in LINUX
Hi,
i have oracle 10g database in LINUXwhen i give "dbstart" command under oracle database bin folder, i get following error
"Failed to auto-start Oracle Net Listene using /ade/vikrkuma_new/oracle/bin/tnslsnr"
how can i fix this error.
i want to make oracle listener, database and EM db console as auto start during system start up.
i think if this dbstart command is not working, then i am not sure how else can i make them autostart
how can i acheive this.
Thanks in Advance,
Philip.--- Posted: Oct 19, 2005 3:38 PM
lol, I believe he must have figured it out one way or another. -
Oracle 9i R2 EE XP Professional Listener Problem
One embarrased Oracle DBA. I've successfully installed Oracle on so many windows platforms that I've lost track.
The specs:
Dell Inspiron 5100
Windows XP Professional 2002 SP 1
2.66 GHz P4 CPU
512 MB RAM
1 GB Pagefile (swap)
Macafee Virus Protection (disabled)
Macaffee Firewall (disabled)
XP Firewall disabled in communication settings
Oracle 9i Release 2 EE base release
Processes = 150
Sessions = 170
shared_pool_size = 50 MB (tried setting as high as 150 MB)
I've tried every trick in the book
1. Clean de-install, reinstall
2. listener start with and without listener.ora
3. Enabling and disabling MTS (shared server)
4. LAN connection enabled (w/ appropriate parameters)
5. Standalone mode (no networking) w/ appropriate parameters
5. Increasing init.ora parms for memory, processes and sessions to ridiculous levels
6. Different listener ports other than 1521
7. deleting and recreating listener service
8. deleting and recreating Oracle service (oradim)
9. setting USE_SHARED_SOCKET in Oracle registry (in case the firewall was interfering with listener ports)
10. setting TNS_ADMIN (not relevant since there is only one Oracle Home
11. made sure ORACLE_SID was set in Oracle registry
12. setting ORACLE_SID and ORACLE_HOME at the command line and restarting listener/database in command window
13. Turning on listner and client tracing to admin level
14. ad infinitem
Tracing didn't reveal anything meaningful. I was able to briefly get a connection working (connecting on the laptop via SQL*NET to the local database) using MTS for about 3 minutes then it started malfunctioning again.
WHEN USING MTS (SHARED SERVER) TRACE ERROR MSG
*** 2003-11-07 08:51:07.000
network error encountered setting up listening port
listening address for dispatcher is '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'
NS Primary Error: TNS-12532: TNS:invalid argument
NS Secondary Error: TNS-12560: TNS:protocol adapter error
NT Generic Error: TNS-00502: Invalid argument
32-bit Windows Error: 22: Invalid argument
SQLNET LOG ERROR
Fatal NI connect error 12560, connecting to:
(LOCAL=NO)
VERSION INFORMATION:
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
Time: 09-NOV-2003 08:10:36
Tracing not turned on.
Tns error struct:
nr err code: 0
ns main err code: 12560
TNS-12560: TNS:protocol adapter error
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
LISTNER.LOG
TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production on 09-NOV-2003 08:10:23
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
System parameter file is C:\oracle\ora92\network\admin\listener.ora
Log messages written to C:\oracle\ora92\network\log\listener.log
Trace information written to C:\oracle\ora92\network\trace\listener.trc
Trace level is currently 0
Started with pid=3512
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SARATOGA1)(PORT=1521)))
TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
09-NOV-2003 08:10:25 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Greg))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=153092352)) * status * 0
09-NOV-2003 08:10:36 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=oemdb.saratoga1)(CID=(PROGRAM=C:\oracle\ora92\bin\sqlplus.exe)(HOST=SARATOGA1)(USER=Greg))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.0.0.1)(PORT=1384)) * establish * oemdb.saratoga1 * 12500
TNS-12500: TNS:listener failed to start a dedicated server process
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
32-bit Windows Error: 109: Unknown error
WINDOWS EVENT VIEWER
The OracleOraHome92TNSListener service terminated unexpectedly. It has done this 2 time(s).Just from startup after about 1 minute oracle.exe has 24,755 page faults. Is there an issue with virtual memory and Oracle 9.2 on Win XP Pro?
C:\DOCUME~1\GREG>lsnrctl start
LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-NOV-2003 14:18:
33
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production
System parameter file is C:\oracle\ora92\network\admin\listener.ora
Log messages written to C:\oracle\ora92\network\log\listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SARATOGA1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Produc
tion
Start Date 10-NOV-2003 14:18:35
Uptime 0 days 0 hr. 0 min. 2 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File C:\oracle\ora92\network\admin\listener.ora
Listener Log File C:\oracle\ora92\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SARATOGA1)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "oemdb.saratoga1" has 1 instance(s).
Instance "oemdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully -
Database connection getting stuked
Hi,
I am using oracle 9i R2 on Windows XP. I am in big trouble. Most of the time while getting connection to database, connection is stuked and finally become hung. I have checked service is alread started for Listener & Database. If I manually stop & start that both service, sometimes it is OK and able to get the connection. But sometime manually restart PC then get the connection.
Please help me what can I do ....
Thanks
NiloyHi,
Right now I am trying to get connection but stuked. Alert log message is as follows :
Fri Mar 18 12:29:47 2011
starting up 1 shared server(s) ...
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Fri Mar 18 12:29:52 2011
alter database mount exclusive
Fri Mar 18 12:29:59 2011
Successful mount of redo thread 1, with mount id 3059996737.
Fri Mar 18 12:29:59 2011
Database mounted in Exclusive Mode.
Completed: alter database mount exclusive
Fri Mar 18 12:30:00 2011
alter database open
Fri Mar 18 12:30:05 2011
Beginning crash recovery of 1 threads
Fri Mar 18 12:30:06 2011
Started first pass scan
Fri Mar 18 12:30:13 2011
Completed first pass scan
3512 redo blocks read, 67 data blocks need recovery
Fri Mar 18 12:30:14 2011
Started recovery at
Thread 1: logseq 18, block 7203, scn 0.0
Recovery of Online Redo Log: Thread 1 Group 2 Seq 18 Reading mem 0
Mem# 0 errs 0: E:\ORACLE\ORADATA\SUPPORT\REDO02.LOG
Fri Mar 18 12:30:18 2011
Ended recovery at
Thread 1: logseq 18, block 10715, scn 0.49318939
67 data blocks read, 67 data blocks written, 3512 redo blocks read
Crash recovery completed successfully
Fri Mar 18 12:30:30 2011
Thread 1 advanced to log sequence 19
Thread 1 opened at log sequence 19
Current log# 3 seq# 19 mem# 0: E:\ORACLE\ORADATA\SUPPORT\REDO03.LOG
Successful open of redo thread 1.
Fri Mar 18 12:30:32 2011
SMON: enabling cache recovery
Fri Mar 18 12:30:49 2011
Undo Segment 1 Onlined
Undo Segment 2 Onlined
Undo Segment 3 Onlined
Undo Segment 4 Onlined
Undo Segment 5 Onlined
Undo Segment 6 Onlined
Undo Segment 7 Onlined
Undo Segment 8 Onlined
Undo Segment 9 Onlined
Undo Segment 10 Onlined
Successfully onlined Undo Tablespace 1.
Fri Mar 18 12:30:49 2011
SMON: enabling tx recovery
Fri Mar 18 12:30:49 2011
Database Characterset is WE8MSWIN1252
Fri Mar 18 12:31:01 2011
replication_dependency_tracking turned off (no async multimaster replication found)
Completed: alter database open
Please Check ...
Thanks
Niloy -
I want to connect it to the database 10g to oracle 9i
How can i do that? is it possible???
I am getting error TNS-12541: TNS: no listener
database on my laptop is 10g XE ADDITION on XP
and on server it is 9.2.0.2
As far as I know client software should be lesser or equaluser9007339 wrote:
How can i do that? is it possible???
I am getting error TNS-12541: TNS: no listener
database on my laptop is 10g XE ADDITION on XP
and on server it is 9.2.0.2
As far as I know client software should be lesser or equalThe relationship bet. client and server is even looser than that.
Use copy and paste to show the actual sqlplus command you use, and the exact response.
Here's a primer on how a tns connection works. This should help you systematically track down the problem
=================================
Assume you have the following in your tnsnames.ora: (client machine)
larry =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = curley)
)Now, when you issue a connect, say like this:
$> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Next, tns sends a request to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
Next, the request arrives at port 1521 on myhost. Hopefully, there is a listener on myhost configured to listen on port 1521, and that listener knows about SERVICE_NAME = curley. If so, you'll be connected.
A couple of important points.
First, the listener is a server side only process. It's entire purpose in life is the receive requests for connections to databases and set up those connections. Once the connection is established, the listener is out of the picture. It creates the connection. It doesn't sustain the connection. One listener, running from one oracle home, listening on a single port, will serve multiple database instances of multiple versions running from multiple homes. It is an unnecessary complexity to try to have multiple listeners. That would be like the telephone company building a separate switchboard for each customer.
Second, the tnsnames.ora file is a client side issue. It's purpose is for address resolution - the tns equivalent of the 'hosts' file further down the network stack. The only reason it exists on a host machine is because that machine can also run client processes.
What can go wrong?
First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't find your telephone directory (tnsnames.ora) or can't find the party you are looking for listed in it (no entry for larry)) you don't look for problems at the telephone switchboard.
Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor" -
Whenever i start my database i want to SET my ORACLE HOME & PATH.
Hi,
I have installed my ORACLE 10g on RHEL 5.I have created a starter database named orcl.I have exported my ORACLE_HOME,PATH and SID.Then i Start the listener,database,dbconsole. I have got the connection to my database also, but the problem is whenever i quit the terminal i want to reset the entire thing once more.Is there any other option to start the instance without resetting the ORACLE_HOME,SID,PATH.
Plz help me...Hi,
there are 2 ways to set your environment:
1) Make amendments to your profiles in .profile
As with every Oracle installation you need settings for different Oracle instances, so you can have your options:
echo
echo "Available Oracle environments are:"
echo " 1 - Head Office (Oracle10g)"
echo " 2 - Oracle Application Ser. (Oracle10gAS)"
echo
echo "\n Oracle environment [1] ? \c"
read C
if [ "$C" -ne '1' -a "$C" -ne '2' ]
then
C=1
echo "Default set to ${C}."
fi
case $C in
1) export ORACLE_SID=mydb1
export ORAVER=10.2.0
export UID=oracle10
export ORACLE_HOME=$ORACLE_BASE/$UID/$ORAVER/oracleDB
export ORACLE_HOME_AS=$ORACLE_BASE/$UID/10.1.0/oracleAS
export ORAKITPATH=$ORACLE_HOME/oraterm/admin/resource
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LIBPATH=$ORACLE_HOME/lib
export TNS_ADMIN=/etc
unset SRCHOME
export NLS_LANG="ENGLISH_UNITED KINGDOM.UTF8"
export NLS_LANGUAGE=ENGLISH
export NLS_TERRITORY="UNITED KINGDOM"
export NLS_DATE_FORMAT='DD/MM/RRRR'
export NLS_NUMERIC_CHARACTERS=".,"
2)
export ORACLE_SID=mydb2
export ORAVER=10.1.0
export UID=oracle10
export ORACLE_HOME=$ORACLE_BASE/$UID/$ORAVER/oracleAS
export ORACLE_HOME_AS=$ORACLE_BASE/$UID/10.1.0/oracleAS
export ORAKITPATH=$ORACLE_HOME/oraterm/admin/resource
export ORA_NLS10=$ORACLE_HOME/nls/data
# Oracle says this is for 64-bit calling applications...
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LIBPATH=$ORACLE_HOME/lib
export TNS_ADMIN=/etc
export TWO_TASK=mydb2
unset SRCHOME
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export NLS_LANGUAGE=ENGLISH
export NLS_TERRITORY="UNITED KINGDOM"
export NLS_DATE_FORMAT='DD/MM/RRRR'
export NLS_NUMERIC_CHARACTERS=".,"
*) echo
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo ! Wrong Choice, try again : . ./.profile !
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
esacBut then you have to logout/login or run your profile to change the settings:
. .profile
2) run ". oraenv" that will ask you how to reset the variables.
Regards,
Ryszard -
ODBC-datasource generating ORA-12154 (possible listener issue)
Hi,
I am trying to configure ao ODBC-datasoure from a client (using instant client 11.2) to a 11.2g Oracle DB server. The database listener is configured to use a non standard port 1700 in this case.
There is a firewall between the client and the server which is configured to allow connections to the database server on the specified port, when I use telnet from the client to the server, the connection opens on this port, but when I try to test the odbc-datasource I have configured ig et the error ORA-12154.
The link below outlines the details of the error:
http://ora-12154.ora-code.com/
To the context should be added, that there is no problem to use SQL Plus from a computer behind the firewall to connect to the database server using the TNS name that is being used in the ODBC-datasource.
I have tried to configure the odbc-datasource using both a tns_names.ora file, and also directly in the odbc-datasource using //[ip address] : [port]/TNS_NAME. Both ways of configuring the odbc-datasource generates the same error. I am currently suspecting that the error might be due to some sort of connection redirection on the part of the tns listener on the database server which triggers the firewall to terminate the connection. Could this be the case?
Does anyone have any suggestions what this error might be caused by. Any suggestions on how to continue my troubleshooting would also be valueble. Further, what kind of configuration would need to be inplace, on the tns-listener / database server side to make this sort of configuration to work.
Finally, I should also ask that I have tested the same ODBC-datasource configuration in a test system without any firewall inbetween, and that configuration works fine, so there seems to be no problem with the client software configuration per se.
Any help is apprichated.
/EaglecothCabelcow wrote:
I managed to solve this issue myself.
Since there seems to be some problem locating the server I added "HOSTNAME" to the following line in the SQLNET.ORA file on the server:
names.directory_path = (HOSTNAME,TNSNAMES)
This solved the issue by using the following syntax in the ODBC Configuration:
TNS Service Name: [ip-address]:[port]/[TNS NAME]
Where the TNS_NAME should be that of the TNS_NAME for the database defined in the TNSNAMES_ORA at the server. Note that this value is case sensetivetnsnames.ora is ONLY used by the client side application. It is the tns complement to the local 'hosts' file. It is used by the CLIENT to resolve an alias (tns net service name) to a host (ultimately an ip), port, and service name. Your assertion that the tns_name should be ... hmm, now that I read that again, are you saying that the tnsnames entry on the client should match the one in the tnsnames file on the server? If so, yes and no. There is no technical requirement that they match. It is simply that it is usually assumed that the one on the server is correct and may be used as a model for what to do on the client. The server - acting as a server - doesn't even use the tnsnames.ora file. It exists on the server only to support any client process that may happen to be running on the same box as the db.
Maybe this will help you understand the connections
=================================
ORA-12154: TNS:could not resolve the connect identifier specified
This error means one thing, and one thing only. The client could not find the specified entry in the tnsnames.ora file being used.
As a follow-on to that statement, remember that when you use a dblink, the database in which the link is defined is acting as a client to the database that is the target of the link. So in this case, the tnsnames.ora file on the host of your source should have an entry for your target db, as defined in the db_link.
And for the umpteenth time ... this error has <b><i><u>NOTHING</u></i></b> to do with the status of a listener. The connection request never got far enough to reach a listener. If anyone tells you to check a listener in response to ora-12154, they are not paying attention, or do not understand how TNS works. This error is the equivalent of not being able to place a telephone call because you don't know the number of the party you want to reach. You wouldn't debug that situation by going to the other guy's house and testing his telephone, or by going to the phone company and testing the switchboard. And you don't debug a ORA-12154 by checking the listener. If I had a top ten list of "Incredibly Simple Concepts (tm)" that should be burned into the brain of everyone who claims to be an Oracle DBA, it would include "ORA-12154 Has Nothing To Do With The Listener".
=================================
A couple of important points.
First, the listener is a server side only process. It's entire purpose in life is to receive requests for connections to databases and set up those connections. Once the connection is established, the listener is out of the picture. It creates the connection. It doesn't sustain the connection. One listener, with the default name of LISTENER, running from one oracle home, listening on a single port, will serve multiple database instances of multiple versions running from multiple homes. It is an unnecessary complexity to try to have multiple listeners or to name the listener as if it belongs to a particular database. That would be like the telephone company building a separate switchboard for each customer.
Additional notes on the listener: One listener is capable of listening on multiple ports. But please notice that it is the listener using these ports, not the database instance. You can't bind a specific listener port to a specific db instance. Similarly, one listener is capable of listnening on multiple IP addresses (in the case of a server with multiple NICs) But just like the port, you can't bind a specific ip address to a specific db instance.
Second, the tnsnames.ora file is a client side issue. It's purpose is for address resolution - the tns equivalent of the 'hosts' file further down the network stack. The only reason it exists on a host machine is because that machine can also run client processes.
Assume you have the following in your tnsnames.ora:
larry =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = curley)
)Now, when you issue a connect, say like this:
$> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Finding it, tns sends a request through the normal network stack to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
Next, the standard networking process delivers the message to port 1521 on myhost. Hopefully, there is a listener on myhost configured to listen on port 1521, and that listener knows about SERVICE_NAME = curley. If so, the listener will spawn a server process to act as the intermediary between your client and the database instance. Communication to the server process will be on a randomly selected available port. At that point the listener is out of the process and continues to user port 1521 to await other connection requests.
What can go wrong?
First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't find your telephone directory (tnsnames.ora) or can't find the party you are looking for listed in it (no entry for larry)) you don't look for problems at the telephone switchboard.
Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
Third: If the client is on the same machine as the db instance, it is possible to connect without referencing tnsnames and without going through the listener.
Now, when you issue a connect, say like this:
$> sqlplus scott/tigertns will attempt to establish an IPC connection to the db instance. How does it know the name of the instance? It uses the current value of the enviornment variable ORACLE_SID. So...
$> export ORACLE_SID=fred
$> sqlplus scott/tigerIt will attempt to connect to the instance known as "fred". If there is no such instance, it will, of course, fail. Also, if there is no value set for ORACLE_SID, the connect will fail.
check executing instances to get the SID
[oracle@vmlnx01 ~]$ ps -ef|grep pmon|grep -v grep
oracle 4236 1 0 10:30 ? 00:00:00 ora_pmon_vlnxora1set ORACLE_SID appropriately, and connect
[oracle@vmlnx01 ~]$ export ORACLE_SID='vlnxora1
[oracle@vmlnx01 ~]$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:37 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsNow set ORACLE_SID to a bogus value, and try to connect
SQL> exit
[oracle@vmlnx01 ~]$ export ORACLE_SID=FUBAR
[oracle@vmlnx01 ~]$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:57 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Enter user-name: Now set ORACLE_SID to null, and try to connect
[oracle@vmlnx01 ~]$ export ORACLE_SID=
[oracle@vmlnx01 ~]$ sqlplus /scott/tiger
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:43:24 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specifiedOk, that is how we get from the client connection request to the listener. What about the listener's part of all this?
The listener is very simple. It's job is to listen for connection requests and make the connection (server process) between the client and the database instance. Once that connection is made, the listener is out of the picture. If you were to kill the listener, all existing connections would continue. The listener is configured with the listener.ora file, but if that file doesn't exist, the listener is quite capable of starting up with all default values. One common mistake with the listner configuration is to specify "HOST=localhost" or "HOST=127.0.01". This is a NONROUTABLE ip address. LOCALHOST and ip address 127.0.0.1 always mean "this machine on which I am sitting". So, all computers are known as "localhost" or "127.0.0.1". If you specify this address, the listener will only be capable of receiving requests from the machine on which it is running. If you specified that address in your tnsnames file - on a remote client machine - the request would be routed to the machine on which the requesting client resides. Probably not what you want.
===================================== -
Scripts dbconsole,listener,etc,...
Hi when I shutdown;
the dbconsole service,listener,database is also closed. Where can I find the scripts, so that I dont have to rerun the services, open database,etc...
Message was edited by:
Ricardinhohow can I configure dbstart so that when I restart
machine the db is opened automaticallyThis is platform dependent. If you are running unix, they have different ways of setting auto startup for applications/programs/scripts (not only for Oracle).
So you need to know or mentioned what OS you are running, then you can get information on what to pass to the unix startup.
But as I said, you still need to update and bulk these together in a script to be able to start Database, DB Console and Listener at the same time, then pass the unix scriptup -
HTML DB 10g installation problem on linux HTTP-503 ORA-604
I have a problem after the installation of HTML DB from the linux 10g R2 companion image.
I installed HTML DB and HTTP server in one go, on an new system that only has the default orcl database installed. I run Red Hat enterprise linux on a x86_64 system.
The HTML DB installation took a long time, but gave no errors.
When I access the http://hostname:7777/pls/htmldb url I get an This server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.-error.
But :7777 works fine and give me the http server default page.
In my Apache error log I see the following errors:
[Thu Dec 8 13:28:42 2005] [error] [client 10.11.121.20] [ecid: 1134048522:10.14.66.23:28193:0:1,0] mod_plsql: /pls/htmldb/htmldb HTTP-503 ORA-604
I looked at several internet sources, played with my marvel.conf and my dads.conf but to no avail. My oracle home is different from my html db home. There is no ./network/admin/tnsnames.ora in my HTML_DB _HOME. Should there be? One solution in the faq even told me to copy the htmldb tnsnames.ora over my db tnsnames.ora, but the installation did not create one for me.
When should I use a dads.conf instead of marvel.conf? I don't understand the need for this second file. I tried to also use it, because some solutions and the post-installation instructions hinted on doing it. But then I get a different error in the logs about a double DAD.
When I login through sqlplus in the orcl database with the HTMLDB_PUBLIC_USER and my password (that was created during the installation) it works, but I don't see any tables (yet?). So the account is not locked. But should I see some tables when I do select table_name from user_tables; ?
I probably missing something obvious here, but I'm a bit of a oracle newby.
Any help is appreciated,
ErikThanks Diemar,
It worked.
I stopped all oracle process and services.
I then logged out and in again as oracle to see if the unset stuck.
I then started my listener, databases, isqlnet and em.
I then started the httpd with:
${HTMLDB_HOME}/opmn/bin/opmnctl start
opmnctl: opmn started
${HTMLDB_HOME}/opmn/bin/opmnctl startproc
this still gave some errors and the httpd was not started:
ias-component=HTTP_Server
opmnctl: starting opmn managed processes...
================================================================================opmn id=aberlour.uni.mdx.ac.uk:6200
0 of 1 processes started.
ias-instance id=standalone
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ias-component/process-type/process-set:
HTTP_Server/HTTP_Server/HTTP_Server
Error
--> Process (pid=3389)
failed to start a managed process after the maximum retry limit
Log:
/mdx/app/oracle/product/10.2.0/http/opmn/logs/HTTP_Server~1
last lines in this log where:
05/12/08 15:18:50 Stop process
/mdx/app/oracle/product/10.2.0/http/Apache/Apache/bin/apachectl stop: httpd stopped
05/12/08 15:31:55 Start process
/mdx/app/oracle/product/10.2.0/http/Apache/Apache/bin/apachectl start: execing httpd
05/12/08 15:31:57 Start process
/mdx/app/oracle/product/10.2.0/http/Apache/Apache/bin/apachectl start: execing httpd
I then added the PlsqlNLSLanguage line back into the marvel.conf
which now looks:
AddType text/xml xbl
AddType text/x-component htc
Alias /i/ /mdx/app/oracle/product/10.2.0/http/Apache/Apache/images/
<Location /pls/htmldb>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_manager.process_download
PlsqlDatabaseConnectString xxxxxx.xxxxx.ac.uk:1521:orcl ServiceNameFormat
PlsqlNLSLanguage "ENGLISH_UNITED KINGDOM.AL32UTF8"
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername HTMLDB_PUBLIC_USER
PlsqlDefaultPage htmldb
PlsqlDatabasePassword @BWIuxxxxxxxxxxxxxxxxxxxxxxid4Y4t8b9g==
Allow from all
</Location>
and I started the http again, and it works fine.
Problem solved. I will try to fine tune it so I'll get the basic LANG setting back in linux but without the .UTF-8 postfix.
thanks for your help,
Erik -
Hi,
I am preparing to install Oracle 8i on my Windows NT machine,
and I stumped into something that I can find no answer for.
Oracle asks me to say what my domain name is (e.g. suse.com). It
uses this to manage the different Oracle instances, e.g.,
server1.suse.com and server2.suse.com. Well, the problem is that
our machines do not have our domain name. That is, the machine I
am using (as well as all our servers) does not have a DNS name
xxx.intelsystech.com. Their names are managed by our ISP, and
for all I know they change it once in a while. Our machines do
have unique IP numbers, though (e.g. 43.25.44.32). We have
managed to do just about everything else using these fixed IP
numbers (e.g. ftp, http, etc.). Also, names are not a problem
because all machines are in the Windows Active Directory domain,
and therefore have a "local" name (e.g. Monet) in the Windows
LAN.
What should I enter when Oracle asks for my domain name? And for
the machine name? Can I use the IP number? Or the IP pattern
(e.g. 43.25.44.)? How will I be able to refer to an Oracle
service (listener, database name) without a domain name?
Thanks,
TahaOracle asks me to say what my domain name is (e.g. suse.com). It
uses this to manage the different Oracle instances, e.g.,
server1.suse.com and server2.suse.com. These domain names are not the same as ip domain names. You need
the domain names only if you want to have different oracle db's
connected to each other, e.g. for replication.
If you are using this db alone, then just choose any name.
How will I be able to refer to an Oracle
service (listener, database name) without a domain name? You can use ip-addresses for listener and tnsnames, but it is
better to use dns-names.
Hop this helps.
Thomas -
Hello,
I am a newbie to GUIs in java. I am writing an application that has 4 buttons.
You can run the codes below to see how it looks.
I need it to connect to an oracle server when the "Connect to Server" button is clicked
If the connection is successful,It should set the text on lblStatus to "Connected", and the
"Get sales amount" and "Close connection" buttons should be enabled, while the
"Connect to server button be disable"
Otherwise a dialog box should pop up, displaying "Cannot connect to server").
If the "Get Sales amount" button is clicked, it should display a dialog box that will
accept user input for a store name and it should display the corresponding sales
value from the SALES table. If the user input is "all". It should display sale amount for all
stores in the SALES table.
If the "Close connection" button is clicked, it should close the connection to server
and display appropraite information in the lblStatus bar.
My codes
==================
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.event.*;
public class ConnectorDemo{
public static void main (String [] args) {
//Create window,its size, panel and add the message to be displayed at the bottom
JFrame frame = new JFrame("Java Coursework");
frame.setSize(350,220);
JPanel p = new JPanel(new BorderLayout());
p.add(new JLabel("Not connected"),BorderLayout.SOUTH);
// Create components,their equal sizes,locations and enable or disable them
JButton buttonOne;
buttonOne = new JButton("Connect to server");
buttonOne.setSize(220,30);
buttonOne.setEnabled(true);
buttonOne.setLocation(80,20);
JButton buttonTwo;
buttonTwo = new JButton("Get Sales Amount");
buttonTwo.setSize(220,30);
buttonTwo.setEnabled(false);
buttonTwo.setLocation(80,60);
JButton buttonThree;
buttonThree = new JButton("Close connection to server");
buttonThree.setSize(220,30);
buttonThree.setEnabled(false);
buttonThree.setLocation(80,100);
JButton buttonFour;
buttonFour = new JButton("Exit");
buttonFour.setSize(220,30);
buttonFour.setEnabled(true);
buttonFour.setLocation(80,140);
buttonFour.addActionListener (new ButtonFourListener());
// Add components to the window
frame.getContentPane().add(buttonOne);
frame.getContentPane().add(buttonTwo);
frame.getContentPane().add(buttonThree);
frame.getContentPane().add(buttonFour);
frame.getContentPane().add(p);
// Display window
frame.setVisible(true);
static class ButtonFourListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
JButton buttonFour = (JButton) e.getSource();
System.exit(0);
}//End listener
Database
================
CREATE TABLE SALES(
shop_name VARCHAR2(30),
sale_amount INTEGER);
INSERT INTO SALES VALUES('waitrose', 1500);
INSERT INTO SALES VALUES('argos', 1500);
INSERT INTO SALES VALUES('asda', 1500);
INSERT INTO SALES VALUES('tesco', 1500);You're going to need to create ActionListeners for the buttons, just like the ActionListener for button 4, except you'll want to do different things when the buttons are pressed. Here's a tutorial on ActionListeners and handling events: http://java.sun.com/docs/books/tutorial/uiswing/learn/example2.html#handlingEvents
-
ORA-00205: error in identifying control file..after installing ASM
Hi
I haveoracle database 10g running on a redhat4 mechine.
i have installed ASM and migrate my database to ASM.
I haven't any problem and everything was fine till i reboot the mechine for the first time after
installing ASM.
I got the ORA-00205: error in identifying control file, check alert log for more info
error when database was restarting
any one can help me out of this problem
many many thanks in advanceeventually I figured out what the problem is.
The problem is about my dbora file used to start my database.
this is the whole story!!!
I have a oracle 10gR2 installed on Redhat linux AS 4.
I have configured my database to work on ASM.All the configuration have set properly
and every thing is fine except the Automatic starting the database in time
the mechine is restarted.
when i restart the mechine with nothing in dbora(used to automatically start the database)
and start everything after logging into oracle user(listener ,database,Enterprise manager)
no problem(i can see my ASM instance database instance throught Enterprise managaer).
but when i use dbora to do that i get this error appear in enterprise manager
ORA-12528: TNS:listener: all appropriate instances are blocking new connections (DBD ERROR: OCIServerAttach)
this is the content of dbora:
s script is intended to allow the automated
# startup and shutdown of an oracle database server.
# Author: Sean O'Donnell <[email protected]>
# the user that oracle runs as (default: oracle)
ORACLE=oracle
# database instance id
ORACLE_SID=orcl
# ORACLE_HOME (file system) path
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
PATH=${PATH}:$ORACLE_HOME/bin
export ORACLE_SID ORACLE_HOME PATH
case $1 in
'start')
su - $ORACLE -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE -c "$ORACLE_HOME/bin/dbstart"
su - $ORACLE -c "$ORACLE_HOME/bin/emctl start dbconsole"
'stop')
su - $ORACLE -c "$ORACLE_HOME/bin/emctl stop dbconsole"
su - $ORACLE -c "$ORACLE_HOME/bin/dbshut"
su - $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop"
echo "usage: $0 {start|stop}"
esac
exit
What do u think could be the reason?!!!!
thank you in advance
Maybe you are looking for
-
As i turned on my iphone 4s on and connected to a wireless internet a page opened from the app firewall ip and i usually choose all connections. so it got stuck i held the standy by button but it won't turn off. so i held the standyby and home button
-
IWeb crashed. Most recent page (mostly) lost. Suggestions?
Okay, I've searched the forum and am afraid I already know the answer, but I'll post this anyway. On a month-old iMac (24 inch, 3.06 GHz), I was working on a page yesterday of vacation pictures. I keep pages of pictures of my daughter for out-of-town
-
Oracle Business Rules as a Web Service
I tried to implement the demo called: ruleenablewebservice, on a 10.1.3 server. When running I get this error in the JDeveloper: 2006-04-10 08:38:46.830 WARNING Unable to connect to URL: http://127.0.0.1:8888/RuleExamples-example1-context-root/exampl
-
I downloaded xcode and it trashed my development environment. I had previously installed an earlier version. My purchased apps page does not list XCODE. However, If I go to the XCODE download page in the App, it lists it as installed. Any suggestion
-
I am giving my iPhone to my wife and getting a new phone.
Should I completely restore the iPhone before I give it to her, what else do I need to do?