Sheerpower®
A Guide to the Sheerpower Language


Previous Contents Index


Appendix N
Advanced Record Systems (ARS) Utilities

N.1 ARS Utilities Overview

Advanced Record Systems (ARS) is a high-speed and performance database engine integrated into Sheerpower. The purpose of this appendix is to outline the various utilities available for ARS.

N.1.1 Accessing ARS Help Text

FORMAT:


  c:\Sheerpower\ars>ARS_UTILITY_NAME 

DESCRIPTION:

To access the Help for ARS, run the Command Prompt program from the sheerpower/ars directory and type in the utility name to view its help text. For example, to view the help for ARSRESTORE type the following at the Command Prompt:


  c:\Sheerpower\ars>ARSRESTORE

The resulting help text will be displayed:


ARSRESTORE V07.01 
 
Command Format: 
  ARSRESTORE infilespecs outfilepath [flag1 flag2 ...] 
    infilespecs: comma separated list of files to restore 
    outfilepath: directory to store the files in 
    flags:       OPTIONAL flags 
      -continue:   continue record adds in spite of errors 
      -stats:      output stats from the restore 
      -nocrc:      Don't do CRC processing on new file 
      -fastcrc:    Use FAST CRCs on new file 
      
      
Alternate Command Format: 
  ARSRESTORE -include filewithspecs [flag1 flag2 ...] 
    -include:      tells ARSRESTORE to use next param 
    filewithspecs: textfilespec with infilespecs and outfilepaths 
    flags:         OPTIONAL flags 
      -continue:     continue record adds in spite of errors 
      -stats:        output stats from the restore 
      -nocrc:        Don't do CRC processing on new file 
      -fastcrc:      Use FAST CRCs on new file 
 

N.2 ARSBACKUP - Backup ARS Database

DESCRIPTION:

This utility is used to backup ARS files and other files from one folder (directory) to another. It will perform a special backup of ARS files to a special file format with an extension of .ARS_BACKUP.

Any files that are not ARS will be copied to the new directory. The backup is done using many threads and is synchronized across all of the ARS files so that the data is also synchronized exactly at the moment that the backup starts.

ARS also includes utilities to backup ARS tables in real time--- no need to stop or check-point applications in order to back them up and safe-keep the data. All data is synchronized and reliably backed up by ARS even while database tables are being written to. This allows for true 24/7 non-stop applications.

FORMAT:


Command Format: 
  ARSBACKUP infilespecs outfilepath [description] [flags] 
    infilespecs: comma separated list of files to backup 
    outfilepath: directory to store the files in 
    description: OPTIONAL "Quoted string to save with backup" 
    flags: OPTIONAL flags separated by a : 
      PROMPT to prompt user before starting jobs 
      STATS  to display stats after backup 
      
Alternate Command Format: 
  ARSBACKUP -include filewithspecs [description] [flags] 
    "-include":  tells us to use a textfile for the filespecs 
    filewithspecs: name of textfile with infilespecs and outfilepaths 
    description: OPTIONAL "Quoted string to save with backup" 
    flags: OPTIONAL flags separated by a : 
      PROMPT to prompt user before starting jobs 
      STATS  to display stats after backup 

N.2.1 Create ARSBACKUP Files When Programs Are Running

While your programs are running, you can create the ARS backup files using ARSBACKUP by either by typing the command in to the Command Prompt program, or by creating a .BAT file to send the command:


  arsbackup \xxx\data\*.*    \backups\xxx\data_backup\

For example, if your application was called PAYROLL and this was also your directory root, and if your backup folder path was \backups\payroll\data_backup\, you would use the following command:


  arsbackup \payroll\data\*.*    \backup\payroll\data_backup\

This command creates backup of all the data, even if the tables are being written to at the time of the backup.

N.3 ARSCHK - Check ARS Database

DESCRIPTION:

This utility scans an ARS file looking for problems in the internal file structure and reports any errors as well as ARS statistics that are kept and/or derived from the scan.

FORMAT:


Command Format: 
  ARSCHK file-to-check [NOCRC] [log-file] 
    file-to_check: name of file we want to check 
    NOCRC:         OPTIONAL 2nd parameter to disable CRC checking 
    log-file:      OPTIONAL 3rd parameter filespec to log results to 

N.4 ARSFIX - Fix ARS Database

DESCRIPTION:

