Solved

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

Posted on 2015-02-20
3
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

739 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