Pervasive logo

Prev User's Guide Next

rbldcli


rbldcli - Command line Rebuild utility.

Synopsis

rbldcli [ -parameter ] file 
rbldcli @command-file 

Description

rbldcli is used to rebuild MicroKernel data files on your server.

Options

-c
Instructs Rebuild to continue with the next file if an error occurs. The utility 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.
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 Btrieve and your files have a relatively large number of duplicate keys, you can use the -d parameter 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 available memory exists
uses an alternative method, -m0, if the amount of available memory is not sufficient.
-m0
Clones and copies the 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.
-m2
Clones the 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 new file in which the records are in a different physical order than in the original file.
A file built with the -m2 method has key pages that are 100% full. This allows the file to be 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 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.)
-pD Optimizes page size for disk storage. For a discussion of optimal page size for disk storage, see Choosing a Page Size in Pervasive.SQL Programmer´s Guide, which is part of the Pervasive.SQL Software Development Kit (SDK).
-pP Optimizes for processing (that is, for your application accessing its data). For -pP, Rebuild uses a page size of 4096 bytes.
bytes Specifies the page size (in bytes) for the new file. The only valid values are 512, 1024, 1536, 2048, 2560, 3072, 3584, and 4096 (multiples of 512 up to 4096).
-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.
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.
-s<D | K>
Retains in the rebuilt file the existing system data and key from the source file. If you omit this parameter, Rebuilt does not include the system data and key in the rebuilt file.
-sD Rebuilds the file to include system data. The system data is not indexed.
-sK Rebuilds the file to include system data and key. The system data is indexed.
-lfile
Specifies a file name, and optionally a path location, for the Rebuild log file. The default file name is rbldcli.log on Windows and Linux. On NetWare, the default file name is brebuild.log. The default location is the current working directory on Windows and Linux. On NetWare, the default location is SYS:\SYSTEM.
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.
-f<6 | 7 | 8>
Specifies a file format for the rebuilt file. File formats supported are versions 6.x, 7.x, and 8.x.
The following example rebuilds a file to the 7.x format:
rbldcli -f7 c:\pvsw\demodata\class.mkd
If you omit this parameter, Rebuild uses the value set for the MicroKernel´s Create File Version configuration option.
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. For example, if the database engine is Pervasive.SQL 2000i and you specify a file format of 8.x (-f8), the file is rebuilt to 7.x. File for mat 7.x is the highest one supported by the Pervasive.SQL 2000i engine.
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.
Example 1. 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 Pervasive.SQL 7 engine. That engine does not support true NULLs.
file
Specifies the file(s) 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 sys:mydir\*.* <end>
-c -p1024 dta:\dir\*.* <end>
-m0 -k0 sys:\ssql\*.* <end>

See Also

Advanced Operations Guide for more information about the Rebuild utility for Linux.


Prev
pvnetpass
Contents
Up
Check for Revisions
Next
sqlmgr