Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS/DBD::Sybase non-root user problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: michael.peppler AT bnpparibas.com
  • To: freetds AT lists.ibiblio.org
  • Cc: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] FreeTDS/DBD::Sybase non-root user problem
  • Date: Fri, 25 Aug 2006 07:40:13 +0200

The most likely problem is access rights to the freetds.conf file, the
freetds .so files, and any other freetds related configuration files.

Michael




Internet
Keith.Miller AT T-Mobile.com@lists.ibiblio.org - 25/08/2006 04:09


Please respond to freetds AT lists.ibiblio.org

Sent by: freetds-bounces AT lists.ibiblio.org

To: freetds

cc:


Subject: [freetds] FreeTDS/DBD::Sybase non-root user problem


Greetings,

Has anyone else figured out why DBD::Sybase will not run for an non-root
user? First, I should say, I'm new to freetds and it took me a bit of
reading to get the first successful install. After confirming
freetds.conf was configured correctly by connecting with tsql, I then
started working through the DBD::Sybase build. Nothing seemed to be
working, even with the fully confirmed lib locations
(SYBASE=/usr/local).

I searched through the archives and found several examples of people
with similar problems, but their questions were never answered.
Attached is a DBI->trace(9) output run as a non-root user and an excerpt
(since the script was a success) of a root user running the same
program. Any help would be greatly appreciated. I can run the script
as root for some immediate work, but the better solution will be to run
it from userland.

Thanks!!

Non-root user:

DBI 1.52-ithread default trace level set to 0x0/9 (pid 14717)
-> DBI->connect(dbi:Sybase:server=SITE;database=DB, ID, ****)
-> DBI->install_driver(Sybase) for linux perl=5.008007 pid=14717
ruid=2002 euid=2002
install_driver: DBD::Sybase version 1.07 loaded from
/usr/local/lib/perl/5.8.7/DBD/Sybase.pm
New DBI::dr (for DBD::Sybase::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x82331bc)=>DBI::dr=HASH(0x832b67c),
DBD::Sybase::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::Sybase::dr, 84, 0) thr#814d008
dbih_setup_attrib(DBI::dr=HASH(0x832b67c), Err, Null!)
SCALAR(0x8241da0) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x832b67c), State, Null!)
SCALAR(0x8241d88) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x832b67c), Errstr, Null!)
SCALAR(0x8241db8) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x832b67c), TraceLevel, Null!) 0
(already defined)
dbih_setup_attrib(DBI::dr=HASH(0x832b67c), FetchHashKeyName, Null!)
'NAME' (already defined)
<- install_driver= DBI::dr=HASH(0x82331bc)
>> connect DISPATCH (DBI::dr=HASH(0x82331bc) rc2/3 @5 g0 ima1
pid#14717) at /usr/local/lib/perl/5.8.7/DBI.pm line 625
!! warn: 0 CLEARED by call to connect method
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x82331bc)~0x832b67c
'server=SITE;database=DB' 'ID' **** HASH(0x816b970)) thr#814d008
New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x832b67c),
id=)
dbih_setup_handle(DBI::db=HASH(0x832b664)=>DBI::db=HASH(0x816b9e8),
DBD::Sybase::db, 8232f10, Null!)
dbih_make_com(DBI::dr=HASH(0x832b67c), 832dda0, DBD::Sybase::db,
2716, 0) thr#814d008
dbih_setup_attrib(DBI::db=HASH(0x816b9e8), Err,
DBI::dr=HASH(0x832b67c)) SCALAR(0x8242130) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x816b9e8), State,
DBI::dr=HASH(0x832b67c)) SCALAR(0x8242190) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x816b9e8), Errstr,
DBI::dr=HASH(0x832b67c)) SCALAR(0x8242160) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x816b9e8), TraceLevel,
DBI::dr=HASH(0x832b67c)) 0 (already defined)
dbih_setup_attrib(DBI::db=HASH(0x816b9e8), FetchHashKeyName,
DBI::dr=HASH(0x832b67c)) 'NAME' (already defined)
dbih_setup_attrib(DBI::db=HASH(0x816b9e8), HandleSetErr,
DBI::dr=HASH(0x832b67c)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x816b9e8), HandleError,
DBI::dr=HASH(0x832b67c)) undef (not defined)
syb_db_login() -> using global CS_LOCALE data
>> DESTROY DISPATCH (DBI::db=HASH(0x832b664) rc1/1 @1 g0 ima4
pid#14717) at /usr/local/lib/perl/5.8.7/DBI.pm line 625 via at
../db-iss.pl line 78
<> DESTROY(DBI::db=HASH(0x832b664)) ignored for outer handle (inner
DBI::db=HASH(0x816b9e8) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=HASH(0x816b9e8) rc1/1 @1 g0 ima4
pid#14717) at /usr/local/lib/perl/5.8.7/DBI.pm line 625 via at
../db-iss.pl line 78
-> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x816b9e8)~INNER)
thr#814d008
DESTROY for DBI::db=HASH(0x816b9e8) ignored - handle not
initialised
<- DESTROY= undef at /usr/local/lib/perl/5.8.7/DBI.pm line 625 via
at ./db-iss.pl line 78
DESTROY (dbih_clearcom) (dbh 0x816b9e8, com 0x8330fe8, imp
DBD::Sybase::db):
FLAGS 0x11: COMSET Warn
PARENT DBI::dr=HASH(0x832b67c)
KIDS 0 (0 Active)
IMP_DATA undef
dbih_clearcom 0x816b9e8 (com 0x8330fe8, type 2) done.

