Creating Linked Server to Sybase

  • sybase client is installed on machine where sql server lives

    I have an odbc connection using Adaptive Server Anywhere 9.0 driver supplied by sybase. The test connection works fine.

    here is my simple script to create a linked server

    exec sp_addlinkedserver @server = 'yale-dining-fms' ,

    @srvproduct = 'Sybase',

    @provider = 'MSDASQL',

    @datasrc = 'happy'

    GO

    -- Adding linked server login:

    sp_addlinkedsrvlogin @rmtsrvname = 'yale-dining-fms',@useself='false ',

    @rmtuser = 'dbadmin',

    @rmtpassword = 'password'

    It runs forever and never returns anything. If I do the linked server creation by hand I can see the sybase tables but can not run a select statement against them. I have read many articles on this but with no real answers. Any help would be appreciated.

  • Hi Michael,

    The following is an example of how I connect SQL Server 2005 SP3 to Sybase ASE 12.5.4, ESD#9.1 (using Sybase ASE 12.5.1 Client).

    I hope this is helpful.

    David

    -- Adding linked server:

    EXEC sp_addlinkedserver

    @server = 'StmtSyb1B',

    @srvproduct='Sybase',

    @provider = 'MSDASQL' ,

    @provstr = 'Driver={Sybase ASE ODBC Driver};UID=stmtsqluser;PWD=abc1234;

    DB=Dpprhst;

    NA=Syb1.xyz.com,5000'

    go

    -- Adding linked server login:

    sp_addlinkedsrvlogin @useself='false ', @rmtsrvname = 'StmtSyb1B',

    @rmtuser = 'stmtsqluser',

    @rmtpassword = 'abc1234'

    go

    -- Test:

    sp_tables_ex 'StmtSyb1B'

    go

  • Hi thanks for the help. What is the NA section for?

  • The NA is for the Sybase ASE server name and port number.

Viewing 4 posts - 1 through 4 (of 4 total)

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