473,503 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replacing a function referenced in a view

I have several user defined functions which get called from triggers.
Is it possible to install a new version of the functions without
having to drop and recreate the triggers? When I try to recreate the
function (by DROPping and CREATEing), I get the error

SQL0478N DROP or REVOKE on object type "FUNCTION" cannot be processed
because there is an object "MY_TRIGGER", of type "VIEW or SUMMARY
TABLE",
which depends on it. SQLSTATE=42893

Thanks for any advice.
Nov 12 '05 #1
2 1626
I don't think I'd want to do that. If I used a function in a trigger to
populate a column which is indexed; then changing the function could
easily change its output which would invalidate the index contents.
Dropping the trigger wouldn't fix the index but would hopefully give the
DBA a clue that more issues can arise from the function change.

Phil Sherman
Bruce wrote:
I have several user defined functions which get called from triggers.
Is it possible to install a new version of the functions without
having to drop and recreate the triggers? When I try to recreate the
function (by DROPping and CREATEing), I get the error

SQL0478N DROP or REVOKE on object type "FUNCTION" cannot be processed
because there is an object "MY_TRIGGER", of type "VIEW or SUMMARY
TABLE",
which depends on it. SQLSTATE=42893

Thanks for any advice.


Nov 12 '05 #2
Bruce,

Teh answer today is: No.
You will need to drop the trigger, change your function and then
recreate it.
In DB2 V8.2 you can try DB2LK_DEP_OF() to tell you objects dependent on
the one to change.

Cheers
Serge
Nov 12 '05 #3

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

Similar topics

11
1905
by: rmm | last post by:
If I replace the open builtin eg import main __main__.__builtins__.open=None Is there any way, from here on, to access the original open function?? Extending this slightly, lets say I put a...
11
13484
by: Paul Reddin | last post by:
Hi, This is a real hopeful one! What we are trying to do: 1. We MUST present a mappable database object for our application objects i.e a Table or a View Some of the views are very...
4
2489
by: John | last post by:
Hi How can I replace characters like carriage return and double quotes from strings? Thanks Regards
17
1990
by: J.S. | last post by:
I have a text file with parameters like the following embedded in the text: @@TextBox1@@, @@TextBox2@@, etc. I know how to read this text file. However, I am trying to figure out how to...
7
4432
by: Mike | last post by:
I have a program working well. I install it on another computer and i have a problem running the program and it seems related to the Left function. Libraries should be the same on both...
7
3079
by: | last post by:
All, I have a MFC Mixed mode dll which is working well. I am now tring to use a regular C++ class from another DLL which has a method called GetMessage. When I link I get 2 error messages: ...
4
7447
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
2
6529
by: David | last post by:
Sent this to alt.php a couple of days back, but doesn't look like I'll get an answer, so trying here. I'm trying to convert a script to use friendly URLs, I've done this before, but my PHP...
2
5300
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
0
7323
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...
1
6984
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...
0
5576
agi2029
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,...
1
5005
isladogs
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...
0
4670
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...
0
3162
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...
0
1507
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 ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.