01-01-2017
Oracle has a tool - $ORACLE_HOME/bin.tnsping. You should have it installed on your desktop machine if you have an oracle client install.
This will tell you if you connect to a server on a remote host - i.e., does one exist and is it up. sqlplus binary exists on any box that has either the client software set or the server software set. So, locating sqlplus in each $ORACLE_HOME on a machine tells you the instance name(s). e.g., /u01/blah/blah/bin/sqlplus , plus it shows the version as well.
If you want to connect to every server you can (you need passwords and usernames) see, you should consider having all of the versions like 9, 10, 11 client installed on the box doing the searching.
9 More Discussions You Might Find Interesting
1. IP Networking
The problem I am facing now is that the QNX host could not ping the SCO host and vice versa. They are in the same domain, ie, 172.20.3.xx. As I am very new to Unix, I guess I must have missed out some important steps. Pls help... Thanx alot (2 Replies)
Discussion started by: gavon
2 Replies
2. Solaris
First off, I'm pretty new to Solaris, although I know Windows very well.
I have a mixed Wintel, Linux and SPARC/Solaris environment and am looknig for a way to make short work of installing Solaris. I know there is a network booting option and there are the WebStart (configurable) and JumpStart... (1 Reply)
Discussion started by: BeekerC
1 Replies
3. Linux
Hello all,
Please can someone assist?
I am attempting to install an external dvdrw on fedora 6.
I attach the dvdrw device to the USB port and run dmesg:
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before... (0 Replies)
Discussion started by: chlawren
0 Replies
4. HP-UX
This will undoubtedly seem like a problem that should be easily resolved but...
We are having some 'issues' getting multiple versions of Perl installed on our HP-UX servers (11.11 & 11.23). Now, I'm not a Sys Admin but I believe the reason behind this is that the Perl installation which comes... (2 Replies)
Discussion started by: Macer
2 Replies
5. Solaris
Hello everybody,
I'd like to install several important packages on my servor like for instance, man pages package..
I found a .tar.gz package of man pages. So, after to do "gtar zxvf name_of_file.tar.gz" I can access on the folder "name_of_file" (by cd name_of_file). Then, I read on my readme... (4 Replies)
Discussion started by: MasterapocA
4 Replies
6. UNIX for Advanced & Expert Users
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies
7. Programming
i have installd oracle 10 on Solaris 10 now i want to access this database from remote machine.
-bash-3.00$ tnsping 192.168.92.49
TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 17-DEC-2010 21:06:51
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter... (23 Replies)
Discussion started by: akhaliq22
23 Replies
8. Shell Programming and Scripting
Hi everyone,
I have oracle 9i installed in Windows XP and i have ubuntu in VM WARE.
I would like to know how to connect to Oracle in windows xp from Linux through shel scripting...... (3 Replies)
Discussion started by: Zimbu
3 Replies
9. UNIX for Dummies Questions & Answers
I'm trying to find the version of the underlying Oracle forms from out Unix Server.
I have tried
frmcmp.sh -h
but I get the error
frmcmp.sh -h : not found
Its a Unix Sun server running an oracle database
Any ideas? (1 Reply)
Discussion started by: dbajtr
1 Replies
LEARN ABOUT DEBIAN
test::tcp
Test::TCP(3pm) User Contributed Perl Documentation Test::TCP(3pm)
NAME
Test::TCP - testing TCP program
SYNOPSIS
use Test::TCP;
my $server = Test::TCP->new(
code => sub {
my $port = shift;
...
},
);
my $client = MyClient->new(host => '127.0.0.1', port => $server->port);
undef $server; # kill child process on DESTROY
Using memcached:
use Test::TCP;
my $memcached = Test::TCP->new(
code => sub {
my $port = shift;
exec $bin, '-p' => $port;
die "cannot execute $bin: $!";
},
);
my $memd = Cache::Memcached->new({servers => ['127.0.0.1:' . $memcached->port]});
...
And functional interface is available:
use Test::TCP;
test_tcp(
client => sub {
my ($port, $server_pid) = @_;
# send request to the server
},
server => sub {
my $port = shift;
# run server
},
);
DESCRIPTION
Test::TCP is test utilities for TCP/IP programs.
METHODS
empty_port
my $port = empty_port();
Get the available port number, you can use.
test_tcp
Functional interface.
test_tcp(
client => sub {
my $port = shift;
# send request to the server
},
server => sub {
my $port = shift;
# run server
},
# optional
port => 8080
);
wait_port
wait_port(8080);
Waits for a particular port is available for connect.
OO-ish interface
my $server = Test::TCP->new(%args);
Create new instance of Test::TCP.
Arguments are following:
$args{auto_start}: Boolean
Call "$server->start()" after create instance.
Default: true
$args{code}: CodeRef
The callback function. Argument for callback function is: "$code->($pid)".
This parameter is required.
$server->start()
Start the server process. Normally, you don't need to call this method.
$server->stop()
Stop the server process.
my $pid = $server->pid();
Get the pid of child process.
my $port = $server->port();
Get the port number of child process.
FAQ
How to invoke two servers?
You can call test_tcp() twice!
test_tcp(
client => sub {
my $port1 = shift;
test_tcp(
client => sub {
my $port2 = shift;
# some client code here
},
server => sub {
my $port2 = shift;
# some server2 code here
},
);
},
server => sub {
my $port1 = shift;
# some server1 code here
},
);
Or use OO-ish interface instead.
my $server1 = Test::TCP->new(code => sub {
my $port1 = shift;
...
});
my $server2 = Test::TCP->new(code => sub {
my $port2 = shift;
...
});
# your client code here.
...
How do you test server program written in other languages like memcached?
You can use "exec()" in child process.
use strict;
use warnings;
use utf8;
use Test::More;
use Test::TCP 1.08;
use File::Which;
my $bin = scalar which 'memcached';
plan skip_all => 'memcached binary is not found' unless defined $bin;
my $memcached = Test::TCP->new(
code => sub {
my $port = shift;
exec $bin, '-p' => $port;
die "cannot execute $bin: $!";
},
);
use Cache::Memcached;
my $memd = Cache::Memcached->new({servers => ['127.0.0.1:' . $memcached->port]});
$memd->set(foo => 'bar');
is $memd->get('foo'), 'bar';
done_testing;
AUTHOR
Tokuhiro Matsuno <tokuhirom@gmail.com>
THANKS TO
kazuhooku
dragon3
charsbar
Tatsuhiko Miyagawa
lestrrat
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-02-01 Test::TCP(3pm)