|
|
sybperl-l Archive
Up Prev Next
From: "David LANDGREN" <dlandgre at bpinet dot com>
Subject: Re: Naming one's hostname for sp_who
Date: Oct 9 2001 3:47PM
|Normally DB-Library sets the hostname by default, but it may not do so
|on a Win32 platform (if that's what you are using).
Nope, Solaris.
|There is a DBSETLHOST(loginrec, hostname) call, but Sybase::DBlib
|doesn't implement it (or at least not yet).
|
|You could add the hostname to the appname field (i.e. "db_app on
|$host", or something like that).
That doesn't show up in sp_who
|Or add this to DBlib.xs and call before making a connection:
|
|void
|DBSETLHOST(host)
| char * host
|CODE:
|{
| DBSETLHOST(loginrec, host);
|}
|
|Put this around line 4540 of DBlib.xs (where you also have the
|definitions of DBSETLCHARSET, etc), rebuild, and then call with
|Sybase::DBlib::DBSETLHOST("my_host");
Rats. I cleared the source of the machine a few weeks ago. I'll download it
again and tell you how it went.
Thanks for the pointer,
David
|