RDBPROD: Strange results with RMU/LOAD using RRD File with unload done without RRD (Doc ID 736610.1)

Last updated on AUGUST 03, 2016

Applies to:

Oracle Rdb Server on OpenVMS - Version 7.0 to 7.2 [Release 7.0 to 7.2]
HP OpenVMS VAX
HP OpenVMS Itanium
HP OpenVMS Alpha

Symptoms

Given a table T containing 50 records, with an integer column I and a char(26) column A containing 'abcdefghijklmnopqrstuvwxyz', in a database L.RDB. The following tests of unload and load are performed:

  1. Unload the table  
    - unload without an RRD file (specially structured file)
    - unload with an RRD file (RMS file)
    $ rmu/unload l t l                            !specially structured file
    %RMU-I-DATRECUNL, 50 data records unloaded.
    $ rmu/unload/record=file=l.rrd l t lr         !RMS file
    %RMU-I-DATRECUNL, 50 data records unloaded.

    The RRD file produced is:
    DEFINE FIELD I DATATYPE IS SIGNED LONGWORD.
    DEFINE FIELD A DATATYPE IS TEXT SIZE IS 26.
    DEFINE RECORD T.
    I .
    A .
    END T RECORD.


  2. Load in various combinations. The first two loads are correct. The subsequent loads demonstrate the problems that occur when the formats do not match.

    • load without an RRD file using the unload file made without an RRD
      $ rmu/load l t l
      %RMU-I-DATRECREAD, 50 data records read from input file.
      %RMU-I-DATRECSTO, 50 data records stored.


    • load with an RRD file using the unload file made with an RRD
      $ rmu/load/record=file=l.rrd l t lr
      %RMU-I-DATRECREAD, 50 data records read from input file.
      %RMU-I-DATRECSTO, 50 data records stored.


    • load with an RRD file using the unload file made without an RRD
      $ rmu/load/record=file=l.rrd l t l
      %RMU-I-DATRECREAD,  3 data records read from input file.
      %RMU-I-DATRECSTO,   3 data records stored.
      $

      Erroneously specifying an .RRD file when loading records results in some data loaded, however the contents are incorrect:
      SQL> att 'f l';
      SQL> select * from t where a not starting with 'a';
                 I   A
                 0   .... Load/Unload utility..
          33557370   ...........abcdefghijklmno
        1835821930   nopqrstuvwxyz..........-..
      3 rows selected
      SQL>

      An OpenVMS dump of the unload file made without an RRD shows why:
      $ dump/rec l.unl
       
      Dump of file $1$DGA001:[RDB_UNL]L.UNL;1 on 11-SEP-2008 02:56:17.67
      File ID (65402,1486,0)   End of file block 5 / Allocated 69
       
      Record number 1 (00000001), 1024 (0400) bytes, RFA(0001,0000,0000)
       
       6E552F64 616F4C20 00140104 00000000 ........ Load/Un 000000
       00010003 7974696C 69747520 64616F6C load utility.... 000010
       20626452 20656C63 61724F00 13040404 .....Oracle Rdb  000020
        .
        .
       79787776 75747372 71706F6E 6D6C6B6A jklmnopqrstuvwxy 0003F0
       
      Record number 2 (00000002), 1024 (0400) bytes, RFA(0003,0000,0002)
       
       61000000 13001E00 08000000 02000B7A z..............a 000000
       71706F6E 6D6C6B6A 69686766 65646362 bcdefghijklmnopq 000010
       08000000 02000B7A 79787776 75747372 rstuvwxyz....... 000020
        .
        .
       69686766 65646362 61000000 2C001E00 ...,...abcdefghi 0003F0
       
      Record number 3 (00000003), 269 (010D) bytes, RFA(0005,0000,0004)
       
       79787776 75747372 71706F6E 6D6C6B6A jklmnopqrstuvwxy 000000
       61000000 2D001E00 08000000 02000B7A z..........-...a 000010
       71706F6E 6D6C6B6A 69686766 65646362 bcdefghijklmnopq 000020

      The RMU/LOAD/RECORD=FILE=LR.RRD command says that RMU/LOAD should load the first 4 bytes of each record in column I and the next 26 in column A. However, this file is the specially structured format of UNLOAD. The record size of the UNL file is 1024 bytes (except for the 3th record which is 269 bytes).

    • load without an RRD file using the unload file made with an RRD

      If you do not specify an .RRD file when it is required, the following error message is returned from Rdb 7.1 and higher:
      $ rmu/load l t lr
      %RMU-F-FILACCERR, error reading disk file $1$DGA113:[USER1]LR.UNL;1
      -RMS-E-EOF, end of file detected
      %RMU-I-DATRECSTO,   0 data records stored.
      %RMU-F-FTL_LOAD, Fatal error for LOAD operation at 11-SEP-2010 02:53:28.62

      In Rdb 7.0 the error message is:
      $ rmu/load l t lr
      %RMU-F-NOTUNLFIL, Input file was not created by RMU UNLOAD
      %RMU-I-DATRECSTO,   0 data records stored.
      %RMU-F-FTL_LOAD, Fatal error for LOAD operation at 11-SEP-2010 10:55:22.38

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms