473,320 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

db2look spools DDL in the ascending order of DB objects Timestamp only

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 Timestamp and not in the
ascending order of db objects name.

I need to spool the DDL in the ascending order db names. Can anyone
help me out in this?

I have tried the options of db2look. But none of them works out !!
Thanks
Sriram

Nov 12 '05 #1
6 5320
sriram wrote:
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 Timestamp and not in the
ascending order of db objects name.

I need to spool the DDL in the ascending order db names. Can anyone
help me out in this?


Why do you need the different order? Have you considered that the results
from db2look might not be usable in your case if you have dependencies
between the objects (e.g. a view named 'A' based on a table named 'X')?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2
"Knut Stolze" <st****@de.ibm.com> a écrit dans le message de
news:cs**********@fsuj29.rz.uni-jena.de...
sriram wrote:
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 Timestamp and not in the
ascending order of db objects name.

I need to spool the DDL in the ascending order db names. Can anyone
help me out in this?


Why do you need the different order? Have you considered that the results
from db2look might not be usable in your case if you have dependencies
between the objects (e.g. a view named 'A' based on a table named 'X')?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena


Hi Knut,

I guess I have the same thoughts as Sriram.

One interest to have all DDL regarding TABLES in alphabetical order (then
views and triggers come after, so it's not a problem) is to be able to make
a diff between databases. Right now, one way I have found is to fetch table
per table and issue a db2look command -t. On a 15000 tables DB, it's hard,
and you cannot guarantee the order of creation is going to be the same in 2
databases.

Regards,

Jean-Marc

Nov 12 '05 #3
Jean-Marc Blaise wrote:
I guess I have the same thoughts as Sriram.

One interest to have all DDL regarding TABLES in alphabetical order (then
views and triggers come after, so it's not a problem) is to be able to
It still is a problem if you consider views based on views.
make a diff between databases. Right now, one way I have found is to fetch
table per table and issue a db2look command -t. On a 15000 tables DB, it's
hard, and you cannot guarantee the order of creation is going to be the
same in 2 databases.


I see your point, there.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4
A simple stored procedure would handle culling the contents of the
catalog in the order you want and then issuing the db2look against that
cursor set.

Mairhtin
"Jean-Marc Blaise" <no****@nowhere.com> wrote in
news:41**********************@news.wanadoo.fr:
"Knut Stolze" <st****@de.ibm.com> a écrit dans le message de
news:cs**********@fsuj29.rz.uni-jena.de...
sriram wrote:
> 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 Timestamp and not in the
> ascending order of db objects name.
>
> I need to spool the DDL in the ascending order db names. Can anyone
> help me out in this?


Why do you need the different order? Have you considered that the
results from db2look might not be usable in your case if you have
dependencies between the objects (e.g. a view named 'A' based on a
table named 'X')?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena


Hi Knut,

I guess I have the same thoughts as Sriram.

One interest to have all DDL regarding TABLES in alphabetical order
(then views and triggers come after, so it's not a problem) is to be
able to make a diff between databases. Right now, one way I have found
is to fetch table per table and issue a db2look command -t. On a 15000
tables DB, it's hard, and you cannot guarantee the order of creation
is going to be the same in 2 databases.

Regards,

Jean-Marc


Nov 12 '05 #5
Hi Knut Stolze,

What Jean-Marc told is right ! I need to make the difference in
database objects against two databases. This is my primary intention
and i also understand i could not make use of this script to recreate
objects. (due to dependecies problem)

I am also an IBM 'er,India. Thanks for your inputs.

In the mean time i will try Mairhtin stored procedure way and get back
to you all, if that works.

Thanks again to everybody
Sriram

Nov 12 '05 #6
Sriram,

If you have dificulties, drop me a line at : Mairhtin at mairhtin dot
com and I can give you an assist.

M

"sriram" <sr***************@yahoo.com> wrote in
news:11**********************@z14g2000cwz.googlegr oups.com:
Hi Knut Stolze,

What Jean-Marc told is right ! I need to make the difference in
database objects against two databases. This is my primary intention
and i also understand i could not make use of this script to recreate
objects. (due to dependecies problem)

I am also an IBM 'er,India. Thanks for your inputs.

In the mean time i will try Mairhtin stored procedure way and get back
to you all, if that works.

Thanks again to everybody
Sriram


Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
1
by: MultiTaskinG | last post by:
I want to retrieve all comment stored from my web users ordered BY THREAD and BY TIMESTAMP (INT 11) with a single query (if is possible) now I launch this query: SELECT thread, timestamp,...
3
by: dbtoo_dbtoo | last post by:
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)...
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...
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...
1
by: Rich N | last post by:
When I open my form, I want the records already in it to be in Ascending Order based on one field. Though I keep putting them in Ascending order and then saving the form, each time I re-open the...
5
by: ????? | last post by:
I have an access query which gets data from a number of different tables. Although the tables have primary key fields, the order in which the records are returned means that none of these are in...
2
by: PRadyut | last post by:
In this code i tried to add the elements in ascending order but the output is only 0 1 2 the rest of the elements are not shown. the code...
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
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.