DB2 Data Links Manager Quick Beginnings

5. Verifying the sample file is accessible

Next, we will verify that the psmith.bmp sample file can be accessed while it is under the control of the Data Links File Manager. To do this, we will first need to generate an access token on the DB2 Universal Database server.

In DCE-DFS environments, you should perform these steps from a machine where the DFS Client Enabler is installed.

  1. Log on to the system with a valid DB2 user ID that has System Administrative (SYSADM) authority on the VALIDATE instance that you created. By default, any user that belongs to the primary group of the instance owner has SYSADM authority on an instance. For more information, refer to your server's Quick Beginnings manual.
  2. Run the db2profile or db2cshrc script as follows:
       . INSTHOME/sqllib/db2profile    (for bash, Bourne or Korn shell)
       source INSTHOME/sqllib/db2cshrc (for C shell)
    

    where INSTHOME is the home directory of the instance owner.

  3. Start the VALIDATE instance by entering the db2start command.
  4. Connect to the STAFF database by entering the following command:
       db2 connect to staff 
    
  5. Select the controlled file for update by issuing an SQL SELECT statement. For more information, refer to the SQL Reference.

    For our example, enter the following command:

       db2 "select dlurlpath(picture) from employee where lname = 'Smith'"
    
    This command will return the full pathname with an access token of the form:
      controlled_filepath/access_token;controlled_filename
    

    where:

    For our example, the access token that you receive will be similar to the following:

      /test/pictures/HVJ5NXGC0WQ.I5KKB6;psmith.bmp
    

    This access token will be used to read this file on the Data Links server.
    Note:This access token is only valid for 60 seconds. This means that once you enter this command, you will only have 60 seconds to complete the remaining steps in this section (or edit any Data Links controlled file). You can change the default expiration time by changing the DL_EXPINT database configuration parameter.

    To change the default expiration time for an access token to 10 minutes (the value is entered in seconds), enter the following commands:

       db2 update db cfg for staff using dl_expint 600
       db2 terminate
       db2 connect to database staff
    

    If you change a setting for any database configuration parameter, you must always reconnect to the database for the changes to take effect. For more information on database configuration file parameters, refer to the Administration Guide.

  6. Log out.

If you did not receive an error, you have access to this file and you have installed and configured DB2 Data Links Manager correctly. For information on commands that are used in the day-to-day operations of a DB2 Data Links Manager environment, go to Working with the Data Links File Manager.

If you received a error, go to Troubleshooting the configuration on AIX.

For more information on the SQL commands used to verify the installation, refer to the SQL Reference.


[ Top of Page | Previous Page | Next Page ]