|
|
sybperl-l Archive
Up Prev Next
From: Michael Burstin <mikeb at concerto dot com>
Subject: Re: sysprocesses columns
Date: Sep 23 2003 3:21PM
On Tue, Sep 23, 2003 at 11:09:10AM -0400, Sabherwal, Balvinder (MBS) wrote:
> Group,
>
> Any ideas of how you can populate the info into the clientapplname,
> clienthostname, clientname columns in the sysprocesses table in master
> database from perl scripts using syb-perl?
>
Well, right from the Sybperl manual, you get $appname and Sybase
attribute CS_HOSTNAME. Not sure about clientname, unless it is one of
the attributes listed there:
$dbh = new Sybase::CTlib $user [, $passwd [, $server [, $appname[,
{attributes}]
$dbh = Sybase::CTlib->ct_connect($user [, $passwd [, $server
[,$appname, [{attributes}]]]])
Establishes a connection to the database engine. Initializes and
allocates resources for the connection, and registers the user name,
password, target server and application name.
The attributes hash reference can be used to add private attributes to
the connection handle that you can later use, and can also be used to
set certain connection properties.
To set the connection properties you pass a special hash in the
attributes parameter:
$dbh = new Sybase::CTlib 'user', 'pwd', 'SYBASE', undef,
{ CON_PROPS => { CS_HOSTNAME => 'kiruna',
CS_PACKETSIZE => 1024,
CS_SEC_CHALLENGE => CS_TRUE }
};
The following connection properties are currently recognized:
CS_HOSTNAME
CS_ANSI_BINDS
CS_PACKETSIZE
CS_SEC_APPDEFINED
CS_SEC_CHALLENGE
CS_SEC_ENCRYPTION
CS_SEC_NEGOTIATE
See the Sybase documentation on how and when to use these connection
properties.
In addition, you can set the CS_SYB_LANG and CS_SYB_CHARSET properties
in the same manner. However - you should be aware that these settings
affect all open connections, not just the one that you are openeing
with this call to ct_connect(). This behaviour will likely change in
the future.
--
Michael Burstin
NPI Engineer
Concerto Software
978-952-0842
mikeb@concerto.com
|