Home > Ask the AS/400 Experts > Questions & Answers > Connecting to a remote database using SQL
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Connecting to a remote database using SQL

Kent Milligan EXPERT RESPONSE FROM: Kent Milligan

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site
>
QUESTION POSED ON: 06 July 2004
How can I make a connection to a remote database using SQL 400 specifying the database name and the machine where it is?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


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.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts