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.
. 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.
db2 connect to staff
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. |
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.