Oracle GUID Converter
Important lesson for those who prefer using GUIDs as record identifiers.
The MS SQL data type, uniqueidentifier, does not have a counterpart in Oracle. In the past it was easy to make the column CHAR(36), the max string length of a GUID. I was not in a situation to do this as we were dealing with the Entity Framework against Oracle.
Entity Framework is compatible with SQL Server out of the box and translates the uniqueidentifier column to GUID type. This is not the case for Oracle. The use of a third party adapter, dotConnect for Oracle, is required. This provider requires that the storage data type for GUID be RAW(16).
What’s the problem with RAW(16)?
GUID representation
{922B0A87-7A88-DE11-BBA7-0AEA0522E79F}
RAW(16) representation
870A2B92887A11DEBBA70AEA0522E79F
As if it was not tough enough already to read and write a GUID. Now it is represented differently in Oracle!!??
The best solution that I discovered to get around this was through the use of a handy GUID Converter. I don’t know how many times I have relied on this to help me out.