I have just tried to migrate this stored procedure to another instance.
on the same server.
I have taken the executeable and copied the file to the new database.
Done the binds on the file and created the stored procedure.
My function is located in /home/db2inst9/sqllib/function/db2func
The two databases are identical versions(VS8 Fixpack 6a) just a
different database name(DMDB001 vs CNWDB001) and instances. db2inst3
works and db2inst9 does not.
This is a C program that came from this article:
http://www-128.ibm.com/developerwork...ein/index.html
Here is the Create procedure statement.
CREATE PROCEDURE drmdba.truncate
( IN schemaName VARCHAR(130), IN tableName VARCHAR(130) )
SPECIFIC truncate_table
DYNAMIC RESULT SETS 0
MODIFIES SQL DATA
NOT DETERMINISTIC
CALLED ON NULL INPUT
LANGUAGE C
EXTERNAL NAME 'db2func!truncate_table'
FENCED THREADSAFE
INHERIT SPECIAL REGISTERS
PARAMETER STYLE SQL
PROGRAM TYPE SUB
NO DBINFO
;
easdt1:/home/db2inst9>db2 call
"drmdba.truncate('CNPUSER','DEL_TIDCREW')"
SQL0443N Routine "DRMDBA.TRUNCATE" (specific name "TRUNCATE_TABLE")
has returned an error SQLSTATE with diagnostic text "Invalid schema
name 'CNPUSER'.". SQLSTATE=38000
I know the table exists in the the database and so does the schema.
I would like to know why I keep getting the error? Any help would be
appreciated.
Thanks in advance.