Testing the user mapping plug-in (C programming language)

Use the test program to load and test the sample user mapping plug-in or your own custom user mapping plug-in before you deploy it to the federated server.

About this task

The setup program fsumsetup_file (fsumsetup_file.exe on Microsoft Windows) and the test program fsumlookup (fsumlookup.exe on Windows) are installed in the same directory where the sample plug-in files are installed.

The fsumsetup_file program generates a configuration file named fsumplugin_file.cfg. This file stores the full path to the text file that contains the user mapping entries. The fsumlookup program (fsumlookup.exe on Microsoft Windows) tests the plug-in.

Procedure

  1. Run the fsumsetup_file program to set up the full path and file name of the file that stores the user mappings.
  2. Run the fsumlookup program to test the plug-in:
    fsumlookup pluginName fsInstance fsDatabase fsRemoteServer fsAuthid
    where:
    • pluginName is the name of the plug-in.
    • fsInstance is the name of the federated server instance.
    • fsDatabase is the name of the federated database.
    • fsRemoteServer is the name of the remote data source server, as specified in the CREATE SERVER statement.
    • fsAuthid is the local user ID.
    If the plug-in is functioning properly, the fsumlookup program prints the parameters that identify the user mapping entry, as well as the option names and option values, to the screen. The following is an example of the output.
    fsumlookup fsumplugin_file.a FSinst1 FSdb remoteDB localID
    fsInstanceName: FSinst1
    fsDatabaseName: FSdb
    fsServerName: remoteDB
    fsAuthID: localID 
    optionName:REMOTE_PASSWORD 
    optionValue:p4ssw0rd 
    optionName:REMOTE_AUTHID 
    optionValue:remoteID

    If an error occurs, the test program prints the error message to the screen.