<- connect= undef at /usr/local/lib/perl/5.8.7/DBI.pm line 625
-> $DBI::errstr (&) FETCH from lasth=HASH
>> DBD::Sybase::dr::errstr
<- $DBI::errstr= undef
DBI connect('server=SITE;database=DB','ID',...) failed: (no error
string)
DBI connect('server=SITE;database=DB','ID',...) failed: (no error
string) at ./db-iss.pl line 78
-> $DBI::errstr (&) FETCH from lasth=HASH
>> DBD::Sybase::dr::errstr
<- $DBI::errstr= undef
unable to connect to '':
-- DBI::END
>> disconnect_all DISPATCH (DBI::dr=HASH(0x82331bc) rc1/3 @1 g0
ima801 pid#14717) at /usr/local/lib/perl/5.8.7/DBI.pm line 700 via at
../db-iss.pl line 0
-> disconnect_all for DBD::Sybase::dr
(DBI::dr=HASH(0x82331bc)~0x832b67c) thr#814d008
<- disconnect_all= 1 at /usr/local/lib/perl/5.8.7/DBI.pm line 700
via at ./db-iss.pl line 0
! >> DESTROY DISPATCH (DBI::dr=HASH(0x832b67c) rc1/1 @1 g0 ima4
pid#14717) during global destruction
! -> DESTROY in DBD::_::common for DBD::Sybase::dr
(DBI::dr=HASH(0x832b67c)~INNER) thr#814d008
! <- DESTROY= undef during global destruction
DESTROY (dbih_clearcom) (drh 0x82331bc, com 0x832dda0, imp global
destruction):
FLAGS 0x215: COMSET Active Warn AutoCommit
PARENT undef
KIDS 0 (0 Active)
IMP_DATA undef
dbih_clearcom 0x82331bc (com 0x832dda0, type 1) done.

! >> DESTROY DISPATCH (DBI::dr=HASH(0x82331bc) rc1/1 @1 g0 ima4
pid#14717) during global destruction
! <> DESTROY for DBI::dr=HASH(0x82331bc) ignored (inner handle gone)


Root user:

DBI 1.52-ithread default trace level set to 0x0/9 (pid 14820)
Note: perl is running without the recommended perl -w option
-> DBI->connect(dbi:Sybase:server=SITE;database=DB, ID, ****)
-> DBI->install_driver(Sybase) for linux perl=5.008007 pid=14820
ruid=0 euid=0
install_driver: DBD::Sybase version 1.07 loaded from
/usr/local/lib/perl/5.8.7/DBD/Sybase.pm
New DBI::dr (for DBD::Sybase::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x82319d0)=>DBI::dr=HASH(0x8329fe8),
DBD::Sybase::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::Sybase::dr, 84, 0) thr#814d008
dbih_setup_attrib(DBI::dr=HASH(0x8329fe8), Err, Null!)
SCALAR(0x82409d4) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x8329fe8), State, Null!)
SCALAR(0x82409bc) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x8329fe8), Errstr, Null!)
SCALAR(0x82409ec) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x8329fe8), TraceLevel, Null!) 0
(already defined)
dbih_setup_attrib(DBI::dr=HASH(0x8329fe8), FetchHashKeyName, Null!)
'NAME' (already defined)
<- install_driver= DBI::dr=HASH(0x82319d0)
>> connect DISPATCH (DBI::dr=HASH(0x82319d0) rc2/3 @5 g0 ima1
pid#14820) at /usr/local/lib/perl/5.8.7/DBI.pm line 625
!! warn: 0 CLEARED by call to connect method
-> connect for DBD::Sybase::dr (DBI::dr=HASH(0x82319d0)~0x8329fe8
'server=SITE;database=DB' 'ID' **** HASH(0x8169ee4)) thr#814d008
New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x8329fe8),
id=)
dbih_setup_handle(DBI::db=HASH(0x8329fd0)=>DBI::db=HASH(0x8169f5c),
DBD::Sybase::db, 8231724, Null!)
dbih_make_com(DBI::dr=HASH(0x8329fe8), 832c508, DBD::Sybase::db,
2716, 0) thr#814d008
dbih_setup_attrib(DBI::db=HASH(0x8169f5c), Err,
DBI::dr=HASH(0x8329fe8)) SCALAR(0x8240d64) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x8169f5c), State,
DBI::dr=HASH(0x8329fe8)) SCALAR(0x8240dc4) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x8169f5c), Errstr,
DBI::dr=HASH(0x8329fe8)) SCALAR(0x8240d94) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x8169f5c), TraceLevel,
DBI::dr=HASH(0x8329fe8)) 0 (already defined)
dbih_setup_attrib(DBI::db=HASH(0x8169f5c), FetchHashKeyName,
DBI::dr=HASH(0x8329fe8)) 'NAME' (already defined)
dbih_setup_attrib(DBI::db=HASH(0x8169f5c), HandleSetErr,
DBI::dr=HASH(0x8329fe8)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x8169f5c), HandleError,
DBI::dr=HASH(0x8329fe8)) undef (not defined)
syb_db_login() -> using global CS_LOCALE data
servermsg_cb -> number=5701 severity=0 state=2 line=0
server=FLPRDASSDB01 text=Changed database context to 'DB'.
servermsg_cb -> number=5703 severity=0 state=1 line=0
server=FLPRDASSDB01 text=Changed language setting to us_english.
syb_db_login() -> checking for ct_option support (ret = 0, val =
-1210176696)
syb_db_login() -> ct_option is not supported
syb_alloc_cmd() -> CS_COMMAND 832e6f0 for CS_CONNECTION 8330400
syb_db_use() -> ct_command(use DB)
servermsg_cb -> number=5701 severity=0 state=1 line=1
server=FLPRDASSDB01 text=Changed database context to 'DB'.
syb_db_use() -> ct_results(4047)
syb_db_use() -> ct_results(4046)
syb_alloc_cmd() -> CS_COMMAND 832e6f0 for CS_CONNECTION 8330400
get_server_version() -> ct_command(select @@version)
get_server_version() -> ct_results(4040)
get_server_version() -> version = Microsoft SQL Server 2000 -
8.00.818 (Intel X86)
May 31 2003 16:08:15
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack
1)

