You can use the directory with either Data Spaces Support or the standard DASD I/O system.
To use Data Spaces Support, format your directory disk with a block size of 4096 bytes (4KB). The database manager will automatically use data spaces when it detects the 4KB blocks. If the directory disk is formatted with a 512-byte block size, the standard I/O system will be used instead.
If your directory disk is currently formatted for 512-byte blocks and you want to use Data Spaces Support, you can reblock your disk with the SQLCDBEX EXEC (refer to Reblocking the Database Directory).
If the database manager is using Data Spaces Support with the directory, you will see the following message at startup time:
+--------------------------------------------------------------------------------+ |
·
·
·
| |ARI2022I the database manager is using data spaces for the directory. | |
·
·
·
| +--------------------------------------------------------------------------------+
You can also check this information by displaying the storage pool counters for the directory. For example:
+--------------------------------------------------------------------------------+ |counter pool dir | |Counter values at DATE='05-23-99' TIME='15:41:07' | | | |Directory: Data Spaces | |Pages looked at in the buffer LBUFLOOK: 21 | |Pages moved from DS to buffer DSREAD : 44 | |Pages moved from buffer to DS DSWRITE : 27 | |DS page fault notifications DSFAULT : 4 | |ARI0065I Operator command processing is complete. | +--------------------------------------------------------------------------------+
For information on when to use data spaces with the directory, refer to Directory.
The SQLCDBEX EXEC is updated for VMDSS, and now asks you which block size you want the output directory to be. For a block size of 512 bytes, type 512; for a block size of 4KB bytes, type 4096. If you do not type in a size and just press Enter, the EXEC will make the output directory disk the same block size as the input directory disk.
For more information on the standard SQLCDBEX EXEC refer to DB2 Server for VM System Administration.
Note that if you reblock the directory from 512-bytes blocks to 4KB blocks, you will not need as much DASD storage on the new directory disk; if you reblock from 4K to 512, you will need more. To calculate the number of cylinders you will need, refer to Database Disks.
If you plan to switch between blocking sizes often, you may want to keep one disk reserved for the 512-byte blocked directory and one for the 4KB directory. You can define each disk to the appropriate size for its blocking, and copy the directory back and forth between disks.
If you plan to move from a 512-byte to a 4KB disk of the same size, you can take advantage of the 4KB blocking by expanding the directory to fit the new disk. However, if you need to return to a 512-byte disk, you will have to copy it back to a larger disk.
(When the SQLCDBEX EXEC finds that there is more room on a new disk than it needs for the current directory, it will ask you whether it should expand the directory to fit the new disk. If you tell it not to expand the directory, you cannot take advantage of the unused portion of the new disk.)
Consider a database with a directory disk (B-disk) at address 300 and a block size of 512 bytes. To reblock the B-disk to 4096 bytes, run the SQLCDBEX EXEC to copy the directory onto a new disk (305) blocked to 4KB as shown in the following example:
+--------------------------------------------------------------------------------+ |sqlcdbex db(SQLDBA) | |ARI0717I Start SQLCDBEX EXEC: 05/23/99 08:58:36 EDT. | |ARI6102A Enter DBEXTENT number (or LOGDSK1, LOGDSK2, | | or BDISK) to copy. | | (Enter a null response to end input or | | enter QUIT to exit.) | |bdisk | |ARI6188A Enter the output block size of the directory. | | (Enter 512 or 4096, | | or a null response to use the original size, | | or 111(Quit) to exit) | |4096 | |ARI6103A Enter virtual address for new BDISK. | | (Enter a null response to end input or | | enter QUIT to exit.) | |305 | |ARI6110D Disk 305 is already formatted. Continuing will erase | | all data on this disk. Do you want to use the disk? | | Enter 0(No), 1(Yes), or 111(Quit). | |yes | |ARI6146D Are you expanding the SQL/DS(TM) directory? | | Enter 0(No), 1(Yes), or 111(Quit). | |no | |ARI0647D Do you want to do a CMS FORMAT/RESERVE command on disk 305? | | Enter 0(No) or 1(Yes). | |yes | |ARI6118I Formatting in progress. Please wait... | |ARI6131I Copying in progress. Please wait... | |ARI6108I Minidisk copied successfully. The SQLDBA SQLFDEF file | | will be updated. | |ARI6109I SQLDBA SQLFDEF file has been updated on the A disk. | | | |ARI6102A Enter DBEXTENT number (or LOGDSK1, LOGDSK2, | | or BDISK) to copy. | | (Enter a null response to end input or | | enter QUIT to exit.) | | | |ARI0620I SQLDBA SQLFDEF file | | successfully copied to production disk. | |ARI0673I All COPY DBEXTENT processing completed successfully. | |ARI0796I End SQLCDBEX EXEC: 05/23/99 09:09:43 EDT | |Ready; T=14.66/24.00 09:09:43 | +--------------------------------------------------------------------------------+
The database manager will now use the new directory disk at address 305. You can confirm this when you start it. For example:
+--------------------------------------------------------------------------------+ | | |sqlstart db(SQLDBA) | |ARI0717I Start SQLSTART EXEC: 05/23/99 16:06:02 EDT. | |ARI0320I The default database name is SQLDBA. | |ARI0663I FILEDEFS in effect are: | |ARISPOOL DISK SPSPEC FILE A1 | |ARISQLLD DISK TEMSQLLD LOADLIB Q1 | |ARISQLLD DISK ARISQLLD LOADLIB T1 | |BDISK DISK 305 | |
·
·
·
| +--------------------------------------------------------------------------------+
If you are creating a new database, you can specify whether it will use Data Spaces Support or the standard DASD I/O system with the directory.
To use Data Spaces Support, you must format the directory disk in 4KB blocks when you create the database. Run the SQLDBINS EXEC and include the parameter:
DIRBLK (4096)
The SQLDBINS and the SQLDBGEN EXECs are updated in VMDSS to accept this new parameter. For example:
+--------------------------------------------------------------------------------+ |sqldbins db(SQLDBA) dirblk(4096) | |ARI0717I Start SQLDBINS EXEC: 07/19/99 15:02:24 EDT. | |ARI6010D Do you want to install English SQL/DS HELP text? | | Enter 0(No), 1(Yes), or 111(Quit). | |no | |ARI0720I Default DB2 Server for VM bootstrap file SQLDBA SQLRMBT created | | on the production disk. | |ARI0720I Default DB2 Server for VM bootstrap file SQLDBA SQLDBBT created | | on the production disk. | |ARI0720I Default DB2 Server for VM bootstrap file SQLDBA SQLISBT created | | on the production disk. | |ARI0721I Get DB2 Server for VM production minidisk READ access: SQLDBA 195. | | | |ARI0717I Start SQLDBGEN EXEC: 07/19/99 15:02:33 EDT. | | | |ARI0633A Please enter the CUU of the | | BDISK disk. | |300 | |ARI0647D Do you want to do a CMS FORMAT/RESERVE command on disk 300? | | Enter 0(No) or 1(Yes). | |yes | |
·
·
·
| +--------------------------------------------------------------------------------+
Note: | Make sure that you answer Yes when asked if you want to do a CMS FORMAT/RESERVE (message ARI0647D). |
To use the standard I/O system, either include the parameter:
DIRBLK (512)
or omit the DIRBLK parameter entirely. The default value for DIRBLK is 512.
For more information on the standard SQLDBINS and SQLDBGEN EXEC refer to DB2 Server for VM System Administration.