title: Default schema in procedures
body: <p>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.</p>
  
  <p>I get error </p>
  
  <blockquote>
    <p>X.PROCEDURE_NAME is an undefined name.. SQLCODE=-204, SQLSTATE=42704, DRIVER=4.13.111,</p>
  </blockquote>
  
  <p>because deploy assumes that it should use X for table objects being used in 
  procedure body.</p>
  
  <p>How can define QUALIFIER for objects used in procedure ?</p>
  
  <p>I've tried </p>
  
  <pre><code>SET SCHEMA Y;
  </code></pre>
  
  <p>and some similar variations.
  Error is the same.</p>
  
  <p>Can I somehow accomplish this ?</p>
  
  <p>Maybe with precompile options? </p>
  
  <p><a href="https://i.stack.imgur.com/yHFcx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yHFcx.png" alt="enter image description here"></a></p>
  
  <p>If yes, what should I enter ?</p>
  
  <p>We are using DB2 LUW for a long time, 
  and we must always fully qualify table names in stored procedures,
  which is annoying.</p>