mayankshah:

I've never had any luck in accessing two databases such that I could transfer any data between them without getting the data locally and then retransmitting it. However, some databases (e.g. MS SQL Server) have the ability to link to a different server such that you can transfer data between the databases using a simple select. You might investigate that possibility.

In fact, I'm working on a project right now that connects to over 20 different databases to generate some summary reports via statements like:

INSERT Summary ( <fieldlist> ) SELECT <expressions> FROM <Server>.<Database>.<schema>.<table> ALIAS1 JOIN <Server2>.<Database2>.<schema2>.<table2> ALIAS2 ON ALIAS1.CommonKey = ALIAS2.CommonKey WHERE <expression>

If you can swing it, this is the way you'd want to go as it will save network traffic (the data goes straight from one server to the other without having to visit the computer running your program), simplify your coding (half as many SQL statements to run, other databases are easier to access by just adding an additional qualifier to their name).

If you're in a large shop, this can help you document data flows between systems, as the linked server definitions can be accessed by the DBAs.

...roboticus

In reply to Re: Concurrent access to db2 and sybase databases by roboticus
in thread Concurrent access to db2 and sybase databases by mayankshah

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.