cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marciokataoka
Frequent Visitor

Need to connect to a DB2 database! How to?

I need to perform select, update, insert and delete in a DB2 database. How can I connect to it? 

I read a post about it but the answer was just "create a gateway" but did not told how to do it.

Is there a documentation about gateway for DB2?

22 REPLIES 22
Pstork1
Dual Super User III
Dual Super User III

Here's the documentation on the DB2 connector.  https://docs.microsoft.com/en-us/connectors/db2/ . The comment about the gateway was because your DB2 database is usually installed on-premises.  To use the DB2 connector you need a way to access the DB2 database on-Premises.  Installing a gateway will let you connect to DB2 using the DB2 connector.  Here's info about how to install an on-premises gateway.  https://docs.microsoft.com/en-us/flow/gateway-manage



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-yutliu-msft
Community Support
Community Support

Hi @marciokataoka ,

Could you tell me do you want to connect with DB2 in local or on cloud?

Firstly, if you want to create a new connection, you need to click View->data source->add data source->new data source->enter DB2->choose DB2813.PNG

 

1)If you want to connect with DB2 in local

You need to create a gateway firstly.  (download a gateway, then open and configure it)

Here's a doc about how to start a gateway:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/gateway-reference

Then, choose your gateway and enter your DB2 information here:81.PNG

 

2)If you want to connect with DB2 on cloud

You just need to enter your DB2 information here:812.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Pstork1 

 

Thanks for your comment. My main issue is getting the gateway installed on the AS400. Its runs OS400 operational system and the installer for the gateway seems to be Windows only.

Hi @v-yutliu-msft 

 

Thanks for the comments. As told to @Pstork1 , I don't know how to get the gateway installed on the AS400 because of the operational system(OS400).
I already did those steps you mentioned above but I need to get the gateway running first.

The gateway needs to be installed on a PC that can get a local network connection to the AS400 where DB2 is running.  You can't run the gateway on the AS400 itself.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

That´s good news @Pstork1  ! I already have a gateway installed on my SQLServer machine. Is it possible to have a second gateway on the same machine? One pointed to SQL(the existing one) and other to DB2?

You don't need a second gateway.  You can use the same gateway for multiple connectors.  Simply specify that gateway when you are creating the connector for DB2.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I've tried to use the same gateway but I got: Microsoft Db2 Client: No connection could be made because the target machine actively refused it

 

 

That would suggest that the gateway couldn't talk to DB2 using the credentials and connection information you supplied.  I don't think installing another gateway would help in that particular case.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,530)