AS400 SQL / DB2


Been looking for reference material for the SQL for this system.

Connecting using app to query. Went to IBM site but pages are no longer available. What’s the best app to query the DB? Used winsql in the past for other work,


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shalom CarmelCTOCommented:
Shalom CarmelCTOCommented:
Gary PattersonVP Technology / Senior Consultant Commented:
IBM i V7R1 and earlier OS versions

If you need to access IBM i DB2 from .NET, the best tool is the IBM i DB2 ADO.NET Provider.  This data connector is part of the IBM i Access for Windows licensed program that is provided by IBM with every system.  You should be able to obtain installation media from your IBM i system administrator.    Same package includes ODBC and OLDdb drivers for IBM i DB2, as well.

If you have no other way to get media, you can order DVD copies of the last version of IBM i Access for Windows (V7R1) - on the IBM Publications Web site.

Product number: SK3T-4098-05

V7R2 and later

IBM i DB2 ADO.NET driver is also an optional component of the newer IBM i Access Client Solution (ACS), which replaces IBM i Access for Windows.

You'll need the "IBM i Access Client Solutions - Windows Application Package" optional component to get data drivers.  Instructions are on the IBM web site.  You may need assistance from your IBM i Administrator, IBM Business Partner, or IBM Technical Support to obtain this package, depending on how your relationship with IBM is set up.

SQL Query Tools

One you have the drivers, you can use just about any SQL compatible tool that can use ADO.NET, OLEdb, or ODBC to access IBM i DB2.  I use the "Run SQL Scripts" function in IBM i Navigator, generally, or the green-screen tools STRSQL.  IBM provides a free Eclipse-based cross-platform DB tool called "IBM Data Studio".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Theo KouwenhovenApplication ConsultantCommented:
Hi Ross13,

This page includes all connectionstrings you can use for the AS/400 (aka iSeries),

I prefer the ODBC version , but they all work flawless.
Gary PattersonVP Technology / Senior Consultant Commented:
From the IBM Redbook Integrating DB2 Universal Database for iSeries with Microsoft ADO .NET:

If you are using the .NET framework to connect to an iSeries host, choose the IBM.Data.DB2.iSeries database provider to support your PC and iSeries SQL application development. This managed provider offers better performance than using the System.Data.OleDb provider to bridge to an iSeries Access OLE DB provider, or using the Microsoft.Data.Odbc provider to bridge to the iSeries Access ODBC driver.
ross13Author Commented:
Thanks for the help guys
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.