Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List available library - SQL Linked Server AS400

I'm using SQL server 2005 (64bit version) and have successfully connect to as400 using IBM DB2 UDB for iSeries IBMDA400 OLE DB Provider. Anyone know how to list available library/table and get the field name & description?

already looking around, and have tried this query, but still no luck

select * from OpenQuery(AS400, 'select * from QSYS.qadbxatr');
like image 206
BimoS Avatar asked Jul 10 '13 04:07

BimoS


1 Answers

The information is available through the catalog views in the SYSIBM schema.

Schema (library) information is available in SQLSCHEMAS.

Table (file) information is available in SQLTABLES.

Column (field) information is available in SQLCOLUMNS.

  • V7R1: IBM i catalog tables and views
  • V5R4: ODBC and JDBC catalog views
like image 174
James Allman Avatar answered Sep 21 '22 17:09

James Allman