PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Naming one's hostname for sp_who
Date: Oct 9 2001 4:00PM

David LANDGREN writes:
 > |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.

Hmm:

I ran this script on a Solaris box (OC 12.0):

kiruna (8:56AM):1 > perl -MSybase::DBlib -e 'my $dbh = new Sybase::DBlib "sa"; sleep(100);'

(yeah - I've still got the null sa password :-) and I get:

[11] plum.master: 1> sp_who;
 fid    spid   status       loginame     origname     hostname   blk_spid
	dbname     cmd              block_xloid
 ------ ------ ------------ ------------ ------------ ---------- --------
	---------- ---------------- -----------
      0      1 running      sa           sa                      0       
	master     SELECT                     0
      0      2 sleeping     NULL         NULL                    0       
	master     NETWORK HANDLER            0
      0      3 sleeping     NULL         NULL                    0       
	master     DEADLOCK TUNE              0
      0      4 sleeping     NULL         NULL                    0       
	master     MIRROR HANDLER             0
      0      5 sleeping     NULL         NULL                    0       
	master     ASTC HANDLER               0
      0      6 sleeping     NULL         NULL                    0       
	master     CHECKPOINT SLEEP           0
      0      7 sleeping     NULL         NULL                    0       
	master     HOUSEKEEPER                0
      0      9 recv sleep   sa           sa           kiruna     0       
	master     AWAITING COMMAND           0

(8 rows affected, return status = 0)

So this sets it correctly for me.

Maybe your gethostname() (or whatever) call doesn't work right?

 > Rats. I cleared the source of the machine a few weeks ago. I'll download it
 > again and tell you how it went.

OK.

Michael
-- 
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
mpeppler@peppler.org - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com