Urgent - no listener: no TNSLSNR.exe
Hello,
I had a probem with ODBC in that I couldn't do anything with it, nothing at all, so I had to reinstall the net8 tools for Oracle8i on a W2K server platform. While ODBC is now up and running the listener has now disappeared: the file TNSLSNR.exe is missing.
Any advice would very appreciated...
Hi,
I don't know too much about this to be honest but I have some suggestions so I'll throw my two cents worth in. A few things come to mind, first I'd check the client, the issue looks like its there, second check the local security setup and third if your using Active Directory there are special directory issues.
Hope this helps
Similar Messages
-
TNSLSNR.EXE - Application Error
We are running an Oracle 9i r2 DB on Windows 2000 (Active Directory). We recently encountered a problem when starting the external procedure listener service using a domain ID.
We tried using the LocalSystem account to start the service and it was working. However we are not comfortable using the LocalSystem account for starting the external procedure service due to security reasons.
We have already granted the Domain ID enough file access privs on the following folders:
c:\oracle\
c:\oracle\bin\
c:\oracle\lib\
c:\oracle\network\log\
c:\oracle\network\trace\
Error on Windows when starting the extproc listener service:
TNSLSNR.EXE - Application Error
The application failed to initialize properly (0xc0000142).
Error on lsnrctl (when we tried to start the listener service using lsnrctl):
Failed to start service, error 1053.
TNS-12536: TNS:operation would block
TNS-12560:TNS:protocol adapter error
TNS-00506: Operation would block
32-bit Windows Error: 997: Unknown errorWe are running an Oracle 9i r2 DB on Windows 2000 (Active Directory). We recently encountered a problem when starting the external procedure listener service using a domain ID.
We tried using the LocalSystem account to start the service and it was working. However we are not comfortable using the LocalSystem account for starting the external procedure service due to security reasons.
We have already granted the Domain ID enough file access privs on the following folders:
c:\oracle\
c:\oracle\bin\
c:\oracle\lib\
c:\oracle\network\log\
c:\oracle\network\trace\
Error on Windows when starting the extproc listener service:
TNSLSNR.EXE - Application Error
The application failed to initialize properly (0xc0000142).
Error on lsnrctl (when we tried to start the listener service using lsnrctl):
Failed to start service, error 1053.
TNS-12536: TNS:operation would block
TNS-12560:TNS:protocol adapter error
TNS-00506: Operation would block
32-bit Windows Error: 997: Unknown error -
I'm running 9i (9.0.1.1) on Windows 2000 Professional tnslsnr.exe crashes as soon as it is accessed.
Here is an example of what happens when I use tnsping with listener trace on.
Can anyone speak listener trace and tell me what is wrong?
C:\>tnsping odb1 5
TNS Ping Utility for 32-bit Windows: Version 9.0.1.1.1 - Production on 05-MAY-20
02 06:40:10
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
C:\oracle\ora90\network\admin\sqlnet.ora
C:\oracle\ora90\network\admin\tnsnames.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = MYLAPTO
P) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = ODB1)))
OK (4450 msec)
TNS-12547: TNS:lost contact
C:\>
Then I get a Program error dialog box
! TNSLSNR.exe has generated errors and will be closed by Windows. You will need to restart the program.
An error log is bein created.
here is my listener.ora
# LISTENER.ORA Network Configuration File: C:\oracle\ora90\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = MYLAPTOP)(PORT = 1521))
SID_LIST_LISTENER =
(SID_DESC =
(GLOBAL_DBNAME = ODB1)
(ORACLE_HOME = C:\oracle\ora90)
(SID_NAME = ODB1)
here is my tnsnames.ora
ODB1=(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = MYLAPTOP)
(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ODB1)
here is the listener.trc run at level 4
TNSLSNR for 32-bit Windows: Version 9.0.1.1.1 - Production on 02-MAY-2002 21:37:32
Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved.
--- TRACE CONFIGURATION INFORMATION FOLLOWS ---
New trace stream is C:\oracle\ora90\network\trace\listener.trc
New trace level is 4
--- TRACE CONFIGURATION INFORMATION ENDS ---
--- PARAMETER SOURCE INFORMATION FOLLOWS ---
Attempted load of system pfile source C:\oracle\ora90\network\admin\listener.ora
Parameter source loaded successfully
Attempted load of command line source
Parameter source was not loaded
-> PARAMETER TABLE LOAD RESULTS FOLLOW <-
Successful parameter table load
-> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = MYLAPTOP)(PORT = 1521)))
SID_LIST_LISTENER = (SID_DESC = (GLOBAL_DBNAME = ODB1) (ORACLE_HOME = C:\oracle\ora90) (SID_NAME = ODB1))
TRACE_LEVEL_LISTENER = USER
--- PARAMETER SOURCE INFORMATION ENDS ---
--- LOG CONFIGURATION INFORMATION FOLLOWS ---
Log stream will be "C:\oracle\ora90\network\log\listener.log"
Log stream validation requested
Log stream is valid
--- LOG CONFIGURATION INFORMATION ENDS ---
nsglldprm: Resolved "STARTUP_WAIT_TIME_LISTENER" to: 0
nsglma: Listener's pid=712
nttgetport: port resolved to 1521
nttbnd2addr: looking up IP addr for host: MYLAPTOP
nttcnp: Validnode Table IN use; err 0x0
nsopen: opening transport...
nttcnp: Validnode Table IN use; err 0x0
nttcnp: getting sockname
nsopen: transport is open
nsopen: global context check-in (to slot 0) complete
nsgllsn: completing partial addr: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MYLAPTOP)(PORT=1521)))
nsgllsn: Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=MYLAPTOP)(PORT=1521)))
nsopen: opening transport...
nsopen: transport is open
nsopen: global context check-in (to slot 1) complete
nsopen: opening transport...
nttcnp: Validnode Table IN use; err 0x0
nttcnp: getting sockname
nttcnr: waiting to accept a connection.
nttcnr: getting sockname
nttvlser: valid node check on incoming node 127.0.0.1
nttvlser: Accepted Entry: 127.0.0.1
nttcon: set TCP_NODELAY on 336
nsopen: transport is open
nsnainit: inf->nsinfflg[0]: 0xd inf->nsinfflg[1]: 0xd
nsopen: global context check-in (to slot 2) complete
nsanswer: deferring connect attempt; at stage 5
ntt2err: soc 336 error - operation=5, ntresnt[0]=524, ntresnt[1]=997, ntresnt[2]=0
nscon: doing connect handshake...
nscon: got NSPTCN packet
nsevdansw: exit
nscon: sending NSPTAC packet
nscon: doing connect handshake...
nscon: nsctxinf[0]=0x4d, [1]=0x9
nsconbrok: asking transport to enable NTOBROKEN
ntt2err: soc 336 error - operation=5, ntresnt[0]=524, ntresnt[1]=997, ntresnt[2]=0
nsevdansw: exit
nsdo: 516 bytes from NS buffer
ntt2err: soc 336 error - operation=5, ntresnt[0]=524, ntresnt[1]=997, ntresnt[2]=0
nsglgrDoRegister: Creating new instance: "odb1".
nsglgrDoRegister: Creating new handler: "DEDICATED".
nsdo: 188 bytes to NS buffer
nsdo: 248 bytes from NS buffer
ntt2err: soc 336 error - operation=5, ntresnt[0]=524, ntresnt[1]=997, ntresnt[2]=0
nsdo: 116 bytes to NS buffer
nsopen: opening transport...
nttcnp: Validnode Table IN use; err 0x0
nttcnp: getting sockname
nttcnr: waiting to accept a connection.
nttcnr: getting sockname
nttvlser: valid node check on incoming node 127.0.0.1
nttvlser: Accepted Entry: 127.0.0.1
nttcon: set TCP_NODELAY on 316
nsopen: transport is open
nsnainit: inf->nsinfflg[0]: 0xd inf->nsinfflg[1]: 0xd
nsopen: global context check-in (to slot 3) complete
nsanswer: deferring connect attempt; at stage 5
ntt2err: soc 316 error - operation=5, ntresnt[0]=524, ntresnt[1]=997, ntresnt[2]=0
nscon: doing connect handshake...
nscon: got NSPTCN packet
nsevdansw: exit
nscon: sending NSPTRF packet
ntt2err: soc 316 error - operation=5, ntresnt[0]=524, ntresnt[1]=997, ntresnt[2]=0
nstimarmed: no timer allocated
nsclose: closing transport
nsclose: global context check-out (from slot 3) complete
nsglecmd: Deallocating cxd 0x13dffa0.Hi,
I don't know too much about this to be honest but I have some suggestions so I'll throw my two cents worth in. A few things come to mind, first I'd check the client, the issue looks like its there, second check the local security setup and third if your using Active Directory there are special directory issues.
Hope this helps -
An unhandled win32 exception occured in TNSLSNR.EXE[1624]
Hi, I don't know if anyone can help me with this, but I always get the win32 exception error everytime I start the tnslistener and open the enterprise management console at the same time; well, the error will pop up in about 10~15 secs, and tnslistener crashes/stops, only after I start using the enterprise management console.
The JIT debugger shows this:
Unhandled exception at 0x0227b8a4 in TNSLSNR.EXE: 0xC0000005: Access violation reading location 0x0874241c.
What does that mean? I also scanned my pc just in case, and didn't find any virus/malware or anything like that
I'm using winxp pro sp3, oracle 11gR2 and I'm using my personal home computer
My Tnsnames ora:
LISTENER_ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SID = ORCL)
RMAN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rman.localhost)
My listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\abigail\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\abigail\product\11.2.0\dbhome_1\bin\oraclr11.dll")
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ADR_BASE_LISTENER = E:\app\abigail
My SQLNET.ORA
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES, LOCALHOST)
NAMES.TRACE_LEVEL = ADMINthe listener.ora file is NOT required to start or use Oracle listener.
ensure the listener is down then continue as below
move, remove, rename, delete or otherwise eliminate the listener.ora file from its normal directory/folder then do as below
lsnrctl start
lsnrctl status
# now wait 60+ seconds before proceeding
lsnrctl service
COPY the results from above then PASTE all back here -
TNSLSNR.EXE crashes - 9i2 on XP
I installed Oracle 9i2 Personal Database from the file downloads.
Immediately after connecting to the database using SQL PLUS, TNSLSNR.exe unceremoniously crashes. No errors appear to be logged to the listener log. There is an error showing up in the event log:
Faulting application TNSLSNR.EXE, version 0.0.0.0, faulting module orantcp9.dll, version 0.0.0.0, fault address 0x00005732.
The listener also crashed during installation during the database creation. Another symptom of this installation is that oracle.exe will sometimes start consuming all available CPU forcing me to stop the service.
I've seen other threads here similar to this but have yet to find a resolution. Any help would be appreciated.
GaryI am not sure whether you fixed this error and how
you did. I had the same problem. But, when I searched
this forum, I got 3 threads and none of them led me
to the right solution.
Here is how I fixed it. First installed and ran
Ad-Aware and Spy-bot to detect any unknown spywares
and removed it. Then ran this file LSPfix.exe
(http://www.cexx.org/lspfix.htm) - which in turn
repaired my winsock setting.
Now, no more TNSLSNR.EXE crashes.
HTH,
AllwynHi Allwyns,
Just like to say a very big THANK YOU, I was having exactly the same issue and it was driving me mad. Followed your suggestion and it worked like, didn't even had to re-start my machine.
Cheers,
Farid -
9i TNSLSNR.exe Application Error on 2000 Prof.
When I connect to a local database, I seem to be getting TNSLSNR fatal error in which the listener stops working. The following error is returned:
TNSLSNR.exe - Application Error
The instruction at "0x012cf8d8" referenced memory at "0x02604b1c". The memory could not be "written"
Click OK to terminate the program. Click on Cancel to debug the program.
Clicking on either button does nothing.
8.1.5 and 8.1.7 worked fine on this same machine. This is a fresh installation. It has been reinstalled once. Only using SQL Plus and Oracle tools when the error occurs. I've also attempted to use the loopback IP of 127.0.0.1. Same error. Your assistance is greatly appreciated.I determined that the problem was related to VPN software installed on the same machine. The software was Aventail Connect. Oracle seems to be working fine.
-
An unhandled win32 exception occurred in TNSLSNR.EXE [1040].
Hi
I have received following error after enabling Automatic Shared Memory Management in 10.2.0.3.0.
An unhandled win32 exception occurred in TNSLSNR.EXE [1040].
Any body know why this error occurs.
-RushangAre you installing 10g Disco on the same server where R12.1.1 is installed ? If so, are you using a separate ORACLE_HOME for the Disco install and following all of the steps in this MOS Doc ?
Using Discoverer 10.1.2 with Oracle E-Business Suite Release 12 [ID 373634.1]
HTH
Srini -
TNSLSNR.EXE crashes everytime I try to do a tnsping or try to
connect to the database.
I'm running Oracle9i under a WINNT 4.0 sp6a .
Any solution?
Thanks in advance.Hi,
I don't know too much about this to be honest but I have some suggestions so I'll throw my two cents worth in. A few things come to mind, first I'd check the client, the issue looks like its there, second check the local security setup and third if your using Active Directory there are special directory issues.
Hope this helps -
Need urgent help. Calling of exe files from java program
This program can execute small .exe files that donot take inputs but doesn't work for exe files that takes input. what could be the problem.
Server code :-
import java.io.*;
import java.net.*;
public class Server1 {
private Player[] players;
private ServerSocket server;
private ExecHelper exh;
String command = null;
String message = null;
public Server1() {
players = new Player[5];
try {
server = new ServerSocket( 12345, 5 );
System.out.println("Server started...");
System.out.println("Waiting for request...");
catch( IOException ioe ) {
ioe.printStackTrace();
System.exit( 1 );
} //end Server constructor
public void execute() {
for( int i = 0; i < players.length; i++ )
try {
players[i] = new Player( server.accept() );
players.start();
catch( IOException ioe ) {
ioe.printStackTrace();
System.exit( 1 );
public static void main( String args[] ) {
Server1 ser = new Server1();
ser.execute();
System.exit( 1 );
private class Player extends Thread {
private Socket connection;
private ObjectOutputStream output;
private ObjectInputStream input;
public Player( Socket socket ) {
connection = socket;
try {
input = new ObjectInputStream( connection.getInputStream());
output = new ObjectOutputStream( connection.getOutputStream());
output.flush();
catch( IOException ioe ) {
ioe.printStackTrace();
System.exit( 1 );
public void run() {
try {
message = "Enter a command:";
output.writeObject( message );
output.flush();
do {
command = ( String ) input.readObject();
String osName = System.getProperty( "os.name" );
String[] cmd = new String[3];
if( osName.equals( "Windows 2000" )) {
cmd[0] = "cmd.exe";
cmd[1] = "/c";
cmd[2] = command;
else if( osName.equals( "Windows NT" ) ) {
cmd[0] = "cmd.exe" ;
cmd[1] = "/C" ;
cmd[2] = command ;
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec( cmd );
exh = new ExecHelper( proc, output, input);
} while( !command.equals( "TERMINATE" ) );
catch( Throwable t ) {
t.printStackTrace();
} //end class Player
public class ExecHelper implements Runnable {
private Process process;
private InputStream pErrorStream;
private InputStream pInputStream;
private OutputStream pOutputStream;
private InputStreamReader isr;
private InputStreamReader esr;
private PrintWriter outputWriter;
private ObjectOutputStream out;
private ObjectInputStream in;
private BufferedReader inBuffer;
private BufferedReader errBuffer;
private Thread processThread;
private Thread inReadThread;
private Thread errReadThread;
private Thread outWriteThread;
public ExecHelper( Process p, ObjectOutputStream output, ObjectInputStream input ) {
process = p;
pErrorStream = process.getErrorStream();
pInputStream = process.getInputStream();
pOutputStream = process.getOutputStream();
outputWriter = new PrintWriter( pOutputStream, true );
in = input;
out = output;
processThread = new Thread( this );
inReadThread = new Thread( this );
errReadThread = new Thread( this );
outWriteThread = new Thread( this );
processThread.start();
inReadThread.start();
errReadThread.start();
outWriteThread.start();
public void processEnded( int exitValue ) {
try {
Thread.sleep( 1000 );
catch( InterruptedException ie ) {
ie.printStackTrace();
public void processNewInput( String input ) {
try {
out.writeObject( "\n" + input );
out.flush();
catch( IOException ioe ) {
ioe.printStackTrace();
public void processNewError( String error ) {
try {
out.writeObject( "\n" + error );
out.flush();
catch( IOException ioe ) {
ioe.printStackTrace();
public void println( String output ) {
outputWriter.println( output + "\n" );
public void run() {
if( processThread == Thread.currentThread()) {
try {
processEnded( process.waitFor());
catch( InterruptedException ie ) {
ie.printStackTrace();
else if( inReadThread == Thread.currentThread() ) {
try {
isr = new InputStreamReader( pInputStream );
inBuffer = new BufferedReader( isr );
String line = null;
while(( line = inBuffer.readLine()) != null ) {
processNewInput( line );
catch( IOException ioe ) {
ioe.printStackTrace();
else if( outWriteThread == Thread.currentThread() ) {
try {
String nline = null;
nline = ( String ) in.readObject();
println( nline );
catch( ClassNotFoundException cnfe ) {
// cnfe.printStackTrace();
catch( IOException ioe ) {
ioe.printStackTrace();
else if( errReadThread == Thread.currentThread() ) {
try {
esr = new InputStreamReader( pErrorStream );
errBuffer = new BufferedReader( esr );
String nline = null;
while(( nline = errBuffer.readLine()) != null ) {
processNewError( nline );
catch( IOException ioe ) {
ioe.printStackTrace();
Client code :-
// client.java
import java.io.*;
import java.net.*;
public class Client {
private ObjectOutputStream output;
private ObjectInputStream input;
private String chatServer;
private String message = "";
private Socket client;
public Client( String host ) {
chatServer = host;
private void runClient() {
try {
connectToServer();
getStreams();
processConnection();
catch( EOFException eofe ) {
System.err.println( "Client terminated connection ");
catch( IOException ioe ) {
ioe.printStackTrace();
finally {
closeConnection();
} //end method runClient
private void connectToServer() throws IOException {
System.out.println( "Attempting connection...\n");
client = new Socket( InetAddress.getByName( chatServer ), 12345);
System.out.println( "Connected to : "+ client.getInetAddress().getHostName());
private void getStreams() throws IOException {
output = new ObjectOutputStream( client.getOutputStream());
output.flush();
input = new ObjectInputStream( client.getInputStream());
private void processConnection() throws IOException {
while( true ){
try {
message = ( String ) input.readObject();
System.out.print( message );
InputStreamReader isr = new InputStreamReader( System.in);
BufferedReader br = new BufferedReader( isr );
String line = null ;
line = br.readLine();
output.writeObject(line);
output.flush();
catch( ClassNotFoundException cnfe) {
System.out.println( "\nUnknown object type received");
} //end processConnection
private void closeConnection() {
System.out.println( "\nClosing connection");
try {
output.close();
input.close();
client.close();
catch( IOException ioe ) {
ioe.printStackTrace();
public static void main( String args[] ) {
Client c;
if( args.length == 0 )
c = new Client( "127.0.0.1" );
else
c = new Client( args[0] );
c.runClient();maybe you should
1. Use code tags so the posted code is understandable
2. Stop marking your post urgent, that just puts peoples backs up
3. Stop posting the question every couple of hours on every imaginable forum.. Post it once and start a single dialog -
URGENT : EVENT Listener Problem
Hi All,
Thanks for your time. I am facing a Small issue with Event
dispatcher and Add Event listener. Well i will explain the problem.
I am having one MovieClip named BUTTON_SET and i gave
"ButtonSet.as" as linkage Class.
Inside that BUTTON_SET i am having some Buttons and they are
also having "UIButton.as" as linkage class
UIButton Dispatching press and release events, But unable to
capture it using ButtonSet Class. Here with i have attached the
Code and i gave the Source URL Too.
upto my Knowledge : UIButton class is not initiated When the
ButtonSet is ready to addListener.
Please Help me to fix this.
if i don't find a solution i need to change all my class
structures.
CLICK HERE FOR SOURCE
CODEAccording to your Code, When you are calling the InitHandler
Functionction the Buttons may/may not be Initiated. So use the
Enterframe to check whether its loaded or not.
Write down this in the ButtonSet to replace the init Handler
Call.
this.onEnterFrame = Delegate.create(this, initHandler);
inside the initHandler remove the function This will help you
if you are not using any Enterframe for any other manipulation)
delete this.onEnterFrame; -
Urgent : regarding listener port functionality in Websphere 5.0
Hi all,
In my production I have two different Listener port (LP1 from JVM1) and (LP2 from JVM2) pointing to the same queue in the queue manager. Let say that a message gets dropped in the queue will there be any conflict for the message since two differnt thread(LP1 and Lp2) are looking at the same queue. Is there any best pratice that only one listener thread should be looking at one queue. Have anyone used the same architecture to run in the production environment and has issues with it.
Thanks
ManojThe code looks OK. I can only think of 2 suggestions:
1) install fixpack 8 or better for the 5.0 runtime
2) make user you have the TCP/IP moniter installed between the WS clinet and server (not between the browser and client). You should see the SOAP packet in the data in the request window. There is detailed help under "Using the TCP/IP Monitor to test Web services".
-- Frank -
URGENT : FORM6i & W2K & WNT4 : USER.EXE
HI,
I've got a big application in forms 4.5 with Oracle 7 and Oracle 8i. I transform this application in Forms 6i, my application can run and the communication with the database is OK, but i can't close it (any form) this error system message appear immidiately
ifrun60.exe - Image incorrecte (i'm french)
the application or the dll :c:\WINNT\System32\user.exe is not a valid Windows picture. Virify with your installation floppy. (Sorry for my translation.)
This message appear when i want to do an exit_form with this application by some function. The application test Bankapp run normally, and this message appear with an OS W2K or Win NT4 pack6. When i try to do an DO_KEY('EXIT_FORM') the application run with the CPU at 100 % and never stop. When i try to do an EXIT_FORM without passing to my function, the application do nothing.
I don't know what to do.
thanks for your helphi rajesh,
this might help:
Re: brconnect.exe exits with errors
regards
jo -
Need urgent help. Execution of .exe files by calling from java program
This program can execute small .exe files which donot take inputs. But does not work for exe files that take input and just hangs. What could be the problem. If anyone helps me I would be very grateful.
Server code :-
import java.io.*;
import java.net.*;
public class Server1 {
private Player[] players;
private ServerSocket server;
private ExecHelper exh;
String command = null;
String message = null;
public Server1() {
players = new Player[5];
try {
server = new ServerSocket( 12345, 5 );
System.out.println("Server started...");
System.out.println("Waiting for request...");
catch( IOException ioe ) {
ioe.printStackTrace();
System.exit( 1 );
} //end Server constructor
public void execute() {
for( int i = 0; i < players.length; i++ )
try {
players[i] = new Player( server.accept() );
players.start();
catch( IOException ioe ) {
ioe.printStackTrace();
System.exit( 1 );
public static void main( String args[] ) {
Server1 ser = new Server1();
ser.execute();
System.exit( 1 );
private class Player extends Thread {
private Socket connection;
private ObjectOutputStream output;
private ObjectInputStream input;
public Player( Socket socket ) {
connection = socket;
try {
input = new ObjectInputStream( connection.getInputStream());
output = new ObjectOutputStream( connection.getOutputStream());
output.flush();
catch( IOException ioe ) {
ioe.printStackTrace();
System.exit( 1 );
public void run() {
try {
message = "Enter a command:";
output.writeObject( message );
output.flush();
do {
command = ( String ) input.readObject();
String osName = System.getProperty( "os.name" );
String[] cmd = new String[3];
if( osName.equals( "Windows 2000" )) {
cmd[0] = "cmd.exe";
cmd[1] = "/c";
cmd[2] = command;
else if( osName.equals( "Windows NT" ) ) {
cmd[0] = "cmd.exe" ;
cmd[1] = "/C" ;
cmd[2] = command ;
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec( cmd );
exh = new ExecHelper( proc, output, input);
} while( !command.equals( "TERMINATE" ) );
catch( Throwable t ) {
t.printStackTrace();
} //end class Player
public class ExecHelper implements Runnable {
private Process process;
private InputStream pErrorStream;
private InputStream pInputStream;
private OutputStream pOutputStream;
private InputStreamReader isr;
private InputStreamReader esr;
private PrintWriter outputWriter;
private ObjectOutputStream out;
private ObjectInputStream in;
private BufferedReader inBuffer;
private BufferedReader errBuffer;
private Thread processThread;
private Thread inReadThread;
private Thread errReadThread;
private Thread outWriteThread;
public ExecHelper( Process p, ObjectOutputStream output, ObjectInputStream input ) {
process = p;
pErrorStream = process.getErrorStream();
pInputStream = process.getInputStream();
pOutputStream = process.getOutputStream();
outputWriter = new PrintWriter( pOutputStream, true );
in = input;
out = output;
processThread = new Thread( this );
inReadThread = new Thread( this );
errReadThread = new Thread( this );
outWriteThread = new Thread( this );
processThread.start();
inReadThread.start();
errReadThread.start();
outWriteThread.start();
public void processEnded( int exitValue ) {
try {
Thread.sleep( 1000 );
catch( InterruptedException ie ) {
ie.printStackTrace();
public void processNewInput( String input ) {
try {
out.writeObject( "\n" + input );
out.flush();
catch( IOException ioe ) {
ioe.printStackTrace();
public void processNewError( String error ) {
try {
out.writeObject( "\n" + error );
out.flush();
catch( IOException ioe ) {
ioe.printStackTrace();
public void println( String output ) {
outputWriter.println( output + "\n" );
public void run() {
if( processThread == Thread.currentThread()) {
try {
processEnded( process.waitFor());
catch( InterruptedException ie ) {
ie.printStackTrace();
else if( inReadThread == Thread.currentThread() ) {
try {
isr = new InputStreamReader( pInputStream );
inBuffer = new BufferedReader( isr );
String line = null;
while(( line = inBuffer.readLine()) != null ) {
processNewInput( line );
catch( IOException ioe ) {
ioe.printStackTrace();
else if( outWriteThread == Thread.currentThread() ) {
try {
String nline = null;
nline = ( String ) in.readObject();
println( nline );
catch( ClassNotFoundException cnfe ) {
// cnfe.printStackTrace();
catch( IOException ioe ) {
ioe.printStackTrace();
else if( errReadThread == Thread.currentThread() ) {
try {
esr = new InputStreamReader( pErrorStream );
errBuffer = new BufferedReader( esr );
String nline = null;
while(( nline = errBuffer.readLine()) != null ) {
processNewError( nline );
catch( IOException ioe ) {
ioe.printStackTrace();
Client code :-
// client.java
import java.io.*;
import java.net.*;
public class Client {
private ObjectOutputStream output;
private ObjectInputStream input;
private String chatServer;
private String message = "";
private Socket client;
public Client( String host ) {
chatServer = host;
private void runClient() {
try {
connectToServer();
getStreams();
processConnection();
catch( EOFException eofe ) {
System.err.println( "Client terminated connection ");
catch( IOException ioe ) {
ioe.printStackTrace();
finally {
closeConnection();
} //end method runClient
private void connectToServer() throws IOException {
System.out.println( "Attempting connection...\n");
client = new Socket( InetAddress.getByName( chatServer ), 12345);
System.out.println( "Connected to : "+ client.getInetAddress().getHostName());
private void getStreams() throws IOException {
output = new ObjectOutputStream( client.getOutputStream());
output.flush();
input = new ObjectInputStream( client.getInputStream());
private void processConnection() throws IOException {
while( true ){
try {
message = ( String ) input.readObject();
System.out.print( message );
InputStreamReader isr = new InputStreamReader( System.in);
BufferedReader br = new BufferedReader( isr );
String line = null ;
line = br.readLine();
output.writeObject(line);
output.flush();
catch( ClassNotFoundException cnfe) {
System.out.println( "\nUnknown object type received");
} //end processConnection
private void closeConnection() {
System.out.println( "\nClosing connection");
try {
output.close();
input.close();
client.close();
catch( IOException ioe ) {
ioe.printStackTrace();
public static void main( String args[] ) {
Client c;
if( args.length == 0 )
c = new Client( "127.0.0.1" );
else
c = new Client( args[0] );
c.runClient();pay close attention to the comments in this thread
http://forum.java.sun.com/thread.jspa?threadID=769142&messageID=4383764#4383764 -
All instances names on one NETWORK
How i see all oracle instances which are present on my network domain.
is there any command for CMD.
ThanksDon't expect to find a single command to track your network, and you should specify if you are talking about unix or windows. You should have privileges to get connected to the target host and issue a netstat command to find if there is a listener currently working there:
netstat -b -a
TCP alpha:1521 alpha.us.oracle.com:0 LISTENING 3644 [TNSLSNR.exe]
This will let you know where the listener is working and in case you have more than one listener, any additional ports. You will have to find each Oracle Home and execute the lsnrctl services or lsnrctl status command. This will show you the currently working instances, but in case instances are down the only way to find out will be to directly go to each Oracle Home and find out if there are the configuration files, such as init* or spfile* and find out if they are still active.
~ Madrid
http://hrivera99.blogspot.com/ -
Hi I have a rather urgent issue - I thought this would be simple but it is not working. I feel I am close:
I have an instance name TIRAT04, but I am rebuilding it and must rename the new one TIRAT04A. I want all my applications to still be able to connect using the old SID, but am not having any luck. All client are jdbc thin, using the Oracle 10.2 driver.
I have gotten as far as being able to tnsping the new connection locally, but my jdbc client still give me the error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Here is my listener.ora and tnsnames on the DB server:
listener.ora:
=======================
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = TIRAT06)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = TIRAT06)
(SID_DESC =
(GLOBAL_DBNAME = TIRAT06A)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = TIRAT06)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = jumpdb3.mydomain.com)(PORT = 1521))
===========
tnsnames.ora
=============
TIRAT06 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jumpdb3.mydomain.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TIRAT06.mydomain.com)
TIRAT06A =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jumpdb3.mydomain.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TIRAT06.mydomain.com)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
=================
Anyone know what I am missing? Is this possible with the thin client?
appreciated!
TrevorMore info - I can connect with the EM console using the alias, but unfortunately this is an OCI connection, not JDBC thin. The problem seems to lie in the request for SID (jdbc) vs SERVICE_NAME (OCI)
06-MAY-2006 00:51:49 * (CONNECT_DATA=(SID=TIRAT06A)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.5.150.55)(PORT=2120 )) * establish * TIRAT06A * 12505
TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
06-MAY-2006 01:02:38 * (CONNECT_DATA=(SERVICE_NAME=TIRAT06A)(CID=(PROGRAM=C:\oracle\product\10.2.0\client_1\jdk\jre\bin\java.exe)(HOST=TMARSHALL )(USER=tmarshall))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.5.150.55)(PORT=2185)) * establish * TIRAT06A * 0
How can I resolve SID to SERVICE_NAME, without changing the jdbc datasource in my applications? I know the SID is actually burned into the DB.
I followed this thread Listener alias question.
but it didn't help. Same problem, but not JDBC.
[oracle@jumpdb3 ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 06-MAY-2006 01:12:32
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 05-MAY-2006 19:08:40
Uptime 0 days 6 hr. 3 min. 51 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=jumpdb3.mydomain.com)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "TIRAT06" has 1 instance(s).
Instance "TIRAT06", status UNKNOWN, has 1 handler(s) for this service...
Service "TIRAT06.mydomain.com" has 1 instance(s).
Instance "TIRAT06", status READY, has 1 handler(s) for this service...
Service "TIRAT06A" has 1 instance(s).
Instance "TIRAT06", status UNKNOWN, has 1 handler(s) for this service...
Service "TIRAT06XDB.mydomain.com" has 1 instance(s).
Instance "TIRAT06", status READY, has 1 handler(s) for this service...
Service "TIRAT06_XPT.mydomain.com" has 1 instance(s).
Instance "TIRAT06", status READY, has 1 handler(s) for this service...
The command completed successfully
cheers,
Trev
Maybe you are looking for
-
Some users not seeing all of a web form in Smart View Excel 11.1.2?
I am on Planning 11.1.2 and I have an end user who, when he opens a web form in Excel using Smart View, he only sees about 1/3 of the entire form. If in the Oracle/Planning web, the form is fine. When he uses my machine, he sees the entire web form i
-
Reformated hard drive and reinstalled lion still not able to use lion recovery asst.
I reformated my HD and reinstalled lion 10.7.1 and I am still unable to use the lion recovery assitstance app it's telling me no recovery partion?
-
Best Practice for implementing dual APEX applications environment
Question: We are in the early stages of building an APEX application for Oracle SaaS consumption. The question I wanted to ask you is what would be the best way to deploy this app for production? Would it be easier just to create a new workspace in a
-
Sharing the local file system on another machine
Version : 5.10 We have an HP Proliant machine and a SunFire V40 machine. Both installed with solaris 5.10 (x86 AMD). In HP proliant machine we have filesystem with 600gb . We would like to mount this file system in the SunFire V40 machine . Is this p
-
Adding field to mb52 by copying it to a zprogram.
HI Guru's, I am using the t code MB52 to display warehouse stocks of a material. This overview is needed to find out what the specific stock per storage bin is. For that we need to copy the standard program from MB52 to a zprogram and add MARD - LGP