Solved

How do you generate DB2 Tables that mirrors the DB2 administative MON_* views?

Posted on 2015-02-20
3
200 Views
Last Modified: 2015-03-09
Hello,

Is there an easier way to create DB2 tables like the administrative MON_* views? I have tried doing this from data studio by selecting the views generating the ddl that way but what I got looks like I have to manually striping everything off but the list of column elements that is returned if the view is called. That seems a long way to do this.

Any recommendation will be highly appreciated.

Thanks

Enyimba
0
Comment
Question by:Enyimba
  • 2
3 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 40624820
HI!

If you want some sort of historical tables for the adminstrative views then you can look
at this link
http://www.ebenner.com/db2dba_blog/?p=9

It has DDL's for certain history tables as well as how to populate them.
For other adminstrative views that are not covered there you could
try to issue

create table mon..._hist like mon...view
or
CREATE TABLE SCHEMA.MON_..._HIST AS (
    SELECT *
    FROM SCHEMA.MON_...VIEW
) WITH NO DATA

Hope this helps.

Regards,
     Tomas Helgi
0
 

Author Comment

by:Enyimba
ID: 40629841
TomasHelgi,

Thank you for the link. I have had the chance to read through the content and what I find is that the snapshop monitoring strategy is slowly being abandoned in favor of the new MON_GET_* monitor views introduced in DB2 9.7 and later. That is the way I wish to go in building my performance database warehouse tables. Having said that, the SQL pseudo code you have provided gives me something towork with. I will try to gn the tables from what you have shown.

Again thank you for writing...

Enyimba
0
 

Author Closing Comment

by:Enyimba
ID: 40655377
Again, thanks Tomas
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question