Re: Fwd: Can't connect to Sybase Rep server
- From: michael.peppler@xxxxxxxxxxxxxx (Michael Peppler)
- Date: Thu, 23 Nov 2006 09:50:11 +0100
Hi Matthew,
The real problem is that there is no way to detect that we're trying to
connect to a rep server, so DBD::Sybase still tries to use teh ct_option()
calls, and to get the version of the server (via select @@version).
Obviously these errors aren't "real" errors - so I guess there are two
possible solutions.
1 - on your end, check for error 2056 and if so ignore the content of
errstr:
$dbh = DBI->connect(....);
if($dbh->err && $dbh->err != 2056) {
print $dbh->errstr;
}
It's obviously not a clean solution, but it should work.
2 - we add a new connection attribute that tells DBD::Sybase to not call
ct_option, and to not try to get the version. Maybe something like
$dbh = DBI->connect('dbi:Sybase:server=MSTR_REP;serverType=OS;...', 'sa',
'...', ...);
where OS means OpenServer. This could then be useful when connecting to
other types of openserver apps, not just RepServer.
I'm of course open to other suggestions as well.
Michael
Extranet
matthew.persico@xxxxxxxxx - 23.11.2006 04:20
To: dbi-users
cc:
Subject: Fwd: Can't connect to Sybase Rep server
---------- Forwarded message ----------
From: Matthew Persico <matthew.persico@xxxxxxxxx>
Date: Nov 20, 2006 12:45 PM
Subject: Re: Can't connect to Sybase Rep server
To: Michael Peppler <mpeppler@xxxxxxxxxxx>
Well, it's been more than a week. :-) No, I have not been on jury duty
THAT long, but now this is a production problem...
Well not really, I was able to fall back to using DBD::Sybase 1.00.
On DBD::Sybase 1.07 and your test 1.07_02 (from March 6), I get an
error connecting to a rep server.
Here is a test piece of code:
use DBD::Sybase;
$ldbh = DBI->connect("dbi:Sybase:"
... "server=REPP"
... ";hostname=" . 'nycux-25k102'
,'REPP_maint'
,'*******'
,{RaiseError=>1});
print $ldbh->errstr();
my $dummy = 6;
and results:
Server message number=17001 severity=10 state=0 line=0 server=REPP
text=No SRV_OPTION handler installed.OpenClient message: LAYER = (1)
ORIGIN = (1) SEVERITY = (1) NUMBER = (183)
Server REPP, database
Message String: ct_options(): user api layer: external error: An error
was returned from the server while setting the options, check the
server message for details.
Server message number=2056 severity=12 state=0 line=0 server=REPP
text=Line 1, character 8: Incorrect syntax with 'select'.
Any suggestions?
On 3/6/06, Matthew Persico <matthew.persico@xxxxxxxxx> wrote:
I'm on jury duty. It may take a week to get back to you.should
On 3/6/06, Michael Peppler <mpeppler@xxxxxxxxxxx> wrote:
On Thu, 2006-03-02 at 13:53 -0500, Matthew Persico wrote:
See the four attachments. RS is rep server version, the others
be self explanitory. I included the .pl I used just for kicks.
Thanks
Hi Matthew,
Could you try the attached and see if it improves things for you?
Thanks,
Michael
--
Michael Peppler - mpeppler@xxxxxxxxxxx - http://www.peppler.org/
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com/
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
--
Matthew O. Persico
--
Matthew O. Persico
--
Matthew O. Persico
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.
- Follow-Ups:
- Re: Fwd: Can't connect to Sybase Rep server
- From: Matthew Persico
- Re: Fwd: Can't connect to Sybase Rep server
- References:
- Fwd: Can't connect to Sybase Rep server
- From: Matthew Persico
- Fwd: Can't connect to Sybase Rep server
- Prev by Date: Fwd: Can't connect to Sybase Rep server
- Next by Date: Re: Out of memory during "large" request
- Previous by thread: Fwd: Can't connect to Sybase Rep server
- Next by thread: Re: Fwd: Can't connect to Sybase Rep server
- Index(es):
Relevant Pages
|