Problem:
The following SQL creates a database in SQLWizard but the folder does not get created in the location path:
SET CURRENT SQLID='VCSTST69'
;
CREATE STOGROUP V1STG069 VOLUMES (XDB069) VCAT XDB
;
COMMIT
;
UPDATE SYSIBM.SYSVOLUMES
SET XDBPRIMEVOLPATH = 'Y',
XDBVOLPATH = 'D:\\XDBTST69\\'
WHERE VOLID = 'XDB069'
;
COMMIT
;
CREATE DATABASE PSTST069
STOGROUP V1STG069
BUFFERPOOL BP0
;
COMMIT
;
and any tables created in this database are created in the root of the location path instead of the database folder - since it does not exist.
Resolution:
If the SYSIBM.SYSVOLUMES column XDBPRIMEVOLPATH has a value of 'N', everything will work as expected. If you have a value of 'Y' in XDBPRIMEVOLPATH, then the XDBVOLPATH column will point to the directory where everything in the STOGROUP will be stored (no subdirectories either). If you don't have a SYSIBM.SYSVOLUMES, then the table .tab files go into the root directory of the location.
Change the update statement SET XDBPRIMEVOLPATH = 'N' and see if this resolves the problem.
THe database folder will then be created when the first create table in database command runs.
#EnterpriseDeveloper
#MFDS