Linked Server weirdness to Sybase

  • This is for a linked server on SQL 2008 R2.

    Here are the facts:

    SQL 2008 R2 on Microsoft Windows Server 2003 R2 (SP2)

    I created a Sybase Linked server and it works fine for me.

    When one of the developers try to use it, SELECT * FROM OPENQUERY(mylinkedserver, 'select * from table1'), he gets this message: Cannot create an instance of OLE DB provider "ASEOLEDB" for linked server "mylinkedserver".

    The developer AD login is also setup as a sysadmin on the sql server instance.

    The developer has no problems using an Oracle linked server

    When I make the developer an administrator to the server itself, the linked server works for him.

    Any ideas why? We cannot make the developer an admin to the server itself so we took him out of the "Administrators" group and the linked server no longer works.

    Edit: Here's the script to create the linked server. Names, Dates, Ports, Places, and other stuff have been change to protect the innocent.

    EXEC master.dbo.sp_addlinkedserver @server = N'mylinkedserver', @srvproduct=N'Sybase', @provider=N'ASEOLEDB', @datasrc=N'sybaseServer,8888'

    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'mylinkedserver',@useself=N'False',@locallogin=NULL,@rmtuser=N'username',@rmtpassword='########'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'collation compatible', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'data access', @optvalue=N'true'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'dist', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'pub', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'rpc', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'rpc out', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'sub', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'connect timeout', @optvalue=N'0'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'collation name', @optvalue=null

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'lazy schema validation', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'query timeout', @optvalue=N'0'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'use remote collation', @optvalue=N'true'

    GO

    EXEC master.dbo.sp_serveroption @server=N'mylinkedserver', @optname=N'remote proc transaction promotion', @optvalue=N'true'

    GO

  • It has been a long time since i worked in a mixed environments and my current one does not a sybase db so I can only mention few things which I can recall.

    I can recall from my memory that we used to create DSNs in order to create linked server to Sybase. On your server, have you configured a system DSN for the above Sybase database? Please confirm the same.

    Chandan

  • If your answer is 'YES' to my question above, then I can recall that system DSN can be used by everyone who is a user of that system. When you make this guy a server admin, the DSN is accessible to him otherwise not. Try adding him as a normal user(not any admin) to the server and then verify if this guy is able to use the DSN. also, we need to make sure that remote desktop ability for him remains disabled so ask your windows guys to assign him the least permissions.

    Try this please.

  • No, there are no DSNs setup on the server.

  • bw03 (7/27/2011)


    No, there are no DSNs setup on the server.

    are you on a 32-bit server or 64 bit. I am sure that i used to configure 32-bit DSNs for connecting to sybase 4 years back. not sure what is the new way being used these days.

  • 32bit. We're using the OLEDB provider not ODBC.

  • bw03 (7/27/2011)


    32bit. We're using the OLEDB provider not ODBC.

    You had mentione that the developer is sysadmin on sql server so i find it strange that something is stopping him.I suggest you run the profiler and ask your developer to try and fire a query using the linked server and see if something comes up in profiler.

    Also, i would like you to open a question in msdn forums in an rea which deals with connections from SQL to heterogenous database engines.

  • We had a similar instance, where a linked server that once functioned for certain users stopped functioning. Our solution was actually to increase the permissions on the Windows server for the Windows user under which the (local) server instance was running as a service. Not sure if it was a Windows OS update, or something else that caused the issue, but that solved it.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply