Solved

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

Posted on 2015-02-20
3
196 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 24

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now