none
使用POLYBASE连接到外部mongodb报错 RRS feed

  • 问题

  •  数据库版本:

    Microsoft SQL Server 2019 (RTM-CU10) (KB5001090) - 15.0.4123.1 (X64) 

    ====================================

     CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'XXXXXXX';

       CREATE DATABASE SCOPED CREDENTIAL credential_name
       WITH IDENTITY = 'im', Secret = '123456';

        CREATE EXTERNAL DATA SOURCE external_data_source_name
        WITH (
        LOCATION = 'mongodb://192.168.106.223:27017',
        -- PUSHDOWN = ON | OFF,
          CREDENTIAL = credential_name
        );

    -------------这个脚本报错

    CREATE EXTERNAL TABLE user_connect_log(
         [_id] nvarchar(30) ,
         [user_id] nvarchar(100),
         [protocol] nvarchar(100) ,
         [node] nvarchar(100),
         [peer_host] nvarchar(100),
         [reason] nvarchar(100) ,
    [sock_port] int ,
    [type] nvarchar(100) ,
    [timestamp]  BigInt 
         )
         WITH (
         LOCATION='im.user_connect_log',
         DATA_SOURCE= external_data_source_name
         );

    105082;一般 ODBC 错误: [Microsoft][MongoDBODBC] (110) Error from MongoDB Client: 
    No servers yet eligible for rescan (Error Code: 13053) Additional error <2>: ErrorMsg: [Microsoft][MongoDBODBC] (110)
    Error from MongoDB Client: No servers yet eligible for rescan (Error Code: 13053), SqlState: HY000, NativeError: 110 。

    请问下使用POLYBASE连接mongodb还需要安装mongodb的客户端?

    参考文档:

    https://docs.microsoft.com/zh-cn/sql/t-sql/statements/create-external-table-transact-sql?view=sql-server-ver15&tabs=dedicated#k-create-an-external-table-for-mongodb




    2021年7月30日 8:25

答案

  •  数据库版本:

    Microsoft SQL Server 2019 (RTM-CU10) (KB5001090) - 15.0.4123.1 (X64) 

    ====================================

     CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'XXXXXXX';

       CREATE DATABASE SCOPED CREDENTIAL credential_name
       WITH IDENTITY = 'im', Secret = '123456';

        CREATE EXTERNAL DATA SOURCE external_data_source_name
        WITH (
        LOCATION = 'mongodb://192.168.106.223:27017',
        -- PUSHDOWN = ON | OFF,
          CREDENTIAL = credential_name
        );

    -------------这个脚本报错

    CREATE EXTERNAL TABLE user_connect_log(
         [_id] nvarchar(30) ,
         [user_id] nvarchar(100),
         [protocol] nvarchar(100) ,
         [node] nvarchar(100),
         [peer_host] nvarchar(100),
         [reason] nvarchar(100) ,
    [sock_port] int ,
    [type] nvarchar(100) ,
    [timestamp]  BigInt 
         )
         WITH (
         LOCATION='im.user_connect_log',
         DATA_SOURCE= external_data_source_name
         );

    105082;一般 ODBC 错误: [Microsoft][MongoDBODBC] (110) Error from MongoDB Client: 
    No servers yet eligible for rescan (Error Code: 13053) Additional error <2>: ErrorMsg: [Microsoft][MongoDBODBC] (110)
    Error from MongoDB Client: No servers yet eligible for rescan (Error Code: 13053), SqlState: HY000, NativeError: 110 。

    请问下使用POLYBASE连接mongodb还需要安装mongodb的客户端?

    参考文档:

    https://docs.microsoft.com/zh-cn/sql/t-sql/statements/create-external-table-transact-sql?view=sql-server-ver15&tabs=dedicated#k-create-an-external-table-for-mongodb




    已解决:

        CREATE EXTERNAL DATA  需要添加参数:

         CONNECTION_OPTIONS = 'ssl=false;'

    2021年7月30日 8:53

全部回复

  •  数据库版本:

    Microsoft SQL Server 2019 (RTM-CU10) (KB5001090) - 15.0.4123.1 (X64) 

    ====================================

     CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'XXXXXXX';

       CREATE DATABASE SCOPED CREDENTIAL credential_name
       WITH IDENTITY = 'im', Secret = '123456';

        CREATE EXTERNAL DATA SOURCE external_data_source_name
        WITH (
        LOCATION = 'mongodb://192.168.106.223:27017',
        -- PUSHDOWN = ON | OFF,
          CREDENTIAL = credential_name
        );

    -------------这个脚本报错

    CREATE EXTERNAL TABLE user_connect_log(
         [_id] nvarchar(30) ,
         [user_id] nvarchar(100),
         [protocol] nvarchar(100) ,
         [node] nvarchar(100),
         [peer_host] nvarchar(100),
         [reason] nvarchar(100) ,
    [sock_port] int ,
    [type] nvarchar(100) ,
    [timestamp]  BigInt 
         )
         WITH (
         LOCATION='im.user_connect_log',
         DATA_SOURCE= external_data_source_name
         );

    105082;一般 ODBC 错误: [Microsoft][MongoDBODBC] (110) Error from MongoDB Client: 
    No servers yet eligible for rescan (Error Code: 13053) Additional error <2>: ErrorMsg: [Microsoft][MongoDBODBC] (110)
    Error from MongoDB Client: No servers yet eligible for rescan (Error Code: 13053), SqlState: HY000, NativeError: 110 。

    请问下使用POLYBASE连接mongodb还需要安装mongodb的客户端?

    参考文档:

    https://docs.microsoft.com/zh-cn/sql/t-sql/statements/create-external-table-transact-sql?view=sql-server-ver15&tabs=dedicated#k-create-an-external-table-for-mongodb




    已解决:

        CREATE EXTERNAL DATA  需要添加参数:

         CONNECTION_OPTIONS = 'ssl=false;'

    2021年7月30日 8:53
  • 已解决:

        CREATE EXTERNAL DATA  需要添加参数:

         CONNECTION_OPTIONS = 'ssl=false;'

    你好,

    很高兴看到您的问题已解决。感谢分享的解决方案。

    2021年8月2日 2:31