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 2429
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 places, websites forums ...., to
share something I have developed?
Thanks you for your response in advance
PLease send me email
|
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 ON
GO
in a .sql file, but would like to reset them to their previous settings
|
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, Swedish or English). There are about
a dozen tables with columns that need localization.
Doing this in the application level was a no-goer. It would have taken far
too much time (there is a *lot* of code and unfortunately most of the...
|
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,
or by restoring by incremental sections,
correct?
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
|
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 restrict access to as far as possible.Preferably, I wouldn't
even grant usage to the schema.
| |
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 stored procedure something
like this;
Select * from View1
Is that true?
|
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 contain views. In fact, I have some views in
my database that are a product of nested views of up to 6 levels deep!
The reason we did this was.
1. Object-oriented in nature. Makes it easy to work with them.
|
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 <database name>"
I am running a loop in which i am trying to reset switches, capture
snapshot, make my script wait for 5 minutes and then go back to reset
|
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'.
Can anyone please suggest me what i have to do?
TIA....
Lauren
|
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...
|
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,...
| |
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |