Open Datasource

  • sathwik.em91

    SSC Eights!

    Points: 806

    Hi  I am trying to create Open datasource query to connect to mysql from sqlserver 2017.Could some one help me on this.

    SELECT

    * FROM

    OPENDATASOURCE (

    'SQLNCLI',

    'Data Source=source server;Catalog=databasename;PWD=xxxxxx;UID=username;PORT=33000').databasename.schemanme.Tablename

    I received following error.

    OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Login timeout expired".

    OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".

    Msg 5, Level 16, State 1, Line 76

    Named Pipes Provider: Could not open a connection to SQL Server [5].

    OLE DB provider "SQLNCLI11" for linked server "(null)" returned message "Invalid connection string attribute".

    please let me know  if there is an other way of connecting from sqlserver  to mysql other than creating a linked server.

     

    Thanks in advance.

  • Mike01

    SSChampion

    Points: 11282

    I thought SQLNCLI was for SQL Server not MySQL?  Have you checked you connection strings?

     

    https://www.connectionstrings.com/mysql/

     

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

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

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