How to connect DB2OLEDB provider data link (SQLSERVER) to one DB2/AS400 with SSL/TLS

Oneby 0 Reputation points
2024-07-29T12:26:34.7433333+00:00

Hi there,

Target: use DB2OLEDB provider from SQL Server data link to connect to one DB2/AS400 database using port 448 (SSL/TLS)

I have one Windows Server 2019 and one SQL Server 2019 installed.

I have also instaled Data Access Tool version 7 that includes connector DB2OLEDB.

Port 448 is opened

DB2/AS400 has enable the user profile that I am using for testing. Also port 448 is listening and working fine.

FIRST TEST FROM Data Access Tool.

After to configure the destination IP, port, database name, check in SSL box, code and languages to use, the test works successfully and I can get the UDL or Provider String correctly.

Moreover I can perform a Query test from this tool and it displays the list of DB2 libraries correctly.

SECOND TEST from SQL SERVER.

To perform the test I am creating one new dblink.

I choose Microsoft OLE DB provider for DB2

In Product name I type DB2OLEDB.

In Provider String I copy and paste the exact text got from Data Access Tool

In Security I type the username and password of AS400 profile.

The result is following error: Cannot initialize the data source object of OLE DB provider "DB2OLEDB" for linked server "DB2OLEDB".

OLE DB provider "DB2OLEDB" for linked server "DB2OLEDB" returned message "". (Microsoft SQL Server, Error: 7303)

Having a look at the system I have seen that if I remove "Certificate Common Name" parameter from the string, then I see that the dblink is trying to connect through port 448.

Leaving Certificate Common Name parameter, the SQL Server displays the error without any attempt to connect.

I have no more options to cnnect through secure port.

Did you have a similar experience in relation to connect to DB2/AS400 using DB2OLEDB and in a secure SSL/TLS mode?

Thanks in advance,

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,389 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. LucyChenMSFT-4874 3,470 Reputation points
    2024-07-30T05:43:39.9133333+00:00

    Hi @Oneby ,

    Thanks for your reaching out and welcome to Microsoft Q&A!

    Did you have a similar experience in relation to connect to DB2/AS400 using DB2OLEDB and in a secure SSL/TLS mode?

    Please refer to this article, it shows the steps in detail, hope it can help you well!

    The result is following error: Cannot initialize the data source object of OLE DB provider "DB2OLEDB" for linked server "DB2OLEDB". OLE DB provider "DB2OLEDB" for linked server "DB2OLEDB" returned message "". (Microsoft SQL Server, Error: 7303)

    In addition, this error message indicates that the linked server does not have correct login mapping. You can execute the sp_helplinkedsrvlogin stored procedure to set the login information correctly. Also, verify that you have specified the correct parameters for the linked server configuration.

    Feel free to share your issues here if you have any concerns!

    Best regards,

    Lucy Chen


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    https://docs.microsoft.com/en-us/answers/support/email-notifications