Use GUID. But this is not usable to different OS.
Uh? Our products (which use GUID's for all records) run under Windows, Linux and FreeBSD. No problems at all, and it 10 years, not a single conflict.
We also have code that imports data into the database, and generates about 80,000 to 100,000 records all at once - again this has never produced a single conflict for us.