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

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
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
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.