Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2006
    Posts
    13

    Unanswered: How to communicate between two different servers from one stored procedures

    Iam using Sybase 12.53

    There is a stored procedure where for a particular column of the resultset we need to search for some data in one server and if the data is not there in that server we need to look for the data in another server.

    Is it possible to communicate between two different servers from one stored procedures? If it is possible can anyone tell me how to do that?

    I am not using distributed database.

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    You need to create a proxy table for the remote table in the local database (or in another database on the local server).
    Then you query that proxy table from your stored proc.

    Michael

  3. #3
    Join Date
    Nov 2006
    Posts
    13
    Thanks Michael. Can u please suggest on creating proxy tables.

    Thanks,
    Sumesh

  4. #4
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    Please read the Sybase docs on the "create existing table" command (in the Reference Manual).

    http://infocenter.sybase.com/help/in...nds/X35636.htm

    Michael

  5. #5
    Join Date
    Dec 2006
    Posts
    5
    Michael even I am facing the same problem as Sumesh and tried what you explained.

    I am facing a problem while creating a proxy table. The remote server what am trying to access is not there in sysservers. Can I add it to the sysservers and if I can could you please explain how to add it?

  6. #6
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Before you can define proxy tables you'll have to ensure:

    The local and remote servers must exists on both servers
    and must be in the interface file
    e.g. on srv1
    exec sp_addserver srv1, local, srv1
    exec sp_addserver srv2, ASEnterprise, srv2

    Check
    max cis remote connections

    maybe set "cis rpc handling" to 1

    Add remote logins e.g.
    exec sp_addremotelogin srv2, sa, sa
    exec sp_remoteoption srv2, sa, sa, trusted, true

    or
    exec sp_addexternlogin srv2, myid, myid, mypasswd

  7. #7
    Join Date
    Dec 2006
    Posts
    5
    Thank you pdreyer for your prompt reply

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •