Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2015-02-20
3
Medium Priority
?
239 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

618 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