top of page

SQL Queries to get packages and tables information from DB2 database

You can copy and keep below SQL oneliners to get packages and tables details from DB2 database.


1. SQL to get the Package details

select pkgname, pkgschema, pkgversion, unique_id, boundby, total_sect, valid, format, isolation, blocking from syscat.packages order by pkgschema, pkgname, pkgversion;

2. SQL to get the package details for the schema user

select pkgname, pkgschema, pkgversion, unique_id, boundby, total_sect, valid, format, isolation, blocking from syscat.packages where pkgschema = USER order by pkgschema, pkgname, pkgversion;

3. SQL to get the table creation time details

select tabname, tabschema, type, create_time from syscat.tables order by tabschema, tabname;

4. SQL to get the table details for user schema

select tabname, tabschema, type, create_time from syscat.tables where tabschema = USER order by tabschema, tabname;

5. SQL to get system tables details for schema SYSCAT

select tabname, tabschema, type, create_time from syscat.tables where tabschema = 'SYSCAT' order by tabschema, tabname;

6. SQL to get the details for NULL ID packages

select pkgname, pkgschema, pkgversion, unique_id, boundby, total_sect, valid, format, isolation, blocking from syscat.packages where pkgschema = 'NULLID' order by pkgschema, pkgname, pkgversion;

That's all in this post. If you liked this blog and interested in knowing more about IBM Db2. Please Like, Follow, Share & Subscribe to www.ImJhaChandan.com.

Comentários


jc_logo.png

Hi, thanks for stopping by!

Welcome! to my “Muse & Learn” blog.

This website will help you to learn useful queries/SQL, Tips to troubleshoot problem and their remediation, perform DB related activities etc... and don't forget to muse with us :)....

It cover few useful information on below topics :

 

MySQL, SQL Server, DB2, Linux/UNIX/AIX, HTML ....

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • Twitter
© 2023 By ImJhaChandan
bottom of page