On Wed, 26 Nov 2025 15:11:55 +0200, Binyamin Dissen 
<[email protected]> wrote:

>I can't find the CREATE SCHEMA command in the DB2 V3.1 SQL Reference

I did a quick search on CREATE SCHEMA and it's not an SQL command. Instead, 
It's documented in "Administering DB2" manual because creating SCHEMA's is 
implemented using the SCHEMA processor (DSNHSP). 
https://www.ibm.com/docs/en/db2-for-zos/12.0.0?topic=schemas-creating-schema-by-using-schema-processor

>SET CURENT SCHEMA = 'RON'
>EXPLAIN PLAN.....
>
>And puts the explain data into the RON.PLAN_TABLE etc.

Did Ron CREATE SCHEMA RON or does DB2 default to a null SCHEMA with 
AUTHORIZATION RON? Security will also need to be considered. 

I always assumed SCHEMA applied to the objects within the SCHEMA but Ron seems 
to be saying it applies to the EXPLAIN outside the SCHEMA. 

I don't believe that SET SQLID is used in this solution and might be causing 
some of your problems. 

>:>>Did the SET SCHEMA
>
>:>>DSNT408I SQLCODE = -219, ERROR:  THE REQUIRED EXPLANATION TABLE  DOES NOT
>:>>EXIST
>
>:>Notice "TABLE  DOES" shows the table name is null. I wonder if it's caused 
>by the invalid SET SQLID.
>
>The SET SCHEMA had SQLCODE 0

The point is DB2 did not show the explanation table name. Instead, it displays 
null as the table name. Is the SET SQLID causing this? Is the CREATE SCHEMA 
causing this? Maybe something else that has not been mentioned?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to