Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 importing data from DB2 to SQL server

Author  Topic 

sameera207
Starting Member

4 Posts

Posted - 2007-04-19 : 02:31:16
Hi all,

this is my first post in this forum and i hope u guys will help me, i have the following requirement

i need to import data from DB2 database to SQL server 2000 database. (This is for reporting purposes and hence only importing is enough)

i need to clarify following points

1 - is this possible ? and if so is there any place i can refer
2 - if this is possible, can i write a SQL job for this process
3 - if this is possible, can i write a stored procedure

so if anyone have an idea, please let me know....any link, sample code etc...appreciated...

thankX in advance

cheers
sameera

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-19 : 02:48:23
1) Yes. You can add a linked server.
2) Yes. You can create a job to do the import with regular intervals.
3) Yes. You can write a stored procedure to handle the import according to your business rules.




Peter Larsson
Helsingborg, Sweden
Go to Top of Page

sameera207
Starting Member

4 Posts

Posted - 2007-04-19 : 02:54:12
Hi Peter

Thankx for the quick reply :)

is it possible for you to give me some instructions on how to do them. (resource links, samples..etc), coz it will be a greate help for me.

thank you again

cheers
sameera
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-19 : 03:17:58
Microsoft SQL Server Books Online have examples of every aspect of the solution.
Search for "Linked server", "Job" and "Stored procedure".

If you later have some specific question, please feel free to ask again.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

sameera207
Starting Member

4 Posts

Posted - 2007-04-19 : 04:01:34
Hi Peter,

thankx again for the replay, sorry for the inconvenience, actually what i want to do is,
i want to write a job or stored procedure to import data from a DB2 database. (DB2 --> SQL server 2000). I can create the same database structure in both DB2 and SQL Server.

Please help me on how to do this :)

(this is for my project and its a reporting tool in ASP.Net. My client has a DB2 database and he wants to view reports through SQL server..Not real time)

and i'm not familiar with DB2 (But i can catch up :))

I think i made it clear, and thankx for your replay. and looking forward your help

cheers
sameera
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-19 : 04:05:21
Ok.

1) Create the table in SQL Server.
2) Now read about LINKED SERVER in Books Online, how to connect to the database servers in order to be able to copy the data from DB2 into SQL Server.

When you are done with this, we can proceed to next step.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

sameera207
Starting Member

4 Posts

Posted - 2007-04-19 : 04:09:41
Hi Peter

wow you are fast :), thank you very much...I'll go through 'LINKED SERVER' and come back to you :),

thankx again

cheers
sameera
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-19 : 04:15:02
Check the below link for demo on how to create linked server to DB2 from SQL Server and access the contents:

[url]http://www.microsoft.com/sql/demos/extremelogic/linkdemo.wvx[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -