Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Move part of data from db2 tables to sqlserver tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
akumar

New User


Joined: 12 Jan 2007
Posts: 8
Location: bangalore

PostPosted: Thu Sep 20, 2007 4:34 pm    Post subject: Move part of data from db2 tables to sqlserver tables
Reply with quote

Hi all,
In our project we have a requirement where we need to move part of data from db2 tables to sqlserver tables.we are using DSNUPROC and DSNTIAUL utility to unload data from db2 and using sql server export,import wizard to load data into the sql server 2005.
now the db2 has its native datatype like time stamp,etc which where not in sql server and also using DSNUPROC utility integer column is converted to Character(iam using external keyword or else data will be in compressed format which is not readable,and is not understandable by sql server ) .
now the issue is this character data i am loading as integer in sql server because of that record length is mismatching. and data loading is failing in sql server.any pointers regarding this will be highly helpful.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Sep 21, 2007 12:49 am    Post subject:
Reply with quote

Hello,

Please provide some detail information.

Show the data before the ftp/other download to the win-based system.

Show the unload control statements from db2.

You may need to insert a step between the unload and the data trqnsfer. You might also consider writing code to create the download file and then you can ensure all of the data is in windows-friendly formats.

From experience, if you create a simple text file with delimiters, the import into sqlserver becomes trivial.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Fri Sep 21, 2007 5:12 am    Post subject:
Reply with quote

Just a different though, could you have a program (java?) that reads that data directly from DB2 on a Windows machine and writes it straight into SQL Server?

Not the ideal solution if you are moving lots of data often because you are doing row by row inserts after the reads, but since you would be manipulating the data in your code anyway to make it SQL server friendly, just throw the insert in also.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Paasing symbolic parameter to instrea... Anirudh Anand JCL & VSAM 1 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 11 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us