Not associated with a trusted SQL Server connection.

  • I use store procedure to update data between server.

    I set to link server1 to server2 and server2 to server1?

     

    ----------------------------------------------------------------

    CREATE PROCEDURE SPD_SmsDtsShipmentConfFromIDs_SetFlagAndGetDate

    AS

    DECLARE @SetDt           datetime 

    BEGIN

      SET @SetDt = GETDATE()

      UPDATE [MICROSOF-BBC6D6].SMSUat2.dbo.WMSSHPCONF

      SET      TransmitFlag = '9' ,ADDDATE   =   @SetDt

      WHERE TransmitFlag = '0' AND ProcessSource = 'Y'

      UPDATE   [INTELTION].SMSUat.dbo.WMSSHPCONF

      SET      TransmitFlag = '9',ADDDATE = @SetDt

      WHERE TransmitFlag = '0' AND ProcessSource = 'Y'

    END

    ------------------------------------------------------------------

    But when I run query .It show message

    "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection."

     

     

    Help me.What should I do?

  • First you match the user login in both the servers.

  • See from which login ur both sql server are started .

    This problem arises if u had given sa to one server as the startup login.

    and given windows authentication on other server.

    also  when u create the linked server dont forget to give the username for remote connection.

    give sa as username for local server

    give sa as remote user and the password

    give sa as remote login

    also select server option

    (i) dataaccess

    (ii) RPC

    (iii) RPC out

    (iv) use remote collation

     

    hope this help u

    from

    sufian

    and also

     

Viewing 3 posts - 1 through 2 (of 2 total)

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