470,815 Members | 1,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

views and db2look

One of the databases has 50 views and when I do a db2look I only get
schema for 40 of them. If I select from the sysviews, I can see all 50
(the text column contains schema for all 10 (missing) views). What's
going on here? Why can't or how can I get the schema for these 10
views.

Aix 5.1 V7.2 EE FP9

Thanks.
Nov 12 '05 #1
3 9351
Ian
dbtoo_dbtoo wrote:
One of the databases has 50 views and when I do a db2look I only get
schema for 40 of them. If I select from the sysviews, I can see all 50
(the text column contains schema for all 10 (missing) views). What's
going on here? Why can't or how can I get the schema for these 10
views.

Aix 5.1 V7.2 EE FP9

Thanks.


How are you running db2look?

If you are extracting DDL for a specific schema (-z) or definer (-u),
then db2look will include DDL for the views that depend on the tables
you are extacting.

For example, if you have a schema 'USER1' that has 5 tables, and a
view that does not reference any of the USER1 tables, then executing

db2look -e -z user1

Will NOT include the view.

To get all views in the database, you need to run db2look -e -a, or
specify the appropriate table schema. (I know, this is a pain).

Good luck,

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #2
Can you post the syntax of the db2look command? What do the 10 views
have in common that differentiates them from the other 40? Have you
checked the valid flag in syscat.views:

select viewname, valid from syscat.views

dbtoo_dbtoo wrote:
One of the databases has 50 views and when I do a db2look I only get
schema for 40 of them. If I select from the sysviews, I can see all 50
(the text column contains schema for all 10 (missing) views). What's
going on here? Why can't or how can I get the schema for these 10
views.

Aix 5.1 V7.2 EE FP9

Thanks.


Nov 12 '05 #3
Blair Adamache <ba*******@2muchspam.yahoo.com> wrote in message news:<c0**********@hanover.torolab.ibm.com>...
Can you post the syntax of the db2look command? What do the 10 views
have in common that differentiates them from the other 40? Have you
checked the valid flag in syscat.views:

select viewname, valid from syscat.views

dbtoo_dbtoo wrote:
One of the databases has 50 views and when I do a db2look I only get
schema for 40 of them. If I select from the sysviews, I can see all 50
(the text column contains schema for all 10 (missing) views). What's
going on here? Why can't or how can I get the schema for these 10
views.

Aix 5.1 V7.2 EE FP9

Thanks.


Here is the syntax:
db2look -d mydb -o mydb.ddl -e -x -l -z myschema

i did check sysviews. The other 10 (missing) views have 'mychema' as
owner/schema name and valid field of syscat.sysviews is Y, not X.

I got the schema for one of the views from text column of
syscat.sysviews and manually recreated it and did another db2look as
above -- same story. It does not show up in the ddl output and valid
field shows Y.

Thanx.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Lennart Jonsson | last post: by
1 post views Thread by Lyn Duong | last post: by
8 posts views Thread by db2sysc | last post: by
2 posts views Thread by shsandeep | last post: by
1 post views Thread by Gregor KovaÄŤ | last post: by
2 posts views Thread by Justin | last post: by
1 post views Thread by blaisestephen | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.