473,804 Members | 4,795 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Keeping DDL's in sync

Hi All:

We're rolling out 3 DB2 (8.2 on LUW) platforms for branch offices, each
of these are going to have the same schema. These are all going to be
non-federated systems.

I need some advice / pointers on keeping the DDL's in sync with each other.

I'm going to have a development machine in my office that I first apply
any schema / stored-procedure changes to, then would like to roll out
these changes to the sites - probably on CD.

What methods or tools are available for keeping DDL's in sync - I'm an
old *nix hand, so I'm familar with shell scripting, but I don't quite
know the best way for applying just the diffs from one DDL version to
another.

Additionally like I said, I will need to keep the stored procedures in sync.

Any pointers would be greatly appreciated....
Thanks,
Barry
Nov 12 '05 #1
7 2063
BarryS wrote:
Hi All:

We're rolling out 3 DB2 (8.2 on LUW) platforms for branch offices, each
of these are going to have the same schema. These are all going to be
non-federated systems.

I need some advice / pointers on keeping the DDL's in sync with each other.

I'm going to have a development machine in my office that I first apply
any schema / stored-procedure changes to, then would like to roll out
these changes to the sites - probably on CD.

What methods or tools are available for keeping DDL's in sync - I'm an
old *nix hand, so I'm familar with shell scripting, but I don't quite
know the best way for applying just the diffs from one DDL version to
another.

Additionally like I said, I will need to keep the stored procedures in
sync.

Any pointers would be greatly appreciated....
Thanks,
Barry

Barry,

Helpful tools are db2look and the ALTOBJ() in GENERATE mode.
ALTOBJ employs the services of DB2LK_DEP_OF() (not documented, but it's
a regular SQL Function stored in SYSCAT.ROUTINES ).
None of them are exactly what you need, but they will prove helpful.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2
You could manage this like any other set of distributed systems:
- using some version control software (cvs, etc)
- creating formal releases
- adding code to handle the migrations - the hard part
- create new tables
- copy & convert data from old tables to new tables
- drop old tables
- rename new table names to old names
- add all constraints, views, etc

Additionally, you could use tools like Embarcadero ErStudio, Sybase
Powerdesigner, or CA's ErWin: these tools allow easy forward & reverse
engineering and change management:
- generate a complete model from an existing schema
- populate a schema based upon a model
- determine differences between two models, two schemas, or a
schema and a model
- generate conversion code between two versions
So, these tools could help generate your migration code.

In generally, I'd see the use of tools like Embarcadero as an
enhancement to the manual method - not a replacement to it. This is
because it would still be great to have official releases, something
like shell scripts to run the db2 sql, etc, etc. These vendors also
have metadata-management capabilities that can be used for versioning
your model - but it can be a significant increase in model management
vs periodic snapshots to cvs (at least in my experience).

However, if you checked with these vendors (and others such as
compuware, bmc, etc), you might find that they have a complete change
migration solution that works for you. Your situation is a little
different though - most of these tools seem oriented towards a single
database. So at the end of the day it wouldn't surprise me if you end
up with a solution at least partially custom using shell scripts.

good luck,

ken

Nov 12 '05 #3
You might want to look at the Satellite Administration Center function on
the Control Center:
Do a Google search on: db2 and satellite administration center
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"BarryS" <no****@really. thx> a écrit dans le message de
news:G5******** ************@gi ganews.com...
Hi All:

We're rolling out 3 DB2 (8.2 on LUW) platforms for branch offices, each
of these are going to have the same schema. These are all going to be
non-federated systems.

I need some advice / pointers on keeping the DDL's in sync with each other.
I'm going to have a development machine in my office that I first apply
any schema / stored-procedure changes to, then would like to roll out
these changes to the sites - probably on CD.

What methods or tools are available for keeping DDL's in sync - I'm an
old *nix hand, so I'm familar with shell scripting, but I don't quite
know the best way for applying just the diffs from one DDL version to
another.

Additionally like I said, I will need to keep the stored procedures in sync.
Any pointers would be greatly appreciated....
Thanks,
Barry


Nov 12 '05 #4
Serge Rielau wrote:
BarryS wrote:
Hi All:

We're rolling out 3 DB2 (8.2 on LUW) platforms for branch offices, each
of these are going to have the same schema. These are all going to be
non-federated systems.

I need some advice / pointers on keeping the DDL's in sync with each
other.

I'm going to have a development machine in my office that I first apply
any schema / stored-procedure changes to, then would like to roll out
these changes to the sites - probably on CD.

What methods or tools are available for keeping DDL's in sync - I'm an
old *nix hand, so I'm familar with shell scripting, but I don't quite
know the best way for applying just the diffs from one DDL version to
another.

Additionally like I said, I will need to keep the stored procedures in
sync.

Any pointers would be greatly appreciated....
Thanks,
Barry

Barry,

Helpful tools are db2look and the ALTOBJ() in GENERATE mode.
ALTOBJ employs the services of DB2LK_DEP_OF() (not documented, but it's
a regular SQL Function stored in SYSCAT.ROUTINES ).
None of them are exactly what you need, but they will prove helpful.

Cheers
Serge


Serge,

Thanks for the pointer to DB2LK_DEP_OF, which could prove useful to me.