This utility is designed to recover data from a corrupt ARS file. It scans an ARS file looking for records and then puts as many records as it can reasonably locate into an output file. It will report problems as it goes and tells the user the number of recovered records. ARSFIX skips files that are currently open.

NOTE: When running a Sheerpower application, if the error message below displays, then run the ARSFIX utility on the ARS file that received the error:


 Attempt to open a writable table on too many nodes at once... 

FORMAT:


Command Format: 
  ARSFIX filespecs [flags ...] 
    filespecs: wildcard filespecs to fix 
    flags:     OPTIONAL flags 
      -fastcrc:  Use FAST CRCs on new file 
      
      
Alternate Command Format: 
  ARSFIX filspec [fdlfile] [logfile] 
    filespec: filespec to fix 
    fdlfile:  OPTIONAL FDL Filespec to use for new file create 
    logfile:  OPTIONAL LOG Filespec for logging status to 

N.5 ARSRESTORE - Restore ARS Database

DESCRIPTION:

This utility is used to restore ARS files and other files from one folder (directory) to another. It will interpret the special file format with for files with an extension of .ARS_BACKUP and restore them to ARS files. It just does a copy of files that are NOT ARS file to the new directory. The restore is done using LOTs of threads.

FORMAT:


Command Format: 
  ARSRESTORE infilespecs outfilepath [flag1 flag2 ...] 
    infilespecs: comma separated list of files to restore 
    outfilepath: directory to store the files in 
    flags:       OPTIONAL flags 
      -continue:   continue record adds in spite of errors 
      -stats:      output stats from the restore 
      -nocrc:      Don't do CRC processing on new file 
      -fastcrc:    Use FAST CRCs on new file 
      
      
Alternate Command Format: 
  ARSRESTORE -include filewithspecs [flag1 flag2 ...] 
    -include:      tells ARSRESTORE to use next param 
    filewithspecs: textfilespec with infilespecs and outfilepaths 
    flags:         OPTIONAL flags 
      -continue:     continue record adds in spite of errors 
      -stats:        output stats from the restore 
      -nocrc:        Don't do CRC processing on new file 
      -fastcrc:      Use FAST CRCs on new file 

N.6 FDL2ARS - Create ARS from FDL

DESCRIPTION:

This utility creates an empty ARS file from the definition specification contained in an FDL (file definition language) file.

FORMAT:


Command Format: 
  FDL2ARS fdlfilespec [outfilespec] 
    fdlfilespec: FDL File name to use for creating file 
    outfilespec: OPTIONAL File name to create (otherwise from FDL) 

N.7 ARS2FDL - Create FDL from ARS

DESCRIPTION:

This utility takes an ARS file and creates a FDL file from it that contains the definition of how to create an equivalent ARS file from it including key structures.

FORMAT:


 ARS2FDL sourcefilespec fdlfilespec 
   sourcefilespec: ARS filespec to get the definition from 
   fdlfilespec:    FDL filespec to receive the ARS file structure definition 

N.8 ARS2ARS - CREATE ARS from ARS

DESCRIPTION:

This utility takes an ARS file and creates a new ARS file from it. It can be used to re-compress free space, or multi-bucket records. It can also be used to re-define the key structure of the file by specifying an optional FDL filespec that contains the new definition.

FORMAT:


Command Format: 
  ARS2ARS infilespec outfilespec [fdlfilespec] [flags] 
    infilespec:  File name to convert 
    outfilespec: File name of new file to create 
    fdlfilespec: FDL File name to use for new file attributes 
    flags:       OPTIONAL flags 
      -stats:    output statistics 

N.9 ARSCACHESIZE - Display Locking & Cache Management Statistics

DESCRIPTION:

This utility displays caching and lock management statistics for file files specified to it.

FORMAT:


Command Format: 
  ARSCACHESIZE files-to-display 
    files-to-display: wildcard filespec of ARS files to display info for 

N.10 ARSERR2TEXT - Display ARS Error Information

DESCRIPTION:

This utility prints an intelligible (hopefully) text describing an ARS error number that may have been returned from an API call or displayed by an ARS utility.

FORMAT:


Command Format: 
  ARSERR2TEXT errnum 
    errnum - the decimal error number to display a text description for 

N.11 ARSFLUSH - Flush Cache

DESCRIPTION:

This utility flushes the caches of opened ARS files.


Previous Next Contents Index