Finally, 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 UDB server:
db2 get instance
This command should return the following output:
The current database manager instance is: VALIDATE
If you did not receive this output, enter the following commands:
set DB2INSTANCE=VALIDATE db2 get instance
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:
unc_name\access_token;controlled_filename
where:
For our example, the access token that you receive will be similar to the following:
\cdrive\pictures\HVJ5NXGC0WQ.I5KKB6;psmith.bmp
This key 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. |