472,794 Members | 2,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,794 software developers and data experts.

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 9753
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Lennart Jonsson | last post by:
Hi, I'm using db2 udb linux v7.2 fixpak 9 and came across a problem. I didnt find it in any apar nor mentioned in this newsgroup, so I'm curios if anyone else experienced it, and how they solved...
1
by: Lyn Duong | last post by:
Hi When I want to get the ddl for a table, i use db2look -d dbname -e -t tabname. Why does this produce all ddl for functions, federated objects and all other unwanted stuff. Is there a way...
5
by: Bruce | last post by:
I have several user defined functions which are referenced in triggers and views. For software upgrades, I need to be able to drop the triggers and views which reference these user defined...
6
by: sriram | last post by:
Hi, I have been seing a weird problem with db2look tool in db2 8.2 on Windows 2000 platform. When i spool the DDL using db2look, it spools the DDL in the ascending order of database objects...
8
by: db2sysc | last post by:
All: I tried to run db2look on V8.2 DB for getting ALL the DLLS for the database. When I look into the output file, the SQL procedures code is not present. Instead I see an external entry...
2
by: shsandeep | last post by:
Hi, I executed the following db2look statement but got an 'Execute' privilege error. What privileges do I need to execute the 'db2look' utility? /home# db2look -d dbname -e -o sql.txt -- No...
1
by: Gregor Kovańć | last post by:
Hi! On one machine I have DB2 8.2.4 and on one I have DB2 9.1. If I run db2look from the DB2 9.1 machine against a database that is on the DB2 8.2.4 I get: SQL5060N The configuration parameter...
2
by: Justin | last post by:
Is there a way to get the ddl for a subset of tables? In this case, get all the tables beginning with emp from the sample db? Example db2look -e -tw emp* -d sample
1
by: blaisestephen | last post by:
I have a dilema where I want to run DB2LOOK to keep copies of our table DDL's and procedures for our schema. the problem is that we do not even have select privilege for the SYSCAT schema, which...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.