sysobjects in DB2 database

  • I have been using openquery quite regularly to get information from multiple DB2 databases and I consistently have frustration with finding things.  I don't have direct access to the AS/400, only an ODBC connection.

    Can anyone tell me what the equivalent of sysobjects and syscolumns is on the DB2 Database?

  • Perhaps you might be better off posting this to http://www.dbforums.com/f8 or

    http://www.idug.org/ (I think they also host a mailing list)

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • The base table names are sysibm.systables and sysibm.syscolumns, but IBM recommends you use the catalog views - syscat.tables and syscat.columns.

     

  • You could also use ADO to get at this information...

    Set rsobject = connectionobject.OpenSchema (QueryType, Criteria, SchemaID)

    The OpenSchema method returns a read-only RecordSet object that contains schema (which means self-descriptive) information about the data source. For example, schema information can include the names of the tables, the names of the columns in the tables, and the data type of each column.

    See the following site for a good explanation:

    http://www.devguru.com/Technologies/ado/quickref/connection_openschema.html

  • Thanks!  I knew it had to be there somewhere.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply