Salesforce

DBTOOL SQL WIDTH crashes with "Unable to upgrade record"

« Go Back

Information

 
TitleDBTOOL SQL WIDTH crashes with "Unable to upgrade record"
URL NameDBTOOL-SQL-WIDTH-crashes-with-Unable-to-upgrade-record
Article Number000132579
EnvironmentProduct: Progress
Version: 9.1D06, 9.1E
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Other: Database, DBTOOL, SQL-WIDTH
Question/Problem Description
DBTOOL SQL WIDTH report and fix crashes with:
Unable to upgrade record <tablenumbber/recid>

Occasionally DBTOOL SQL WIDTH does not complete, it hangs for several minutes, the protrace file contains the following call stack:
//=====================================================
PROGRESS stack trace as of <timestamp>
//=====================================================
Exception code: C0000005 ACCESS_VIOLATION
Fault address:  00000000BB3FA786 01:0000000000119786 <DLC>\BIN\dbtool.exe

.
.
.
Address           Frame
00000000BB3FA786  00000000520FEB10   recDropColumn+1D6
00000000BB44DF0F  00000000520FEBD0   rcUpgradeRecord+DF
00000000BB357F2A  00000000520FEC90   0001:0000000000076F2A <DLC>\BIN\dbtool.exe
00000000BB353F46  00000000520FEF30   0001:0000000000072F46 <DLC>\BIN\dbtool.exe
00000000BB35B8DB  00000000520FF000   0001:000000000007A8DB <DLC>\BIN\dbtool.exe
00000000BB359B7E  00000000520FFC30   0001:0000000000078B7E <DLC>\BIN\dbtool.exe
00000000BB551049  00000000520FFC70   juMsgSavedCount+2A7F9
0000000059438364  00000000520FFCA0   BaseThreadInitThunk+14
000000005B637091  00000000520FFCF0   RtlUserThreadStart+21

...
Steps to Reproduce
Clarifying Information
Error MessagedoOption: Error - Unable to upgrade record <tablenumber/recid>, error -16

Occasionally no errors are reported, it hangs for several minutes, protrace is generated.
Defect Number
Enhancement Number
Cause
The SQL-WIDTH update fails due to the 32K bytes field limit on the ABL character type. 
As a field in a table, the maximum length is 31,991 bytes .
Resolution
In order to resolve this issue, the record needs to be dumped and deleted or modified so that it is no longer hitting the maxfield length.
 
1. Isolate the record in question

From the tablenumber and recid reported in the DBTOOL error
 
For example: "Unable to upgrade record 4/3901168
  • tableNum: 4 
  • recid: 3901168 
Determine the tableNAME from the tableNUM:
FIND FIRST _file WHERE _file._file-number = 4 NO-LOCK.
DISPLAY _file-number _file-name.

For example: The tablename is Customer which will be used in the code examples below.
 
2. Dump the record:

Example: To dump recid: 3901168 from tablenum 4 (Customer)
OUTPUT TO './fixthisrecord.out'. 

FIND FIRST customer WHERE RECID(customer) = 3901168. 
    EXPORT customer. 

OUTPUT CLOSE.
3. Delete the record 

Example: To delete recid: 3901168 from tablenum 4 (Customer)
FIND FIRST customer WHERE RECID(customer) = 3901168. 
DELETE customer.

4. Review and Modify the record content generated in Step 2: "fixthisrecord.out", then reload the modified customer record < 32 KB 
 
/* NOTE!  fixthisrecord2.out is the modified export < 32K from fixthisrecord.out */ 

INPUT FROM VALUE ('./fixthisrecord2.out'). 

DO WHILE NOT ERROR-STATUS:ERROR TRANSACTION: 
 CREATE customer. 
 IMPORT CUSTOMER. 
END.
5. Run DBTOOL SQL WIDTH only on this table (example tablenumber 4) to re-verify. Having fixed this single field, ensure that there were no others approaching the limit.

Another approach is to use ABL to report on the maximum field lengths, refer to Article  How to report on character fields where the length of data exceeds the SQL-WIDTH value?  for an example report.
Workaround
Notes

 
Keyword Phrase
Last Modified Date11/20/2020 7:34 AM

Powered by