Default schema in procedures

278 views Asked by At

I'm trying to deploy stored procedure in IBM DATA STUDIO. I'm using DB2 for LUW (Linux, Unix, Windows). Stored procedure is in schema X and tables are in Y schema.

I get error

X.PROCEDURE_NAME is an undefined name.. SQLCODE=-204, SQLSTATE=42704, DRIVER=4.13.111,

because deploy assumes that it should use X for table objects being used in procedure body.

How can define QUALIFIER for objects used in procedure ?

I've tried

SET SCHEMA Y;

and some similar variations. Error is the same.

Can I somehow accomplish this ?

Maybe with precompile options?

enter image description here

If yes, what should I enter ?

We are using DB2 LUW for a long time, and we must always fully qualify table names in stored procedures, which is annoying.

0

There are 0 answers