Salesforce

Converting an audit enabled database to UTF-8 results in errors 14323, 3970, 3968, 3942, and 1410.

« Go Back

Information

 
TitleConverting an audit enabled database to UTF-8 results in errors 14323, 3970, 3968, 3942, and 1410.
URL Name000045860
Article Number000165670
EnvironmentProduct: OpenEdge
Version: 11.x
OS: All supported platforms
Question/Problem Description
Converting an audit enabled database to the UTF-8 code page results in errors 14323, 3970, 3968 and 3942.  
UTF-8 conversion fails and leaves the database unusable error 3942.

The user performing the conversion has been granted with all 4 Audit permissions (Audit administrator, Application audit event inserter, Audit data archiver, Audit data reporter).

Prior to UTF-8 conversion:
  • All audit policies have bee disabled with Audit Policy Maintenance.
  • The audit tables have been emptied with "proutil <dbname> -C auditarchive "
  • Auditing has been disabled with "proutil <dbname> -C disableauditing"
  • The database is converted with "proutil <dbname> -C convchar convert UTF-8"
Steps to Reproduce
Clarifying Information
Audit tables are checked after emptying with auditarchive:
FOR EACH _aud-audit-data-value. 
         DISP _old-string-value _new-string-value. 
END. 

FOR EACH _aud-audit-data. 
         DISP _aud-audit-data. 
END
Error MessageRead permission denied by DB (14323)
SYSTEM ERROR: error (-1218) fetching template record (3970)
SYSTEM ERROR: scanning template for table _aud-file-policy (3968)
** Conversion failed, database is unusable. (3942)
Error code -21418 returned from fdfnd. (1410)
Defect NumberDefect PSC00286508
Enhancement Number
Cause
The problem is that when auditing is disabled then access to all audit data is denied. This includes proutil convchar, but this shouldn't be the case. Proutil convchar should still be allowed access. 
Resolution
Upgrade to OpenEdge 11.6 or later.
Workaround
To work around the problem in versions prior to OpenEdge 11.6, convert that database with auditing enabled.  But if you want to preserve the audit data you must dump it with a text dump rather than a binary dump.  If the binary dump is loaded with auditload after the conversion this will result in error 10855:

User-added image


1. Re-vert to pre UTF-8 conversion backup

2. Re-enable Auditing if the restored database is not audit enabled.
$   proutil dbname -C enableauditing -U <username> -P <password> 

3.  If the audit data is to be loaded back into the database after conversion, dump the audit data as text:

Dump the audit data from Data Administration->Admin->Dump Data and Definitions->Audit Data.... (Select ALL the data, the data is dumped by default using UTF-8).  Make sure the user has Audit Archiver permissions:
Admin->Security->Edit Audit Permissions... Otherwise the error "You must have Audit Archiver permissions to access this dump option!" will be displayed when attempting to dump the data.

4.  Delete the audit data from the database by dumping it off as binary:
$   proutil dbname -C auditarchive -U <username> -P <password>
 
5. Access the database single-user and execute the following 3 ABL statements in the procedure editor to delete audit policy records:
$   mpro dbname -U <username> -P <password> -1
for each _aud-audit-policy: delete _aud-audit-policy. end.
for each _aud-event-policy: delete _aud-event-policy. end.
for each _aud-file-policy: delete _aud-file-policy. end.
6.  Verify that the _aud-audit-policy, _aud-event-policy, _aud-file-policy are empty
$   proutil databaseName -C tabanalys area <auditAreaName>

RECORD BLOCK SUMMARY FOR AREA "AuditAreaName" : 7
-------------------------------------------------------

                                 -Record Size (B)- ---Fragments--- Scatter          
Table                    Records               Size    Min    Max    Mean    Count    Factor    Factor
_aud-audit-data          0                     0.0B    0      0      0       0        0         0     
_aud-audit-data-value    0                     0.0B    0      0      0       0        0         0     
_aud-audit-policy        0                     0.0B    0      0      0       0        0         0     
_aud-event               131                   8.1K    20     96     63      131      1         1     
_aud-event-policy        0                     0.0B    0      0      0       0        0         0     
_aud-field-policy        0                     0.0B    0      0      0       0        0         0     
_aud-file-policy         0                     0.0B    0      0      0       0        0         0     


7.  Convert the database to UTF-8
$  proutil databaseName -C convchar convert utf-8 -U <username> -P <password> 

8. After conversion, if the text audit data is to be loaded back in, l
oad the audit text data dumped in 3 above, Data Administration->Admin->Load Data and Definitions->Audit Data....
 
Notes
References to Other Documentation: 

OpenEdge Getting Started: Core Business Services, Part 3:Auditing

Progress Article: 
How to disable auditing?   
 
Keyword Phrase
Last Modified Date11/20/2020 7:24 AM

Powered by