Salesforce

Can't add a new bi extent after variable bi reached 2 GB limit

« Go Back

Information

 
TitleCan't add a new bi extent after variable bi reached 2 GB limit
URL NameP8270
Article Number000149114
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All Supported Operating Systems
Question/Problem Description
Adding a new bi extent since the variable bi extent reached 2 GB limit fails with error 8898
Before-Image filled to 2 gigabyte limit which caused database to shutdown with errors 10601 854.
Database BI file reached 2 Gig.
The bi file on disk is within 32-bytes of 2GB: 2,097,120 KB
 
Steps to Reproduce
Clarifying Information
Error 8898 refers to the current variable before-image extent.
There is enough disk space to add the new extent
ulimit as defined in .profile (UNIX) or disk quota limit (Windows) are not set disallowing files GT 2GB.
Error MessageSYSTEM ERROR: Attempted to exceed 2GB limit with file <pname>. (8898)
You must remove the variable length BI extent before adding additional BI extent(s). (8225)

SYSTEM ERROR: Attempted to exceed maximum size on file <path>\dbname.b1. (10601)
** Insufficient disk space to extend the before-image file. (854)
Defect NumberEnhancement OE00117215
Enhancement Number
Cause
This is expected behavior. A BI file cannot be added to a database without first truncating the bi file and removing the existing variable BI extent.

The fact that the before-image extent has reached the 2GB Progress limit, is the cause of the database to crash initially as the bi file could not be extended and is the issue with any access to the database after the fact. 

The fact that another bi extent could not be added due to the 8225 error, is a known issue when:
  1. The crashed flag has reset by subsequent actions after initial failure or
  2. The current size of this variable length BI extent on disk already exceeds (2GB - 32KB). This means that the current variable BI extent cannot first be rounded up in order to mark it a fixed extent. Before adding a new extent, the existing variable length extent must first be made into a "Fixed" extent.  In order to do this, the current variable length extent is first rounded up so that it is divisible by 32.  Since 2GB sharp cannot be represented by a 32-bit signed integer, the "real" 2GB limit on a variable bi extent is : 2,147,450,880
Resolution
The enhancement to be able to add a bi extent without having to first force a crash or truncate a bi file has not been implemented in the product.  As an alternative use the workarounds below.

In future, when a database crashes due to the BI file hitting the 2GB limit, either:
  1. immediately enablelargefiles or
  2. immediately add new bi extents, in order that the crashed flag is not reset by other actions.
Workaround
There are several methods to work around this situation.  The first is most strongly recommended, the remainder all carry their associated risks.
 
Method 1:  Go to backup
 
a)  Restore the last verified database backup. 
b)  Add new bi extents as may be appropriate with the "PROSTRCT add" utility
c)  Roll forward the appropriate ai files (if after-imaging is in use) up to the point of failure.
 
Method 2:  EnableLargeFiles
 
With the Enterprise License for Progress 9.1C and later, large files can be enabled against the database with the "proutil -C EnableLargeFiles" utility.  This will allow the current bi file to extend beyond this 2GB limit when access resumes.

Bear the following in mind before doing so:
a)  EnableLargeFiles is only available with Enterprise Licenses
b)  Ensure that the files system is enabled to support large files
c)  The Progress license must support large files for the operating system (example: even though SCO or Linux may support large files, the Progress product does not in support large files on SCO and started supporting large files on Linux in 9.1E)
d)  Ensure that there will be enough space for the before-image extent to expand. When the database is eventually re-started, roll-back recovery will kick in.  During this phase the before-image can grow to up twice as much its current size in a worst case scenario,
e) Should this fix fail, refer to Option 1.
 
Method 3:  Move the database to a new structure
 
This method has worked in as many cases as it has not worked.  It all depends on the variety of actions customers may have taken before-hand and how absolutely near the physical size of this errant variable bi extent is.
 
a)  Take a backup of the database with the -norecover option, which defers the truncation of the bi to the subsequent PROREST action:
$   PROBKUP dbname dbname.bak –norecover
$   PROREST dbname dbname.bak -vf

 
b)  Delete the database
$   PRODEL dbname
 
c)  Create a new database structure with additional bi extents to facilitate twice the current bi file sizes:
$   PROSTRCT create dbname dbname.st -blocksize <n>
 
d)  Restore the backup into this new structure:
$   PROREST dbname dbname.bak -verbose
 
e) Should this fix fail, refer to Option 1
 
Method 4: Force into the database  (This is by far the most drastic measure).
 
If no backup is available it may be possible to force entry into the database and access it,  but the database will be logically inconsistent and may not (very possibly will not) be reliable from this point forward. Please first review Article: Consequences of using the -F startup option   
 
** Take an OS backup of all the database files to a safe place to ensure a recoverable baseline. **
 
a) Force into the database by skipping crash recovery:
$   PROUTIL db-name -C truncate bi -F -G 0
 
b) Remove all the bi file(s) from the database, run the following command until no bi files remain:
$   PROSTRCT remove dbname bi
 
c) Create a new st file that contains only information about the new bi files that need to be added:

# example addbi.st  
b . f 2000000
b .

d) Add these bi extents to the database structure:
$   PROSTRCT add dbname addbi.st
 
e) Run a PROSTRCT list to verify the added extents:
 
$   PROSTRCT list dbname dbname.st
 
f) Take a backup of the database and initiate corrective actions.  It is strongly suggested that this includes a full dump and load of the recovered database. Otherwise database teams need to also run database integrity checks (DBTOOL for data and IDXCHECK for indexes). Once physical integrity is restored, development teams need to run application logic backend reports, to assure business logic (delivery notes without invoices) and parent-child relational (order-lines without orders) integrity.
Notes
Keyword Phrase
Last Modified Date2/12/2021 10:09 AM

Powered by