Database Administration (MOSC)

MOSC Banner

Unable to reach (ping) printer from database

edited Feb 25, 2013 8:35PM in Database Administration (MOSC) 4 commentsAnswered ✓
11.2.0.2

Hi,

We can ping the print server from the Linux host (where the database i located). but running this from the database:

DECLARE
 p_connection utl_tcp.connection;
 cOk        CONSTANT VARCHAR2(2) := 'OK';
 cFail      CONSTANT VARCHAR2(5) := 'ERROR';
 v_host     VARCHAR2(255) := '410.54.112.159';
 v_charset  VARCHAR2(30)  := 'WE8PC850';
 v_port     PLS_INTEGER   := '9100';
 v_timeout  PLS_INTEGER   := 0; -- wait in seconds
BEGIN
  p_connection := UTL_TCP.open_connection (remote_host => v_host,
                                           remote_port => v_port,
                                           CHARSET     => v_charset,
                                           tx_timeout  => v_timeout);
  utl_tcp.close_connection(p_connection);
 dbms_output.put_line(cOk);
EXCEPTION
  WHEN utl_tcp.network_error THEN

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center