Truncate command

HERE YOU GO...


Page ID 408MPS

PROBLEM DESCRIPTION:

How do I correct data corruption issues?


PROBLEM RESOLUTION:

Below are the three instructions typically used to correct database issues.

If there is data corruption, these three functions can be run in order as
they appear in this document. However, IdxBuild can be run without
Truncating the .B1 file or running DBRPR.

================================================================
TRUNCATE BI

In general we DO NOT recommend you truncate the .bi file. However, there
are times when you are forced to truncate the .bi due to a crash or system
failure.

The .bi file in your Vantage database directory contains completed
transactions that may or may not, have yet been written to the ".db" file,
which is the complete database.

To truncate the .bi file, make sure you have shut down the Vantage database
server, stopping the Gears of ProControl. Then execute the following
command at a DOS prompt from one of your workstations:


For NT: (Vantage 4.00)

1) Go to the SERVER.

2) Using the MS-DOS Command Prompt, change directory to:
C:\Epicor\Progress\BIN ( Replacing C:\ with your
physical drive)

3) Then type:
_proutil c:\epicor\vantage\db\vantage.db -C truncate bi


** If the system will not allow you to truncate the bi file normally, you
will need to "force" the truncation. Enter the following command:

_proutil c:\epicor\vantage\db\vantage.db -C truncate bi -F


===============================================================
DB REPAIR UTILITY

How to run the database utility DBRPR to scan your database for bad records
and blocks.
Run this utility if:
- You receive errors that indicate the there has been database corruption or
damage. (Errors include 1124, 355, 18, 49, etc.)
- You have had disk or hardware problems that may have damaged the database
and structures in any way.

CAUTION: Keep in mind, if the data block cannot be repaired, this utility
may attempt to simply remove it from your database. If there is severe
corruption, you should alway try to restore your database to some time prior
to the corruption. If this is not possible, then Dumping and Loading your
database my be the only solution.

PREREQUISITES:
The database repair utility is a function of proutil and the _proutil
executable. You execute it like any other proutil function. However there
are a number of prerequisites to using the utility:

1. ALWAYS HAVE A CURRENT BACKUP OF THE DATABASE.
2. The ProControl must be down and the database not in use.


RUNNING THE UTILITY:
To execute the Database repair utility:
1. Trucate the BI file. (See above)
2. Using the MS-DOS Command Prompt, change directory to:
C:\Epicor\Progress\Bin> ( Replacing
C:\ with your physical drive)
3. Enter the command:
_proutil c:\epicor\vantage\db\vantage.db -C dbrpr


The Version of your PROGRESS Software will display followed by the main
menu:

DATABASE REPAIR MENU
--------------------
--> 1. Database Scan Menu
2. Test One or More Indicies
3. Remove Bad Record Fragment
4. Dump Block
5. Load Block
6. Copy Bytes Between Files
7. Load RM Dump File
8. Reformat Block to a Free Block
Q. Quit

Choice:


Select Option 1. Database Scan Menu


From the DATABASE SCAN MENU select options 3, 5, 7 and 8. Simple turn
on each of these by pressing 3 then <ENTER>, 5 then <ENTER>, etc.

Once all selections are turned "ON", then press <G> and <ENTER> to begin
processing.


===============================================================
INDEX REBUILD.

Follow this procedure to rebuild ALL indexes. Following the DBRPR and/or
due to index corruption, you will need to rebuild the database indexes.

To rebuild all indexes, select All from the Index Rebuild Utility menu. The
index rebuild will begin processing. The utility ends when the DOS prompt
is redisplayed.

** Reindexing may take a Few HOURS depending on the size of your database.
On the average a 200MB database running this utility at the server (200mhz
Pentium) will run about 1 to 1.5 hours.

FOR NT (you must do this at the server for NT)
1. With ProControl shutdown the database stopped.
2. Using the MS-DOS Command Prompt, change directory to:
C:\Epicor\Progress\Bin> (
Replacing C:\ with your physical drive)
3. Enter the command:
SET DLC=C:\Epicor\Progress
4. Enter the command:
Path=C:\Epicor\Progress;%PATH%
5. From this DOS prompt enter the command:
_proutil C:\Epicor\Vantage\db\vantage.db -C idxbuild all -TM 32 -TB
24

Please Note: Before running it is helpfull to backup the log file i.e.
vantage.lg to a different directory and then when the procedure runs you
will have a new log file created with the information about this procedure.
If all went well it should report at the end that zero errors were
encountered. If errors are encountered search for RECIDs in the log file to
determine the records with errors.


ADDITIONAL INFORMATION:
Version: 4.00

XA400

-----Original Message-----
From: Dunn, Nancy [mailto:ndunn@...]
Sent: Wednesday, August 22, 2001 10:12 AM
To: Vantage Onelist (E-mail)
Subject: [Vantage] Truncate command


Does anyone have the syntex for the Truncate BI command laying around?
I'm playing with changing my DB structure and I need to truncate the BI
before I do a PROCOPY.
Thanks
Nancy Dunn
Winco Ind.



Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Does anyone have the syntex for the Truncate BI command laying around?
I'm playing with changing my DB structure and I need to truncate the BI
before I do a PROCOPY.
Thanks
Nancy Dunn
Winco Ind.