Converting to Version | Adds Support for File Features |
---|---|
16.0 | Maximum key lengths widened to 1024 bytes to enable indexing of longer data, such as VARCHAR, without having to use PARTIAL INDEX |
13.0 | • Maximum file sizes in the terabytes • System data v2 for tracking and querying insert and last update time stamps |
9.5 | • More than 119 segment keys and files sizes up to 256 GB • Long owner names with up to 20 characters instead of 8 • AES-256 file encryption of files with long owner names • 16K page size • Page compression |
9.0 | Disabling 2GB file segmentation to create one continuous file |
8.0 | Insert, update, and delete performance improvements offered by Turbo Write Accelerator |
Platform | Temporary File Names |
---|---|
Linux and Raspbian | _rbldxxxxxx, where xxxxxx is 6 random characters. Caution: Be sure that you do not delete the Rebuild executable, rbldcli. |
Windows | _rbldx, where x is a number. |
GUI | Description | Related Information |
---|---|---|
System Data | Specifies whether Rebuild is to retain, add, or drop system data and keys. System data is used for transaction durability logging when no user-defined unique data key exists. System data v2 can be used to track record updates. | |
Page Compression | Specifies page compression for the file. The choices are Keep Existing, On, and Off. Keep Existing retains whatever page compression the file contains, if any. | Available only for file format 9.5 or newer. |
Record Compression | Specifies record compression for the file. The choices are Keep Existing, On, and Off. Keep Existing retains whatever record compression the file contains, if any. | |
Continue on Error | Determines whether Rebuild continues if it encounters an error during the rebuild process. If you select Yes, the tool continues with the next file even if an error occurs. The tool alerts you to non-MicroKernel data files or other errors but continues rebuilding data files. If you select No, the tool halts the rebuild if it encounters an error. This option is useful if you use wildcard characters for the rebuilt files. | |
Save Settings on Exit | Saves the current values in this dialog box for use in subsequent Rebuild sessions. | |
Key Number | Specifies the key by which the tool reads when rebuilding a file. If you select NONE, then Rebuild reads the source file in physical order and creates the rebuilt file in physical order with rebuilt indexes. Because NONE is faster and creates smaller files, use it whenever possible. | |
File Format | You can select a version other than the default set in the Create File Version of the engine Compatibility property. | |
Page Size | Specifies the page size (in bytes) of the new files. Choose either EXISTING, Optimal (disk space), Optimal (data access), or a size in bytes. If you select EXISTING, the tool uses the existing page size. The tool changes the page size if the original size is no longer available or would not work for the other options selected. For example, assume you have a v5.x file with a page size of 1024 and 24 keys. Because Btrieve 6.0 and later supports only 23 keys for a page size of 1024, the tool automatically selects a new page size for the file and writes an informative message to the status file. | • For optimizing for data access, see Optimizing the Rebuild Process |
Output Path | Specifies an existing directory for rebuilt files, which can be other than the default of the current directory. This option lets you rebuild large files on a different server. The MicroKernel and its communications components must be loaded on the server that contains the rebuilt files. Do not use wildcard characters in the path. If the output directory is not the original file location, the original file is not deleted during the rebuild. If the output directory is the same as the original file, the original file is deleted and replaced with the rebuilt file. When DefaultDB is set to use database security, you can rebuild files only in locations listed in the Directories property for DefaultDB. | |
Log File | Specifies a rebuild log file directory, which can be other than the default location of the current working directory. Do not use wildcard characters in the path. | • Log File |
parameter | A parameter specifies a setting used with the tool. You may use parameters in any order. Precede each parameter with a hyphen (-). Do not place a space after the hyphen or after the single-letter parameter and the parameter value. Note: On Linux and Raspbian, the parameters are case-sensitive. |
file | The data and dictionary files to convert. If the source files are not in the current working directory, you must include the location for each file, either as a fully qualified or a relative path. You may use the asterisk (*) wildcard character in the file name to select multiple files in a location. Note: If the original file contains an owner name, Rebuild applies the same owner name and level to the rebuilt file. |
@commandFile | Fully qualified file name of a command file for Rebuild to execute. A command file can have multiple entries, with each entry containing command line parameters (if any) and the set of files to convert, followed by <end> or [end]. When specifying files to rebuild, use full directory path names. You may use the asterisk (*) wildcard character in the file names. The following is an example of an rbldcli command file: –c d:\mydir\*.* <end> –c –p1024 e:\dir\*.* <end> –m0 –k0 d:\db\*.* <end> |
-c | Continues with the next data or dictionary file if an error occurs. The tool notifies you of non-MicroKernel data files or errors with MicroKernel files, but continues rebuilding data files. The error is written to the log file. See Log File. Tip... This parameter is helpful when you use wildcard characters (*.*) for a mixed set of files, which can have a combination of MicroKernel files and non-MicroKernel files. Rebuild reports an error for each non-MicroKernel file, along with errors on MicroKernel files, but continues processing. |
-d | Converts pre-6.0 supplemental indexes, which allow duplicates, to 6.x, 7.x, or 8.x indexes with linked-duplicate keys. Without -d, Rebuild preserves the indexes as repeating-duplicate keys. If you access your data files only through the MicroKernel Engine and your files have a relatively large number of duplicate keys, you can use -d to enhance the performance of the Get Next and Get Previous operations. |
-m<0 | 2> | The "m" stands for "method." By default, Rebuild selects -m2 as the processing method. If you select -m0, then Rebuild uses the alternative method -m0 if memory is insufficient. See Amount of Memory for how it affects the method chosen. |
0 | Rebuilds the data or dictionary file without dropping and replacing indexes. The -m0 method is typically slower than -m2. A file created with -m0 has key pages approximately 55% to 65% full, making it more optimized for writing than for reading. If you can afford the extra rebuild time, which can be considerable depending on the situation, you may choose this option based on the needs of your application. See also Optimizing the Rebuild Process. |
2 | Rebuilds the data or dictionary file by dropping the indexes, copying records to the new file, and rebuilding the indexes. The -m2 method is typically faster and creates smaller files than the -m0 method. It creates a file in which the physical order of records may differ from the original file. A file built using -m2 has key pages 100% full and optimized for reading. |
-p<D | P | bytes> | Optimizes page size for disk storage or processing, or specifies a specific page size to use for the rebuilt file. If -p is omitted, Rebuild uses the page size from the source file. If the source page size is not possible for the new file version, Rebuild changes the page size and displays an informative message explaining the change. For example, older file formats, such as 5.x, supported a page size of 1024 with 24 keys. File format 8.x supports only 23 keys for a page size of 1024, so Rebuild would select a new page size to create an 8.x file. The database engine may ignore the page size specified and automatically upgrade the page size to a multiple of 512 bytes, not exceeding the size allowed for the selected file version. For example, for the 9.5 file format, odd page sizes such as 1536 and 3072 are not supported. The database engine automatically upgrades to the next valid page size because that page size is more efficient. For older file formats, the database engine may upgrade the page size based on additional conditions. See also Index Page Size. |
D | Optimizes page size for disk space efficiency. See Choosing a Page Size in Zen Programmer’s Guide. |
P | Optimizes data access for application performance. For -pP, Rebuild uses a default page size of 4096 bytes. |
bytes | Specifies the page size (in bytes) for the new file. For file versions before 9.0, valid values are 512, 1024, 1536, 2048, 2560, 3072, 3584, and 4096. For file version 9.0, the values are the same, with the addition of 8192. For file version 9.5, valid values are 1024, 2048, 4096, 8192, and 16384. For file versions 13.0 and 16.0, valid values are 4096, 8192, and 16384. |
-bdirectoryname | The default output location is the current directory of the source files to be rebuilt. Use ‑b to select another location for the rebuilt file. You may use either a fully qualified or a relative path. Do not use wildcard characters in directoryname. Directoryname must already exist. Rebuild does not create it. Without ‑b, the rebuilt file replaces the original data file. If you use ‑b to select an alternate directory, the rebuilt file is placed there and the original file is retained. However, if the location already contains data files with the same names, then Rebuild fails and returns an error message to check the log file. You must have create file permission for the directoryname location, as well as for the source file location if you omit ‑b. In order to work, rbldcli requires that the local database engine be running. If directoryname is a location on a remote server, then a database engine must be running there as well. Note: The standalone tool rebldcli_offline.exe does not require a database engine. Other than this, its capabilities are identical to the original rbldcli, except that it cannot output rebuilt files to a location on a remote server. |
-knumber | Selects the key number by which Rebuild reads when rebuilding the source file and sorting the rebuilt file. If you omit this parameter, Rebuild reads the source file in physical order and creates the rebuilt file in physical order with rebuilt indexes. Because omitting the parameter is faster and creates smaller files, use it whenever possible. See also Optimizing the Rebuild Process. |
-s[D | K | 2D | 2K] | Rebuilds the file retaining existing system data and keys from the source file, or adding them if not present. If you omit this parameter, Rebuild does not retain any system data or key in the rebuilt file. |
D | Rebuilds the file with new system data. System data will not be indexed. |
K | Rebuilds the file with new system data. System data will be indexed. |
2D | Rebuilds the file with new system data v2. System data will not be indexed. For 13.0 and 16.0 format files only. |
2K | Rebuilds the file with new system data v2. System data will be indexed. For 13.0 and 16.0 format files only. |
-lfile | Specifies a log file name, and optionally a path location, for the Rebuild log file. The default file name is rbldcli.log on Windows, Linux and Raspbian. The default location is the current working directory. The following conditions apply: • The path location must already exist. Rebuild does not create it. • If you specify a path location without a file name, Rebuild ignores this parameter and uses the default file name and location. • If you specify a file name without a path location, Rebuild uses the default location. • You must have read and write file permission for the location you specify. Rebuild uses the default location if it cannot create the log file because of file permissions. See also Log File. |
-pagecompresson | Turns on page compression for the file provided the following conditions are true: • The version of the database engine is 9.5 or later. • The setting for Create File Version is 0950 (9.5) or later. |
-pagecompressoff | Turns off page compression for the file. This parameter has no effect if the file does not use page compression. |
-recordcompresson | Turns on record compression for the file. |
-recordcompressoff | Turns off record compression for the file. This parameter has no effect the file does not use record compression. |
-f<6 | 7 | 8 | 9 | 95 | 13 | 16> | Specifies a file format for the rebuilt data or dictionary file. File formats supported are versions 6.x, 7.x, 8.x, 9.x, 9.5, 13.0, and 16.0. The following example rebuilds a file in 9.0 format: rbldcli -f9 file_path\class.mkd The following example rebuilds a file in 13.0 format: rbldcli -f13 file_path\class.mkd If omitted, Rebuild defaults to the value selected in ZenCC for the MicroKernel Create File Version setting in the Compatibility properties for the engine. Note: If you specify a file format newer than the version supported by the database engine, Rebuild uses the highest supported file format for that engine. It reports no error or message that this has been done. Note: Rebuild does not convert data types in indexes. If you rebuild a file to an older file format for use with an older database engine, confirm what data types are supported by the database engine and the application. Example: Your data file contains index fields that use the WZSTRING data type. If you rebuild the data file to a 6.x file format, the WZSTRING data type is not converted. You would be unable to use the data file with a Btrieve 6.15 engine. That engine does not support the WZSTRING data type. Example: Your data file contains true NULLs. You rebuild the data file to a 7.x file format. The true NULLs are preserved. You would be unable to use the data file with the Zen 7 engine because it does not support true NULLs. |
-uiduname | Sets the name of the user authorized to access a database with security enabled. |
-pwdpword | Sets the password for the user identified by uname. Pword must be supplied if uname is specified. |
-dbdbname | Selects the name of the secured database. |