Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting DB2 timestamp to SQLServer Datetime

1 view
Skip to first unread message

GregC

unread,
Nov 14, 2004, 8:30:25 PM11/14/04
to
I am trying to convert a DB2 database to SQLServer and am
having trouble getting the DB2 Timestamp columns going out
as DateTime for SqlServer.

What I have tried is:
1. reverse engineer the DB2 database
2. Convert to a CDM
3. Create a copy DBMS of the SQLServer2000
4. Change the PhysDataType mapping for Internal TS to be
PhysicalModel datetime
5. Generate a PDM using the new DBMS

All the CDM TS fields still come out as TimeStamp....?

What am I missing - I am sure that many have use PD to do
this sort of migration before?

Using PD ver 10.1

Mike Nicewarner

unread,
Nov 15, 2004, 12:03:13 PM11/15/04
to
I don't know what you did wrong, but I had no trouble, and I did it a
simpler way.
Here's what I did:
First, make a copy of the SQL Server 2000 XDB file.
Change the copy so that Script\DataType\AmcdDataType, TS maps to
"datetime", just like you did.
Open your DB2 PDM.
Click on Tools -> Generate Physical Model.
Select your new definition file.
The generated model should just have "datetimes" instead of timestamps.

Also, note that I have 10.1.0.1169 EBF7. Always make sure you have the
latest maintenance.

--
Mike Nicewarner [TeamSybase]
http://www.datamodel.org
mike@nospam!datamodel.org (can you figure what to remove?)
Sybase product enhancement requests:
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement

gregc

unread,
Nov 15, 2004, 5:12:27 PM11/15/04
to
Hi Mike
THanks for that - I was almost there, except that I changed
the PhysDataType instead of the AmcdDataType (no, I don't
know why I changed it either!). Changed the Phys ones back
and changed the Amcd ones and its working now.

Now I need to translate the BLOB & CLOB data types.....

Once again Thanks for your help
GregC

0 new messages