Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2010
    Posts
    207

    Unanswered: Query to different SYSIBM Tabled on DB2 z/OS - Who can help?

    Hello friends,

    i want to to compare my indexes from production environment with the test environment.
    Therefore I want to ask the sysibm.sysindex and sysibm.syskeys tables on both systems.

    This means i would like to find out with Index exist in production, which dont exist in test. This indexes i want to create then afterwards.
    On the other hand I would like to remove the indexes that exist in test, but dont in production.

    -------------------------------------------------------------------------------------------------------------------------------------------------------

    1st Query --> Query for all Indexes that don´t exist in Test environment but not in Production!

    I have thought of running this query in production first:

    I am still getting an error. Can anyone help me here?

    -------------------------------------------------------------------------------------------------------------------------------------------------------

    2nd Query --> Query for all Indexes that exist in Test but dont exist in Production!

    Same query as 1st one in test.

    "Save data as db2.table2"

    then run query in production and use keyword "select * NOT IN" or "select * NOT EXISTS"

    -------------------------------------------------------------------------------------------------------------------------------------------------------

    3rd Query --> Query that shows up all Indexes that have different indexparameters like Cluster or Uniqueness but contain same columns!

    Here I imagine to run a query that queries 2 tables in 1 query

    SYSIBM.SYSINDEXES (Column CLUSTERING, CLUSTERED, UNIQUERULE) and SYSIBM.SYSKEYS (Column COLUMNAMES)

    Basically same as 2st two queries


    -------------------------------------------------------------------------------------------------------------------------------------------------------

    4th Query --> Query that shows up all Indexes but different columns from test and production environment!

    Query to SYSIBM.SYSINDEXES first in Production and then in Test environment

    Use NOT IN in Select to get result.


    -------------------------------------------------------------------------------------------------------------------------------------------------------

    Thank you in advance for your help. I really appreciate it.

    Regards,

    DBN00b
    Last edited by DB_N00b; 11-15-16 at 06:09.

  2. #2
    Join Date
    Oct 2007
    Posts
    52
    Provided Answers: 3
    do you not have any tools for comparing objects structures? there are quite a few out there and on most systems. Currently I use free ware Toad for DB2. Even most modeling apps can do the compare for you rather than write your own and put a ton of manual work into it.

    Dave Nance

  3. #3
    Join Date
    Jan 2010
    Posts
    207
    I actually would like to get this result in host if its possible ;-)

    But I have DataStudio installed!
    Last edited by DB_N00b; 11-11-16 at 09:54.

  4. #4
    Join Date
    Jan 2010
    Posts
    207
    No one got an idea? Sad

  5. #5
    Join Date
    Oct 2007
    Posts
    52
    Provided Answers: 3
    plenty of ideas, but is a waste of time as there are tools as I mentioned previously that you can use instead of redesigning the wheel. Also, you don't ask any specific question. You say you are getting an error, but don't tell us what the error is or what exactly you are doing. If you want assistance be specific on what it is you are looking for. Most of us that answer questions are doing it during our free time and do not have time for esoteric questions that are a waste of time. Other than that you can, normally, find the answer to your error on page 267.

  6. #6
    Join Date
    Dec 2016
    Posts
    4
    Quote Originally Posted by DNance View Post
    plenty of ideas, but is a waste of time as there are tools as I mentioned previously that you can use instead of redesigning the wheel. Also, you don't ask any specific question. You say you are getting an error, but don't tell us what the error is or what exactly you are doing. If you want assistance be specific on what it is you are looking for. Most of us that answer questions are doing it during our free time and do not have time for esoteric questions that are a waste of time. Other than that you can, normally, find the answer to your error on page 267.
    Hello,
    I confirm : there are a lot of Tools that may help you to compare DB2 objects in different sub-system, if you do not have any of them, at least show us what are your SQL requests
    I use Platinum RC-migrator option for that kind of comparison
    Regards

Posting Permissions

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