Login Failed 18456

  • Hello,

    I am trying to link two servers:

    - Same Domain

    - Same service account

    I am using Enterprise Manager --> Security --> Linked Servers --> New Linked Server --> General Tab

    <<Server Name>> and SQL Server --> Security --> For each a login not defined in the list above, the connection will:

    Be Made using the security context:

    Remote Login: Domain\Service Account, Password

    Nothing else.

    The Server Name appears in the list but when clicking on Tables or Views I have the error 18456.

    Any idea? Any logs?

     

    ** When using:

    Be Made using the login's current security context it is working fine. I am currently logged in with the service account. 

    Thanks,

     

  • Try this in Query Analyzer

    DECLARE @LinkedServer nvarchar(30),

            @IP_Id        nvarchar(15),

            @LoginId      nvarchar(30),

            @Password     nvarchar(30)

    SET @LinkedServer = N'SERVER'

    SET @IP_Id        = N'999.999.999.999'

    SET @LoginId      = N'UserLogin'

    SET @Password     = N'Password'

    IF EXISTS (SELECT * FROM sysservers WHERE srvname = @LinkedServer)

       Exec sp_droplinkedsrvlogin @LinkedServer, null

    IF EXISTS (SELECT * FROM sysservers WHERE srvname = @LinkedServer)

       Exec sp_dropserver @LinkedServer

    EXEC sp_addlinkedserver

        @server = @LinkedServer, -- This is the predefined ACCT server name for internal purposes.

            @srvproduct = 'MSSQL',

    -- Product name, because it’s a mandatory parameter

            @provider = 'SQLOLEDB',

    -- Provider to be used for linked server

            @datasrc = @IP_Id,

    -- Provided by user

            @catalog = null

    -- Optionally specify name of initial catalog

    Exec sp_addlinkedsrvlogin @LinkedServer, 'false', NULL, @LoginId, @Password

    -- SELECT CODCOLIGADA,IDLAN FROM GERENCIAL.Corpore.dbo.FXCX

    -- go

  • let me try

     

    Thanks

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

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