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 functions, then
drop and recreate the user defined functions, then recreate all the
views and triggers. I don't imiagine I'm the first person who needed
to do this, and I don't have a lot of db2 experience, so I wanted to
see if there is a common or generally used technique for handling this.
This will be part of the upgrade process in a commercial software
product, so it has to be a programmatic technique, not something done
from the Control center. I have metadata tables which can tell me the
names of all the views and triggers that I need to drop and recreate,
so I don't need a way of finding which views and triggers need to be
recreated, just the ablility to drop and recreate the ones I specify.
This is for DB2 8.1.
Thanks in advance for any advice. 5 2394
Have a look at 'db2look' utility. it extracts the ddl of views,
triggers and udfs and can store them in a plain ascii file. once
extracted, you can then later recreate those objects by executing this
ddl file. the relevant commands would be similar to:
db2look -d SAMPLE -e -o sample.ddl -p -a
db2 -tfv sample.ddl
regards,
dotyet
Bruce wrote: 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 functions, then drop and recreate the user defined functions, then recreate all the views and triggers. I don't imiagine I'm the first person who needed to do this, and I don't have a lot of db2 experience, so I wanted to see if there is a common or generally used technique for handling
this. This will be part of the upgrade process in a commercial software product, so it has to be a programmatic technique, not something done from the Control center. I have metadata tables which can tell me
the names of all the views and triggers that I need to drop and recreate, so I don't need a way of finding which views and triggers need to be recreated, just the ablility to drop and recreate the ones I specify. This is for DB2 8.1.
Thanks in advance for any advice.
May sound irrelevent, but . . .
<<db2look -d SAMPLE -e -o sample.ddl -p -a
<<db2 -tfv sample.ddl>>
Where does one find documentation for all such utilities for DB2 with
their switches and options? (Immediateley I'd like to find them for
db2, but also for Webshpere and everything else that IBM publishes.)
SS
_________
dotyet wrote: Have a look at 'db2look' utility. it extracts the ddl of views, triggers and udfs and can store them in a plain ascii file. once extracted, you can then later recreate those objects by executing
this ddl file. the relevant commands would be similar to:
db2look -d SAMPLE -e -o sample.ddl -p -a
db2 -tfv sample.ddl
regards, dotyet
Bruce wrote: 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 functions,
then drop and recreate the user defined functions, then recreate all the views and triggers. I don't imiagine I'm the first person who
needed to do this, and I don't have a lot of db2 experience, so I wanted
to see if there is a common or generally used technique for handling this. This will be part of the upgrade process in a commercial software product, so it has to be a programmatic technique, not something
done from the Control center. I have metadata tables which can tell me the names of all the views and triggers that I need to drop and
recreate, so I don't need a way of finding which views and triggers need to
be recreated, just the ablility to drop and recreate the ones I
specify. This is for DB2 8.1.
Thanks in advance for any advice.
Stanley, try: db2look -h
It lists all options, their meaning and also some examples.
HTH, Pierre and Joyeux Noël
PS: It's sunny and -10°C
Stanley Sinclair wrote: May sound irrelevent, but . . .
<<db2look -d SAMPLE -e -o sample.ddl -p -a <<db2 -tfv sample.ddl>>
Where does one find documentation for all such utilities for DB2 with their switches and options? (Immediateley I'd like to find them for db2, but also for Webshpere and everything else that IBM publishes.)
SS _________
dotyet wrote:
Have a look at 'db2look' utility. it extracts the ddl of views, triggers and udfs and can store them in a plain ascii file. once extracted, you can then later recreate those objects by executing
this
ddl file. the relevant commands would be similar to:
db2look -d SAMPLE -e -o sample.ddl -p -a
db2 -tfv sample.ddl
regards, dotyet
Bruce wrote:
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 functions, then drop and recreate the user defined functions, then recreate all the views and triggers. I don't imiagine I'm the first person who needed to do this, and I don't have a lot of db2 experience, so I wanted to see if there is a common or generally used technique for handling
this.
This will be part of the upgrade process in a commercial software product, so it has to be a programmatic technique, not something done from the Control center. I have metadata tables which can tell me
the
names of all the views and triggers that I need to drop and recreate, so I don't need a way of finding which views and triggers need to be recreated, just the ablility to drop and recreate the ones I specify. This is for DB2 8.1.
Thanks in advance for any advice.
--
Pierre Saint-Jacques - Reply to: sescons at attglobal dot net
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fardude |
last post by:
I developed a search stored proc that searches all or
some of Procs, Views, Triggers and functions. Would anyone be interested
to see it posted here?
Do you have any suggestions about other...
|
by: Florian |
last post by:
I need to set multiple values for some SQL statements, for example
SET NUMERIC_ROUNDABORT OFF
GO
SET
ANSI_PADDING,ANSI_WARNINGS,CONCAT_NULL_YIELDS_NULL,ARITHABORT,QUOTED_IDENTIF
IER,ANSI_NULLS...
|
by: Marko Poutiainen |
last post by:
Situation:
We had to make our SQLServer 2000 database multi-lingual. That is, certain
things (such as product names) in the database should be shown in the
language the user is using (Finnish,...
|
by: Dennis Gearon |
last post by:
If I have all sorts of triggers and constraints,
The only way to have them applied incrementally to the data during
restore or bulk load
is to do the bulk load via individual INSERT statements,...
|
by: Ulrich Meis |
last post by:
Hi!
Situation two schemas:
webviews: Contains a set of views with insert rules on them, accessed
via a GUI.
devconf: "Business logic", all the tables, functions, triggers that I
want to...
|
by: dbuchanan52 |
last post by:
Hello,
I am building an application for Windows Forms using. I am new to SQL
Server 'Views'. Are the following correct understanding of their use?
1.) I believe a view can be referenced in a...
|
by: rod.weir |
last post by:
Fellow database developers,
I would like to draw on your experience with views. I have a database
that includes many views. Sometimes, views contains other views, and
those views in turn may...
|
by: db2admin |
last post by:
Hello,
I am interested in capturing snapshot information using SQL functions
or views but i can not reset monitor switches when i use following
command.
db2 "reset monitor for database...
|
by: SLauren |
last post by:
Hi,
I am getting the following error while restoring triggers from one db to another db in Windows XP using Mysql Administrator GUI Tool:
Access denied for user 'User1'@'%' to database 'TestDB1'.
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |