Menu

RAW datatype as primary key in oracle

Help
Neo
2019-07-24
2019-07-31
  • Neo

    Neo - 2019-07-24

    We currently have the following setup
    Server (Oracle) --> Client (MySQL)

    Table in oracle has primary key as ID with datatype as RAW(16) which stores a SYS_GUID value.

    1.Original GUID(hex string )
    

    8E622F2367CE7723E0530BF11C0A143B

    2.SymmetricDS representation in the batch record for ID column.
    

    jmIvI2fOdyPgUwvxHAoUOw==

    The above representation in SymmetricDS makes it difficult to identify exactly which record is being processed.

    1. How is   the orginal hex string (8E622F2367CE7723E0530BF11C0A143B) converted to (jmIvI2fOdyPgUwvxHAoUOw==) in SymmetricDS
    
    2. What can be done to make it easier to identify the exact row . Can an extra temp/virtual column be added to the record to store hex representation of binary data without adding column to underlying table. How to go about configuring such a column to show up in the batch record.
    
    Thank you
    
     
  • Mark Michalek

    Mark Michalek - 2019-07-31

    Neo, the data is in base64 in the batch file which is also a standard textual representation of binary data. You could select your RAW data as base 64 in order to compare. Symmetric installs a function called sym_blob2clob(column) that you could try.

    Otherwise, check https://stackoverflow.com/questions/3804279/base64-encoding-and-decoding-in-oracle.

     

Log in to post a comment.