get_server_version() -> version = Unknown
get_server_version() -> ct_results(4046)
<- connect= DBI::db=HASH(0x8329fd0) at
/usr/local/lib/perl/5.8.7/DBI.pm line 625
>> STORE DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @3 g0 ima41c
pid#14820) at /usr/local/lib/perl/5.8.7/DBI.pm line 672
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8169f5c)~INNER
'PrintError' 1) thr#814d008
STORE DBI::db=HASH(0x8169f5c) 'PrintError' => 1
<- STORE= 1 at /usr/local/lib/perl/5.8.7/DBI.pm line 672
>> STORE DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @3 g0 ima41c
pid#14820) at /usr/local/lib/perl/5.8.7/DBI.pm line 672
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8169f5c)~INNER
'AutoCommit' 1) thr#814d008
toggle_autocommit: current = off, new = on
<- STORE= 1 at /usr/local/lib/perl/5.8.7/DBI.pm line 672
>> STORE DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @3 g0 ima41c
pid#14820) at /usr/local/lib/perl/5.8.7/DBI.pm line 675 via at
../db-iss.pl line 78
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8169f5c)~INNER
'Username' 'ID') thr#814d008
STORE DBI::db=HASH(0x8169f5c) 'Username' => 'ID'
<- STORE= 1 at /usr/local/lib/perl/5.8.7/DBI.pm line 675 via at
../db-iss.pl line 78
>> FETCH DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @2 g0 ima404
pid#14820) at /usr/local/lib/perl/5.8.7/DBI.pm line 675
<> FETCH= 'ID' ('Username' from cache) at
/usr/local/lib/perl/5.8.7/DBI.pm line 675
<- connect= DBI::db=HASH(0x8329fd0)
>> STORE DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @3 g0 ima41c
pid#14820) at /usr/local/lib/perl/5.8.7/DBI.pm line 691 via at
../db-iss.pl line 78
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8169f5c)~INNER
'dbi_connect_closure' CODE(0x832a12c)) thr#814d008
STORE DBI::db=HASH(0x8169f5c) 'dbi_connect_closure' =>
CODE(0x832a12c)
<- STORE= 1 at /usr/local/lib/perl/5.8.7/DBI.pm line 691 via at
../db-iss.pl line 78
>> STORE DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @3 g0 ima41c
pid#14820) at ./db-iss.pl line 79
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8169f5c)~INNER
'RaiseError' 1) thr#814d008
STORE DBI::db=HASH(0x8169f5c) 'RaiseError' => 1
<- STORE= 1 at ./db-iss.pl line 79
>> STORE DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @3 g0 ima41c
pid#14820) at ./db-iss.pl line 80
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8169f5c)~INNER
'LongReadLen' 8192) thr#814d008
Setting of CS_OPT_TEXTSIZE failed. at ./db-iss.pl line 80.
STORE DBI::db=HASH(0x8169f5c) 'LongReadLen' => 8192
<- STORE= 1 at ./db-iss.pl line 80
>> STORE DISPATCH (DBI::db=HASH(0x8169f5c) rc2/1 @3 g0 ima41c
pid#14820) at ./db-iss.pl line 81
-> STORE for DBD::Sybase::db (DBI::db=HASH(0x8169f5c)~INNER
'LongTruncOk' 1) thr#814d008
STORE DBI::db=HASH(0x8169f5c) 'LongTruncOk' => 1
<- STORE= 1 at ./db-iss.pl line 81
>> prepare DISPATCH (DBI::db=HASH(0x8329fd0) rc1/1 @2 g0 ima2201
pid#14820) at ./db-iss.pl line 83
-> prepare for DBD::Sybase::db (DBI::db=HASH(0x8329fd0)~0x8169f5c
'select table_name from DB.information_schema.tables') thr#814d008
New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x8169f5c),
id=)
dbih_setup_handle(DBI::st=HASH(0x8169fec)=>DBI::st=HASH(0x832e7ec),
DBD::Sybase::st, 8169ff8, Null!)
dbih_make_com(DBI::db=HASH(0x8169f5c), 832f790, DBD::Sybase::st,
420, 0) thr#814d008
dbih_setup_attrib(DBI::st=HASH(0x832e7ec), Err,
DBI::db=HASH(0x8169f5c)) SCALAR(0x8240d64) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x832e7ec), State,
DBI::db=HASH(0x8169f5c)) SCALAR(0x8240dc4) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x832e7ec), Errstr,
DBI::db=HASH(0x8169f5c)) SCALAR(0x8240d94) (already defined)
dbih_setup_attrib(DBI::st=HASH(0x832e7ec), TraceLevel,
DBI::db=HASH(0x8169f5c)) 0 (already defined)
dbih_setup_attrib(DBI::st=HASH(0x832e7ec), FetchHashKeyName,
DBI::db=HASH(0x8169f5c)) 'NAME' (already defined)
dbih_setup_attrib(DBI::st=HASH(0x832e7ec), HandleSetErr,
DBI::db=HASH(0x8169f5c)) undef (not defined)
dbih_setup_attrib(DBI::st=HASH(0x832e7ec), HandleError,
DBI::db=HASH(0x8169f5c)) undef (not defined)
syb_st_prepare() -> inUse = 0
syb_st_prepare() -> set inUse
<- prepare= DBI::st=HASH(0x8169fec) at ./db-iss.pl line 83
>> execute DISPATCH (DBI::st=HASH(0x8169fec) rc1/1 @1 g0 ima1041
pid#14820) at ./db-iss.pl line 84
-> execute for DBD::Sybase::st (DBI::st=HASH(0x8169fec)~0x832e7ec)
thr#814d008
syb_alloc_cmd() -> CS_COMMAND 83791d8 for CS_CONNECTION 8330400
cmd_execute() -> ct_command() OK
cmd_execute() -> ct_send() OK
cmd_execute() -> set inUse flag
st_next_result() -> ct_results(4040) == 1
ct_res_info() returns 1 columns
ct_describe(0): type = 0, maxlen = 128
describe() -> col 0, type 0, realtype 0
describe() retcode = 1
st_next_result() -> lasterr = 0, lastsev = 0
<- execute= -1 at ./db-iss.pl line 84
>> fetchrow DISPATCH (DBI::st=HASH(0x8169fec) rc1/1 @1 g1 ima0
pid#14820) at ./db-iss.pl line 86
-> fetchrow for DBD::Sybase::st (DBI::st=HASH(0x8169fec)~0x832e7ec)
thr#814d008
dbih_setup_fbav for 1 fields => 0x832e7e0
fix_fbav() -> num_fields = 1, numCols = 1
syb_st_fetch() -> ct_fetch() = 1 (1 rows)
syb_st_fetch() -> 0/3/0

<snip><snip>

Keith Miller



_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.

---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.





Archive powered by MHonArc 2.6.24.

Top of Page