Re: DBD::Sybase not connecting - acts like it is not using FreeTDS

Darrell Cormier <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
James K. Lowden said the following on 02/13/2013 03:42 PM:
> On Wed, 13 Feb 2013 19:46:49 +0000
> Darrell Cormier <[email protected]> wrote:
>
>> I get the following message when the statement handle is executed:
>> DBD::Sybase::st execute failed:
> [unwrapping...]
>> Server message number=7202
>> severity=11
>> state=2
>> line=1
>> server=DLUS2-SQL
>> text=Could not find server 'dlus2' in sys.servers. Verify that the
>> correct server name was specified. If necessary, execute the stored
>> procedure sp_addlinkedserver to add the server to sys.servers. at
>> <path to perl script>/devices.pl line 19.
> ...
>> I have never experienced this on other Linux installs.  Have you
>> experienced this and can you give me an idea why it is looking for
>> the sys.servers rather than using the server config
>> in /usr/local/etc/freetds.conf?
>
> The 7202 message isn't coming from FreeTDS; it's coming from the
> server, specifically the server named "DLUS2-SQL".
>
> Whenever you see an error message that includes the name of the server,
> you know you're dealing with a server message, not an error from the
> library.
>
> Something in your query makes the server think that the string "dlus2"
> refers to a server.  My guess is your SQL includes something like
>
> 	execute dlus2.dbname.schema.procname
>
> where you intend "dlus2" to refer to the server running the query, but
> it knows of itself as "DLUS2-SQL".  It interprets your query as a
> remote procedure call, and tries (and fails) to look up "dlus2" among
> its named servers in sys.servers.
>
> HTH.
>
> --jkl
>
>
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>


James,
Thanks for that response.  Yes, you are correct.  The odd thing is that 
I copied these perl scripts directly from an old server (configured in 
about 2005), which is still running these scripts, and they still work 
well.  I am wondering if there is a slight change in the newer versions 
of DBD::SYBASE that are a little more picky about the server 
designation.  No matter, I was able to strip all but the table name from 
my query statement and it worked well.

Thanks again for the input.

--DC


SPAM and Virus prevention by Barracuda Network Solutions
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.