How to generate a version 4 (random) UUID on Oracle?
This blog explains, that the output of sys_guid() is not random for every system: http://feuerthoughts.blogspot.de/2006/02/watch-out-for-sequential-oracle-guids.html Unfortunately I have to use such a system. How to ensure to get a random UUID? Is it possible with sys_guid() ? If not how to reliably get a random UUID on Oracle? Here's a complete example, based on @Pablo Santa Cruz's answer and the code you posted. I'm not sure why you got an error message. It's probably an issue with SQL Developer. Everything works fine when you run it in SQL*Plus, and add a function: create or replace and