Original File Format | Converted File Format | Reason for Conversion |
---|---|---|
9.5 | 13.0 | File sizes in the terabytes. Ability to add system data v2. |
9.0 | 9.5 | More than 119 segment keys and files sizes up to 256 GB. |
8.x | 9.x | Add support for file sizes up to 128 GB. |
8.x | 8.x | Remove deleted record space from a file, change the page size, or add system data. |
Pre-8.x | 8.x | Take advantage of insert, update, and delete performance improvements offered by Turbo Write Accelerator. |
7.x | 7.x | Original file does not have a system key. |
Pre-7.x | 7.x | Take advantage of 7.x features and improve general performance. |
Pre-6.0 | 6.x | Take advantage of 6.x features and improve general performance. Use this option only if you are running 6.x engines. |
Platform | Temporary File Names |
---|---|
Linux, macOS, 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 Object | Description | Related Information |
---|---|---|
Selected files | The data and dictionary files listed for rebuilding according to your selections using the Add button. | |
Add button | Adds a data or dictionary file to the list of files to be rebuilt. | |
Remove button | Removes the selected data or dictionary file in the list. | |
Clear button | Clears the entire list of selected data and dictionary files. |
GUI Object | 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 in addition be used to track record updates. | |
Page Compression | Specifies if you want page compression for the file. The choices are Keep Existing, On, and Off. Keep Existing retains whatever page compression the file contains, if any. | Page compression requires a file format of 9.5 or newer. |
Record Compression | Specifies if you want 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 notifies you of 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 have specified 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 specify NONE for this option, the tool clones the files, drops the indexes, copies the records into the new files, and rebuilds the indexes. Because this method is faster and creates smaller files than specifying a key number, use it whenever possible. This method may create a new file in which the records are in a different physical order than in the original file. If you specify a key number, the tool clones and copies the files without dropping and replacing indexes. While this method is slower than specifying NONE, it is available in case you do not want to rebuild your indexes. | |
File Format | Previously, Rebuild used the file version in the Create File Version setting in the engine compatibility properties. The current Rebuild tool allows you to set the file version independently of that setting. | |
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 does not work. 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 alternate location for the rebuilt files. (The default location is the current directory.) You must specify a directory that already exists. 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 location is different than the original file's 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 upon completion of the rebuild. DefaultDB w/ DB security: Cannot rebuild outside DB's file locations in Maintain Named Databases | |
Log File | Specifies a location for the rebuild log file. (The default location is the current working directory.) Do not use wildcard characters in the path. | • Log File |
-c | Instructs Rebuild to continue 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 errors are written to the log file. See Log File. Tip: This parameter is particularly useful if you specify wildcard characters (*.*) for a mixed set of files. Mixed set means a combination of MicroKernel files and non-MicroKernel files. Rebuild reports an error for each non-MicroKernel file (or any errors on MicroKernel files), but continues processing. |
-d | If you specify -d, Rebuild converts pre-6.0 supplemental indexes (which allow duplicates) to 6.x, 7.x, or 8.x indexes with linked-duplicatable keys. If you omit this parameter, Rebuild preserves the indexes as repeating-duplicatable 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 the -d option to enhance the performance of the Get Next and Get Previous operations. |
-m<0 | 2> | The "m" parameter stands for "method." Rebuild selects a processing method whether you specify this parameter or not. If you omit this parameter, Rebuild does the following: • Uses -m2 as the default method if sufficient memory is available. • Uses the alternative method-m0 if memory is insufficient. See Amount of Memory for how the amount of memory affects the method chosen. |
0 | Clones and copies the data or dictionary file without dropping and replacing indexes. This method is slower than the -m2 method. It is available in case you do not want to rebuild your indexes. A file built with the -m0 creates a file where each key page is about 55% to 65% full. The file is more optimized for writing and less for reading. If you can afford the extra rebuild time, which can be considerable depending on the situation, you might want to rebuild a file optimized for writing. See also Optimizing the Rebuild Process. |
2 | Clones the data or dictionary file, drops the indexes, copies the records into the new file, and rebuilds the indexes. This method is faster and creates smaller files than the -m0 method. The -m2 method may create a file in which records differ in physical order from the original file. A file built with the -m2 method has key pages that are 100% full. This optimizes the file 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 you omit this parameter, Rebuild uses the page size from the source file. If the source page size does not work for the current database engine, 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 different page size if building an 8.x file.) • The database engine may ignore the page size specified and automatically upgrade the page size. 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 storage. See Choosing a Page Size in Zen Programmer’s Guide. |
P | Optimizes for processing (that is, for your application accessing its data). 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 version 13.0, valid values are 4096, 8192, and 16384. |
-bdirectoryname | Specifies an alternate location for the rebuilt file (which may also be a location on a different server). The default location is the directory where the data file is located. You must specify a location that already exists. Rebuild does not create a directory for you. The directory also must be on a machine that is running the database engine. You may use either a fully qualified path or a relative path. Do not use wildcard characters in directoryname. On your local server, the MicroKernel database engine and the Message Router must be loaded. On a remote server, the MicroKernel database engine and communications components must be loaded. If you omit this parameter, the rebuilt file replaces the original data file. A copy of the original file is not retained. If you specify this parameter, the rebuilt file is placed in the specified location and the original file is retained. An exception to this is if the specified location already contains data files with the same names. Rebuild fails if the alternate location you specify contains files with the same names as the source files. For example, suppose you want to rebuild mydata.mkd, which is in a directory named folder1. You want to place the rebuilt file into a directory named folder2. If mydata.mkd also exists in folder2 (perhaps unknown to you), Rebuild fails and informs you to check the log file. Note: Ensure that you have create file permission for the location you specify (or for the location of the source file if you omit the parameter). |
-knumber | Specifies the key number that Rebuild reads from the source file and uses to sort the rebuilt file. If you omit this parameter, Rebuild reads the source file in physical order and creates the rebuilt file in physical order. 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 format files only. |
2K | Rebuilds the file with new system data v2. System data will be indexed. For 13.0 format files only. |
-lfile | Specifies a file name, and optionally a path location, for the Rebuild log file. The default file name is rbldcli.log on Windows, Linux, macOS, and Raspbian. The default location is the current working directory. The following conditions apply: • The path location must already exist. Rebuild does not create the path location. • 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 permission. See also Log File. |
-pagecompresson | Turns on page compression for 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 | |
-recordcompresson | Turns on record compression for file. |
-recordcompressoff | |
-f<6 | 7 | 8 | 9 | 95 | 13> | Specifies a file format for the rebuilt data or dictionary file. File formats supported are versions 6.x, 7.x, 8.x, and 9.x. The following example rebuilds a file in 9.0 format: rbldcli -f9 file_path\class.mkd The following example rebuilds a file in 9.5 format: rbldcli -f95 file_path\class.mkd If omitted, Rebuild uses the value set for the MicroKernel Create File Version configuration setting. Note1: If you specify a file format newer than the version supported by the current database engine, Rebuild uses the highest supported file format of that engine. Rebuild reports no error or message for this. Note2: 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, ensure that the engine supports the data types used. You must manually adjust data types as required by your application and by the database engine. Example1. 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 2. Your data file contains true NULLs. You rebuild the data file to a 7.x file format. The true NULLs are not converted. You would be unable to use the data file with the Zen 7 engine. That engine does not support true NULLs. |
-uiduname | Specifies the name of the user authorized to access a database with security enabled. |
-pwdpword | Specifies the password for the user identified by uname. Pword must be supplied if uname is specified. |
-dbdbname | Specifies the name of the database on which security is enabled. |
file | Specifies the data and dictionary files to convert. If the source file is not in the current working directory, include the location, either as a fully qualified path or as a relative path. You may use the asterisk (*) wildcard character in the file name to specify multiple files. Note: If the original file contains an owner name, Rebuild applies the owner name and level to the rebuilt file. |
@command_file | Specifies a command file for Rebuild to execute. You may include multiple entries in one command file. Each entry in the command file contains the command line parameters (if any) and the set of files to convert, followed by <end> or [end]. When specifying the files to convert, use full directory names. You may use the asterisk (*) wildcard character in the file names. The following is an example of a Rebuild command file: –c d:\mydir\*.* <end> –c –p1024 e:\dir\*.* <end> –m0 –k0 d:\ssql\*.* <end> |