AS400 Database Connection

Hi All,

I need some help setting up a connection to an AS400 in Ignition.
I’ve read this post IBM AS400 Database connection but I still can’t get a valid connection :frowning:
In order to have a connection:
Do I have to create a new Database Drivers (Setting - Drivers - Database Drivers & Settings) or the IBM DB2 Driver would be ok?

Try this link from IA knowledge base. I used this a while back and it worked for me.

1 Like

Well, this is helpful! A lot! :+1:
But still can’t get a connection, can someone explain to me how the connection URL should be done?
jdbc:as400://IPorHOSTNAME/Schema
jdbc:as400 this part is standard and I get it.
//IPorHOSTNAME/Schema this part?

This is how mine is setup. Our IT department did this part, so I can’t advise you any more than that.
jdbc:as400://iseries.cfc.local/Schema

Watch out, a DB is only considered "connected" by Ignition when the validation query returns a result. Did you set it to select 1 from sysibm.sysdummy1 as described in the article? A simple SELECT 1 won't work for DB2.

This is how I have my connection configured, so yes it is needed.

Yes, I have done everything as the article says.
The only thing that concern me is the URL connection…

Do you know what iseries,cfc,local mean?
Are they 3 separated fields or just one?

Found it! :confetti_ball::tada:
I’m so dumb! IPorHOSTNAME is IP or HOSTNAME!
jdbc:as400://IPaddress/Schema
and if you want a specific library you have to add libraries=YourLibrary to the Extra Connection Properties
I got a valid connection! Thanks to all!

2 Likes

Hi guys,
How do you interact with As400 via Ignition? I have valid connection with it, but can’t see any schema/library with the database query browser.

That is a function of the JDBC driver and the privileges granted to the connection. You might find suggestions via web search, but you might also have to operate blind in the designer.

Thanks for the reply Pturmel

Can you explain bit more on the web search? AS400 web search? You meant sysa or sysb,etc..

I’m new to this AS400!

I meant Google or StackExchange or something like that. AS400 is a bit niche--I have no experience with it (other than a chip design internship long, long ago :neutral_face: ).

1 Like

Do you guys know why even I don’t turn on the execute, it still receives the data from as400?
seems like I need to kill connection