Results 1 to 2 of 2
  1. #1
    Join Date
    May 2017
    Posts
    1

    Cool Unanswered: SQL Script / AS400 Command : All Schemas Size in GB

    Dear All,

    Need your guys help if you can redirect me to existing post or reply in this post.

    Im looking for SQL Script in DB2 or As400 Command line. To generate Reports or List of all Schemas with Size in GB.

    Thanks Guys.

  2. #2
    Join Date
    May 2010
    Location
    India
    Posts
    90
    Provided Answers: 2
    If your OS version is 7.1 or later with recent TR (technology refresh), you can use following SQL to get size (GB) of library. For more details regarding function used in the SQL, check the link https://www.ibm.com/developerworks/c...on+ease+of+use.


    SQL:

    select s1.objname , sum ( s2.objsize) / ( 1024 * 1024 * 1024 )
    from
    TABLE(qsys2.object_statistics('*ALLUSRAVL', '*LIB')) s1 cross join lateral
    ( SELECT * FROM TABLE(qsys2.object_statistics(s1.objname, '*ALL') ) a ) s2
    group by s1.objname


    Satya...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •