DB2 Data Links Manager Quick Beginnings

2. Creating a test environment on the DB2 Data Links server

After creating a test environment on the DB2 UDB server, we must create a test environment on the DB2 Data Links server.

There are three sub-tasks involved in creating the test environment on the Data Links server:

Registering the drive with the Data Links File Filter

A Data Links Filesystem Filter (DLFF) was created by the setup program on the NTFS formatted drives that you selected during the installation.

To register a drive with the DLFF:

  1. Log on to the system as the DB2 Data Links Manager Administrator.
  2. Ensure that the Data Links File Manager started successfully as follows:
    1. Click Start and select Settings --> Control Panel.
    2. Double-click Services. The Services window opens.
    3. Ensure that status for the DB2 Data Links File Manager service is set to Started.
  3. Ensure that the drive you reserved for the Data Links server is under the control of a Data Links Filesystem Filter (DLFF) by entering the dlff list command. This command will list all the drives that are under the control of a DLFF.

    For our example, this command should return the following output:

       LogicalDrives = C:
    
  4. Register the share name of a drive that is under the control of a Data Links Filesystem Filter by entering the following command:
       dlff add c:
       dlfm add_prefix \sharename
     
    

    where sharename is the shared name of the drive that is under the control of a DLFF, and c: is the drive that is under the control of the DLFF.

    For our example, register the Data Links server to use the Data Links Filesystem Filter on the cdrive (which is the share name of the c:\ drive) by entering the following command:

       dlfm add_prefix \cdrive
    
  5. Log out.

Registering the DB2 UDB database

To register a new database with the Data Links File Manager:

  1. Log on to the system as the DB2 Data Links Manager Administrator.
  2. Register the remote DB2 UDB database where the DATALINK data type was defined by entering the following command:
        dlfm add_db database instance hostname
    

    where:

    In our example, we will register a database called STAFF, which resides in the VALIDATE instance on a DB2 UDB server with a fully qualified hostname of db2server.services.com, by entering the following command:

        dlfm add_db staff validate db2server.services.com
    

    You should not specify the DLFM_DB when you run this command. The DLFM_DB is a local database that is used to keep track of files that are under the control of the Data Links File Manager.

  3. Log out.

Creating a sample file

To create a sample file:

  1. Log on to the system as any user that is neither a DB2 Data Links Manager Administrator nor the DLFM1 user account created during installation for use by the Data Links File Manager. Note that the DLFM1 user is different from the DB2 Data Links Manager Administrator user account.
  2. Create a directory on the drive that is under the control of a Data Links Filesystem Filter, to store files to be controlled by a DB2 server, by entering the following command:
       md x:\directory_name
    

    where:

    The DLFM1 user account should never be the owner of any files or directories which are in a shared directory under the control of a Data Links Filesystem Filter.In our example, we will create a directory called pictures on the c: drive by entering the following commands:

       c:
       cd \
       md pictures
    

    The directory you create must have the Access Type set to Full Control. This is the default for any new directory that you create in Windows NT.

    If the directory that you have created does not grant all members of the EVERYONE group Full Control, enter the following command:

       cacls c:\pictures /p everyone:f
    
  3. Create a sample file called psmith.bmp in the c:\pictures directory, to be managed by the Data Links File Manager, by entering the following command:
       echo "This is a picture of Paul Smith" > c:\pictures\psmith.bmp
    
  4. Log out.

The sample file psmith.bmp is a text file, not a bitmap as the .bmp extension implies. For the purpose of verifying your installation, this file represents an employee's picture that was inserted into a table that was defined with the DATALINKS data type.


[ Top of Page | Previous Page | Next Page ]