DB2 Data Links Manager Quick Beginnings

3. Registering the Data Links server with the DB2 UDB database

To register the Data Links server with the remote DB2 UDB database where the DATALINK data type was defined earlier:

  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 Local Administrators group has SYSADM authority on an instance. For more information, refer to your server's Quick Beginnings manual.
  2. Ensure that the VALIDATE instance is the current instance by entering the following command:
       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
    
  3. Start the VALIDATE instance by entering the db2start command.
  4. Register a Data Links server that will control the files that are linked by a DATALINK data type by entering the following command:
       db2 "add datalinks manager for database database_alias using node hostname port port_number"
    

    where:

    For our example, enter the following command:

       db2 "add datalinks manager for database staff using node dlmserver.services.com port 50100"
    
  5. Connect to the STAFF database by entering the following command:
       db2 connect to staff 
    
  6. Insert an entry into the EMPLOYEE table that you created by entering the following command:
       db2 "insert into employee values (001,'Paul','Smith',==>
          dlvalue('unc:\\unc_name\controlled_file'))"   
    

    where:

    For our example, enter the following command

       db2 "insert into employee values (001,'Paul','Smith',==>
          dlvalue('unc:\\dlmserver.services.com\cdrive\pictures\psmith.bmp'))"
    
  7. Log out.


[ Top of Page | Previous Page | Next Page ]