Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Connecting to a remote database using SQL

How can I make a connection to a remote database using SQL 400 specifying the database name and the machine where it is?
You can use the SQL CONNECT statement to access any remote database that supports the Open Group DRDA standard.

You need to use the ADDRDBDIRE CL to add an entry and the TCP/IP address of the Remote Database server and assign it a name that will be used on the SQL Connect statement.

The application code would look something like the following: CONNECT TO remotedb1 user using 'passwd'

SELECT col1, col2 FROM remotetablename ORDER BY col1

You can look at the Distributed Database Programming guide in the iSeries InfoCenter for more details on remote database access.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Check out this Search400.com Featured Topic: Database issues resolved

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: Tips, tutorials and more.

This was last published in July 2004

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...

Close