One of the problems with db2look is that it supplies the DDL in exact
creation timestamp order. This is an easy way of guaranteeing that it can
be run through without errors due to RI creation etc being out of order.
However it makes db2look output as it stands virtually impossible to use
for finding what has changed between invocations.

Hence I've been working on a Perl script called lookplus.pl which will sort
the objects into alphabetical name order. It's not yet finished, but is
getting there. This means that I can then use diff (or similar tools) as
the first stage of automating changes.

Phil
Nov 12 '05 #5
If you get that to work, the pl script, I'm sure there are lots of
people who would like to look at it. More easy to use tools are also
welcome.
We are a big BMC shop. We use the Patrol Change Manager. Works somewhat
like it does on zOS and can tell you what needs to change in the target
database to make it look like the source. Their SmartDBA Cockpit tool
also has a text compare DDL option between two databases. SmartDBA
Cockpit used to be free.

PN> Hence I've been working on a Perl script called lookplus.pl which will sort
PN> the objects into alphabetical name order. It's not yet finished, but is
PN> getting there. This means that I can then use diff (or similar tools) as
PN> the first stage of automating changes.

Edward Lipson via Relaynet.org Moondog
ed***********@m oondog.com el*****@bankofn y.com
---
þ MM 1.1 #0361 þ

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 12 '05 #6
And DeveloperWorks/DB2 will pay decent $$ for a good article. :-)

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #7
But But But would that not mean we are acknowledging that Phil may know what he is doing?
:) :) :) (Just kidding of course) ...

--

Bob
Engagement Specialist - DB2 Information Management Software - IBM Software Group
IBM Toronto Lab
[My comments are solely my own and are not meant to represent an official IBM position -
ask my cat!]
"Serge Rielau" <sr*****@ca.ibm .com> wrote in message
news:3a******** *****@individua l.net...
And DeveloperWorks/DB2 will pay decent $$ for a good article. :-)

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Nov 12 '05 #8

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

Similar topics

0
1022
by: Mike Jansen | last post by:
We're doing .NET development for PocketPC, BizTalk, and miscellaneous other things. One of the difficulties has been keeping references to assemblies intact in a project when the referenced assemblies are under development as well. For example, I am developing AppA that uses ComponentB and ComponentC, which are both being developed by two other developers (or in BizTalk, MapA that uses SchemaB and SchemaC, all in different assemblies)....
1
2434
by: kartik | last post by:
I open an fstream in read-only mode, read till the end, then try to sync() before seeking to position 0 & reading again. But the sync fails. I discovered that clear()ing the stream before the sync causes the sync to work. Seeking to position 0 before the sync doesn't seem to help. If you look at sync() as simply invalidating the read buffer (isn't that right?), isn't it illogical for it to fail in this situation? Besides sync()...
2
1626
by: swoozie | last post by:
This may not be a MSSQL-specific question, but I wanted to ask it here first, in case there's a MSSQL and/or SourceSafe solution that will help. Our dev team is having some difficulty with keeping the nightly builds in sync with the stored proc mods. I'm wondering if there are some good case studies on how to avoid this "drift". Something like genning a new DB from checked-in SPs, etc. alongside each regular build,
9
5493
by: Alfred Taylor | last post by:
I'm testing the waters of n-tier development and I ran into a scenario that I'm not sure what the best solution would be. I have a Company object which contains a collection of contacts retrieved from a database. In the presentation layer, the user will be able to add/delete/modify this collection in which case it needs to be synced with the database. The question is basically how best to do this? Aside from overriding the add/remove...
5
3270
by: Cindy H | last post by:
Hi I have a ddl that I have populated with a dataset. I have 2 items in the ddl. The first one is '3D' and the second one is 'Spot'. I have to select Spot - the second item in the ddl and then 3D the first item in the ddl to get it to fire for 3D. I have autopostback set to true. I have heard that I need to put a blank item in the ddl, but not sure how I would do this with a dataset.
4
2058
by: mantrid | last post by:
Im using arrays generated from my records displayed in a table on my site to update the corresponding records in a mysql database ie on the web page col1 col2 col3 1 2 2 1 6 2 7 4 which I post to next page as col1array col2array col3array problem is some
8
6103
by: Michael.Guppenberger | last post by:
Hello everyone, I am currently trying to create a materialized query table which should be in-sync all the time. So my first attempt was to use the "REFRESH IMMEDIATE" option of the create table statement. However, due to the complexity of the underlying query, this is not allowed. As performance is not an issue and I absolutely want to have the MQT in-sync my next try was to create a trigger on the base tables of the MQT. This...
0
1447
by: Rune Jacobsen | last post by:
Hi all, In my project I have a control (described in an earlier post) which basically consists of three "subcontrols": One big area where the vital data is displayed (scrollable, since it will usually be larger than the window containing the parent control), a time strip on top of it, and a resource list on the left. Long story short - when someone scrolls the scrollable data control, the time strip and resource lists are hooked to keep...
3
8301
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4. I have two domains -- www.mydomain1.com and www.mydomain2.com. Both point to the same IP address. I have two pages on that IP -- first.php <?php session_start(); $_SESSION = "hello"; ?>
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.