473,623 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Able to Create a Procedure in DB2 V8.1 But Unable to Run it using CALL statement

Hi All,

I have DB2 8.1 on my system. I have created a procedure as follows.
CREATE PROCEDURE DB2ER000.XYZ() LANGUAGE SQL BEGIN INSERT INTO
DB2ER000.A

( C,D,E) VALUES (10,20,30);
END

It got created. But While calling the procedure using the statement

CALL DB2ER000.XYZ I am getting the following error.

DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC:XYZ;PR OCEDURE
Message: No authorized routine named "XYZ" of type "PROCEDURE" having
compatible arguments was found. More exceptions ...DB2 SQL error:
SQLCODE: -727, SQLSTATE: 56098, SQLERRMC: 2;-440;42884;XYZ|P ROCEDURE

Can you please help me why this is happening.
I have tried creating this procedure with no arguments so many times,
but not able to run.

Thanks, Basha.

Jul 14 '06 #1
2 9264
<ba************ *@gmail.comwrot e in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
Hi All,

I have DB2 8.1 on my system. I have created a procedure as follows.
CREATE PROCEDURE DB2ER000.XYZ() LANGUAGE SQL BEGIN INSERT INTO
DB2ER000.A

( C,D,E) VALUES (10,20,30);
END

It got created. But While calling the procedure using the statement

CALL DB2ER000.XYZ I am getting the following error.

DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC:XYZ;PR OCEDURE
Message: No authorized routine named "XYZ" of type "PROCEDURE" having
compatible arguments was found. More exceptions ...DB2 SQL error:
SQLCODE: -727, SQLSTATE: 56098, SQLERRMC: 2;-440;42884;XYZ|P ROCEDURE

Can you please help me why this is happening.
I have tried creating this procedure with no arguments so many times,
but not able to run.

Thanks, Basha.
Note: When creating the procedure you need to set the statement terminator
to @. Also note the MODIFIES SQL DATA.

CREATE PROCEDURE DB2ER000.XYZ()
LANGUAGE SQL
MODIFIES SQL DATA
BEGIN
INSERT INTO DB2ER000.A (C,D,E) VALUES (10,20,30);
END@

------------------------------------------------------------------------------
CALL DB2ER000.XYZ

Return Status = 0
Jul 14 '06 #2
ba************* @gmail.com wrote:
Hi All,

I have DB2 8.1 on my system. I have created a procedure as follows.
CREATE PROCEDURE DB2ER000.XYZ() LANGUAGE SQL BEGIN INSERT INTO
DB2ER000.A

( C,D,E) VALUES (10,20,30);
END

It got created. But While calling the procedure using the statement

CALL DB2ER000.XYZ I am getting the following error.

DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC:XYZ;PR OCEDURE
Message: No authorized routine named "XYZ" of type "PROCEDURE" having
compatible arguments was found. More exceptions ...DB2 SQL error:
SQLCODE: -727, SQLSTATE: 56098, SQLERRMC: 2;-440;42884;XYZ|P ROCEDURE

Can you please help me why this is happening.
I have tried creating this procedure with no arguments so many times,
but not able to run.
Are you running this in a DB2 with DPF system and you have clock skew?
Given a match in the procedure name and teh signature, there are two
remaining conditions for a routine to be found:
EXECUTE privilege of the caller and time.
If the CALL was "typed" in the procedures past then it won't be able to
find it.
So one scenario is that your catalog node is running ahead in time and
your coordinator won't be able to find the procedure until it has caught
up.

Cheers
Serge

PS: I find the fact that you're getting a -727 rc=2 on this mildly
disturbing. It suggests that the call at some point did successfully
compiler.
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 14 '06 #3

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

Similar topics

3
7059
by: Robert Hogan | last post by:
Hello, I am attempting to send emails using T-SQL (in a SQLServerAgent Job) using the stored procedure sp_SendSMTPMail. I created the stored proc using the following script that I got off a post here on google. CREATE PROCEDURE sp_SendSMTPMail (@From varchar(255), @To varchar(8000), @Subject varchar(255), @Body varchar(8000),
4
8078
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure creates a string of custom SQL statement and returns this string back to the main stored procedure. This SQL statements work fine on there own. The SQL returned from the sub stored procedure are returned fine. The datatype of the variable that...
22
2724
by: nobody | last post by:
hello everybody, is there a way of creating an array with help of a function that would accept the name of this array as a parameter and then create global Array type variable of that name? so that for example the following code would work as well in browsers as under Windows Scripting Host: str = "tableA";
7
3246
by: Alex | last post by:
Hi all, I am trying to install a java stored procedure via the windows development centre. The linux box is running 8.1 FP4 as is the windoze platform. If I am on the linux box i can install the sample jdbc stored procedures o.k. For the purpose of this test I created a sample procedure that executes "select * from department" when conected to the sample database on the linux box.
10
1836
by: serge | last post by:
I can not create a stored procedure that calls another not yet created stored procedure? In MS SQL I get a warning that the calling procedure does not exist but the new stored Procedure gets created anyhow. I believe Oracle works similarly. I can not make this possible in DB2?
4
3738
by: JohnnyDeep | last post by:
I am trying to create a store proc that contain a create index with the cluster option and I receive DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0623N A clustering index already exists on table "PGIR.TF_RRCE". LINE NUMBER=35. SQLSTATE=55012
4
12427
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is this: can Access create the document and place it as an OLE object to the relevant table? Any help is greatly appreciated. Ricky
6
13044
by: Shiller | last post by:
I want my application to create a new database/tables when run for the first time. I have created a stored procedure to create the new database named "budget". When I run the stored procedure, it creates the budget database but the tables are created in the "master" database. Please help.
11
4078
by: raylopez99 | last post by:
Keep in mind this is my first compiled SQL program Stored Procedure (SP), copied from a book by Frasier Visual C++.NET in Visual Studio 2005 (Chap12). So far, so theory, except for one bug (feature?) below. At some point I'm sure I'll be able to laugh about this, akin to forgeting a semi-colon in C/C++, but right now it's frustrating (time to sleep on it for a while). Problem-- For some reason I get the error when trying to save files...
0
8227
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
8165
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
8613
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...
1
8326
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,...
0
8469
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
5561
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
4074
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
4164
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1778
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.