Add Site or Add Page to Favorites
>

 FTP Access to DB2 

Preview DRM-free music
Play clips of the most popular DRM-Free music in MP3 format
Legal Music .com

Get information on your favorite TV Shows at TV Series .com

Clarify the meaning of the acronyms on your web site.

Acronym Dictionary

Acronym Finder

Social Networking Web Sites

Register your own domain name at A to Z Domains.

or buy domains at Domain Names For Sale .net


Printer-friendly PDF* format:

How To Guides for IBM DB2 UDB Databases

This Section

"How To" Guides for IBM DB2 UDB Databases

Extracting data from DB2 using FTP

Data can be extracted remotely from DB2 and easily loaded into spreadsheets or other applications.

  1. Create a file containing the SQL to be used for extracting the data.
  2. Use FTP to connect to the system where DB2 is running and upload the SQL file.
                                  site filetype=seq
                                  
    put myquery.sql
  3. Extract the data to a different file name.
                                  site filetype=sql
                                  
    site db2=db2x
    site spread
    get myquery.sql myquery.dat
    db2x is the DB2 system that the data is to be extracted from. With site spread, the downloaded file will be in tab-delimited format, which makes it easier to load into most applications, such as Microsoft Excel. site nospread can be used for applications that do not support tab-delimited files.

Note that some FTP clients do not support the site command, but may allow the command to be executed by preceding it with quote.

                        quote site ...
                        

If the system that the data is to be downloaded to has an FTP server running, the data can be sent from an FTP client running on the host system. This allows the data to be sent automatically by scheduling the transfer as a batch job. In this case, the locsite command is used to set parameters on the local system where the FTP client is running.

                        locsite filetype=sql
                        
locsite db2=db2x
locsite spread
put myquery.sql myquery.dat

Last updated Friday November 16, 2006

You are currently viewing this page in HTML 4* format (* see Clicklets for more infomation). This document is also available in XHTML 1 Style Sheet*XHTML 1* XML*HTML 5 Style Sheet*HTML 5 XML*HTML 5 non-XML* XHTML 2* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.


Copyright © 2006 How To Guides .com. Alteration of content, including addition of any function such as hypertext links or pop-up advertising, or interference with the hypertext links or other functions of this site is expressly prohibited.

DISCLAIMER: All information, links, forms, applications and other items on this site or obtained from it are provided AS IS, WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.