Mimer SQL Documentation PREV NEXT

Mimer Developer Site

www.mimer.com/developer


2.6 Generating the System Databanks


When you have defined the database, you must generate the system databanks.

You can generate system databanks in your own program by calling SQLConfigDataSource with the SDBGEN command.

Consider the following example:

rc = SQLConfigDataSource(hWnd,ODBC_CONFIG_SYS_DSN,"MIMER", 
     "DATABASE=MyLocalMimer\0" 
     "SDBGEN=-pSYSPSW MyLocalMimer 1000 \"\" 2000\0\0"); 
 

The above call will start a system databank generation for the database MyLocalMimer. The initial size for SYSDB will be 1000 and for TRANSDB it will be 2000 2K blocks.

Note that the default file name for TRANSDB is set using "", backslashes (\) are used as escape characters.

Whenever you use the -p option, the program is run in silent mode. In this mode no dialog boxes are displayed and any missing directories are created automatically.

If an error occurs, such as disk space exhausted, a dialog box is displayed where file names and/or sizes may be changed. However, in this case the fields for SYSADM password are disabled.

If you do not use option -p, the values specified will be used as the default values in the system databank generation dialog box.

When using the SDBGEN command with SQLConfigDataSource you should, for consistency, always specify -p when the hWndParent parameter is NULL. Otherwise, a dialog box is displayed even though you have requested SQLConfigDataSource not to do so.

If you want to use a command's default value, specify the default value using two double quotes (""). All commands except database-name are optional.

2.6.1 SDBGEN Parameters

The following example demonstrates all of SDBGEN's parameters:

rc = SQLConfigDataSource(hWnd,ODBC_CONFIG_SYS_DSN,"MIMER", 
     "DATABASE=MyLocalMimer\0" 
     "SDBGEN=-pSYSPSW " /* SYSADM password      */ 
     "MyLocalMimer "    /* Database name        */ 
     "1000 "            /* Initial SYSDB size   */ 
     "\"\" "            /* TRANSDB file name    */ 
     "1000 "            /* Initial TRANSDB size */ 
     "\"\" "            /* LOGDB file name      */ 
     "1000 "            /* Initial LOGDB size   */ 
     "\"\" "            /* SQLDB file name      */ 
     "1000 ");          /* Initial SQLDB size   */ 
 

By using two double quotes ("") in the example above, SDBGEN will assign the default file names to the TRANSDB, LOGDB and SQLDB system databanks.

Note: We highly recommend that you let the SDBGEN program determine the appropriate location for the system databanks. SDBGEN does this by examining the available hard drives on the system and spreading the files over the disks and taking into account recovery and performance issues.


Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL Documentation PREV NEXT