|
|
sybperl-l Archive
Up Prev Next
From: postmaster at jpmorgan dot com
Subject: Re: Multiple connections
Date: Dec 4 1997 6:02PM
Delivery Failure Report
Your Re: Multiple connections
document:
was not john plummer@jpmorgan
delivered to
:
because: No route found to domain jpmorgan from server NYC_NTGW_N02.
Check Server, Connection and Domain documents in Name &
Address Book.
NYC_NTGW_N02, NYC_NTGW_N02, NYC_NTGW_N03
________________________
To: SYBPERL-L@trln.lib.unc.edu @ SMTP
cc:
From: mpeppler@mbay.net (Michael Peppler) @ SMTP
Date: 12-04-97 02:02:35 PM
Subject: Re: Multiple connections
Sandesh Tattitali wrote:
>
> Hi all,
> Let me first explain what I am doing before going on to the
problem.
> We have multiple Sybase installations on our Solaris box,one installation
for each Sybase server that runs on the box. What I want to do is write a
script that will access each server and retrieve some information. The key
information for each Sybase server is is a CONFIG file with the format
> # Server Name Sa Password $SYBASE Runfile
name
What you need to do is set $ENV{SYBASE} once to a valid directory
where you have all the necessary files (like libraries and
locale files) and then use ct_config() to set the path to the
interfaces file (ct_config(CS_SET, CS_IFILE, $path)).
If you need to set the SYBASE env variable you must do so in a
BEGIN {} block.
You close the connection when the variable goes out of scope.
You can do this by using blocks ({}) and 'my' variables,
something like:
{
my $dbh = new Sybase::CTlib user, pwd, server;
$dbh->ct_execute(...);
etc...
}
When control reaches the close curly brace the variable goes
out of scope, and the connection is closed.
Michael
PS. Next time please use carriage return every 70 chars or so - it
makes reading the message a lot easier.
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@datamig.com -||- http://www.mbay.net/~mpeppler
|