Dsitributed query question

  • Hi, I have a problem : in a stored procedure, I open data from a server, like this:

    SELECT *

    INTO #T

    FROM OPENDATASOURCE('SQLNCLI',

    'Data Source=Regane-server\SQLEXPRESS;Trusted_Connection=yes;User ID=mihai; Password=parola'

    ).SyncTest.dbo.TestSync

    I am trying to make a synchronisation with the server.

    Problem is : I am connected with user Mihai, and Mihai has sysadmin rights, so , theoretically shouldn't be any problem.BUT

    in c#, when I am calling this stored proc, my message is:

    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

    I can't understand : what user NT AUTHORITY\ANONYMOUS LOGON????I am connecting with Mihai!

    I tried even to create a login with this name, but I couldn't.

    Please, I am trying to make this work for three days now

    Could someone give me a hint?

    Thanks


    Daniela

  • I believe that when you use Trusted_Connection=yes, you are not using SQL server authentication.  Try removing that from the connection string.  Also use 'UID=' instead of 'User ID=' and 'PWD=' instead of 'Password='

    have a look at http://www.connectionstrings.com

    jg

  • Also, if that is the real server name, user, and password, please change your password immediately. Keep in mind you just posted it to a public forum which gets indexed by search engines.

    K. Brian Kelley
    @kbriankelley

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

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