The problem is very easy and I just need confirmation of my thoughts.
A little while ago I asked a question for a similar datatype in DB2 for the SQLServer UniqueIdentifier type ( http://www.experts-exchange.com/Databases/IBM_UDB/Q_21752797.html
). The conclusion was that it's not possible to do a 1 - 1 conversion.
Today when I was browsing around too see if we could do some stuff automaticly to make up some time we will be loosing when changing from uniqueidentifiers to a db2 unique type and I came accross the IBM DB2 Migration Toolkit which allows you to migrate from MSSQL to DB2 quite easily.
So I gave it a try with one of our .sql scripts, but the result was not as I expected. The example is fictional though:
CREATE TABLE [Users]
[ID] uniqueidentifier PRIMARY KEY ROWGUIDCOL DEFAULT (newid()) NOT NULL,
[FirstName] nvarchar(256) NULL,
[LastName] nvarchar(256) NULL,
[Age] int NULL
CREATE TABLE Users(
ID CHAR(16) FOR BIT DATA NOT NULL PRIMARY KEY,
CREATE TRIGGER "[Users1" NO CASCADE BEFORE INSERT ON Users
REFERENCING NEW AS NEW FOR EACH ROW MODE DB2SQL
IF NEW.ID IS NULL THEN
SET NEW.ID = MSSQL.NEWID();
This basicly suggests that in DB2 there is a function/trigger (whatever) called MSSQL.NEWID() which can generate uniqueidentifiers.
I highly doubt DB2 will ever have a function/method/trigger called after a competetitor's database. But I assume that this is not correct and that the Migration kit thinks they are 'homemade' functions/triggers which were not added in the .sql file, so the migration kit thinks it's a homemad/available function/trigger in DB2?
Am I correct in these thoughts?