By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,199 Members | 1,551 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,199 IT Pros & Developers. It's quick & easy.

Calling Stored Procedures

P: n/a
I'm executing a stored procedure and getting the
SQL0440N No authorized routine named
"AMROBI2.CREATEAIMCONNECTION" of type "PROCEDURE
" having compatible arguments was found.

The schema exists, the stored procedure exists, the user executing the
procedure has execute permissions on the procedure and also has
insert, update, delete rights on the table being accessed in the
stored procedure. I'm sending in the correct number of input
parameters.

I'm running Version 8, FixPak 3 on Windows.

Here's the stored procedure body (pretty basic):
CREATE PROCEDURE AMROBI2.CreateAIMConnection (IN decCHANNELSESSIONID
DECIMAL(12,0),
IN strBUSINESSLINE VARCHAR(24),
IN strBRANCHID VARCHAR(24),
OUT decAIMCONNECTIONID DECIMAL(12,0))
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
LANGUAGE SQL
RESULT SETS 1
P1: BEGIN
INSERT INTO AMROBI2.AIMCONNECTION (ChannelSessionID, BusinessLine,
BranchID, StartDateTime)
VALUES
(decCHANNELSESSIONID, strBUSINESSLINE, strBRANCHID, CURRENT
TIMESTAMP);
SET decAIMCONNECTIONID = IDENTITY_VAL_LOCAL();
END P1

Here's how I'm calling it:

CALL AMROBI2.CREATEAIMCONNECTION (5, 'TEST', 'TEST');

What gives????

....a quick aside:

The proc runs fine if I run it through the Development Center.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Anthony Robinson <an*****@yahoo.com> wrote:
I'm executing a stored procedure and getting the
SQL0440N No authorized routine named
"AMROBI2.CREATEAIMCONNECTION" of type "PROCEDURE
" having compatible arguments was found.

Here's the stored procedure body (pretty basic):
CREATE PROCEDURE AMROBI2.CreateAIMConnection (IN decCHANNELSESSIONID
DECIMAL(12,0),
IN strBUSINESSLINE VARCHAR(24),
IN strBRANCHID VARCHAR(24),
OUT decAIMCONNECTIONID DECIMAL(12,0)) [...]
CALL AMROBI2.CREATEAIMCONNECTION (5, 'TEST', 'TEST');


Your procedure expects 4 parameters and you only provided 3. But there is
no procedure with 3 parameters, so the error is correctly raised.

You should call the procedure like this:

CALL AMROBI2.CREATEAIMCONNECTION (5, 'TEST', 'TEST', ?);

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.