SQL Server Linked server Query Error.

  • Hi all

    while running the linked server query getting the error.

    server ping response is not a problem and its coontion in ssms also.

    OLE DB provider "SQLNCLI10" for linked server "" returned message "Unspecified error".

    OLE DB provider "SQLNCLI10" for linked server "" returned message "General error".

    OLE DB provider "SQLNCLI10" for linked server "" returned message "Unable to open a logical session".

    Msg 65535, Level 16, State 1, Line 0

    SMux Provider: Physical connection is not usable [xFFFFFFFF].

    Ragu Thangavel

  • Test your linked server connectivity from SSMS, if unsuccessful then check the SQL Logs.

  • Ragu

    Care to post the query, please? I'm guessing it's got a syntax error or something else that prevents it from compiling. Do you have direct access to the remote server to run the query?

    John

  • john

    thanks for you reply.

    below the query

    select * from [server_ip].db_name.dbo.table_name

  • thanks for you reply

    server connectivity in ssms is ok. the server connecting properly.

  • Does db_name exist on the remote server? Does table_name exist in the dbo schema in db_name? What happens if you go to the remote server and run the query [font="Courier New"]select * from db_name.dbo.table_name[/font]? Can you run any other queries against the linked server? What happens if you right-click on the linked server object and choose Test Connection?

    John

    Edit: by the way, did you actually do a search on the error message? If so, did you try any of the things suggested here?

  • try pinging the Server IP Address from command prompt to learn if the server is responding or not.

  • Hi,

    Server name,database name,schema name and table name also correct. linked server test connection also success. but i am getting the error

  • Hi,

    server pinging perfectly its also connect in ssms also.

  • Hi,

    We must create a login mapping between the linked servers. When SQL Server connects to a linked server in order to execute a distributed query or a stored procedure, it looks for any login mappings for the current login that is executing the query of the procedure. If there is one, it sends the corresponding remote login and password while connecting to the linked server.

    Security for Linked Servers: http://technet.microsoft.com/en-us/library/ms175537(v=sql.105).aspx

    sp_addlinkedsrvlogin: http://technet.microsoft.com/en-us/library/ms189811.aspx

Viewing 10 posts - 1 through 9 (of 9 total)

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