Use wsadmin to configure a new data source

To configure a data source with wsadmin, follow these steps:

  1. On the CL command line, run the STRQSH (Start Qshell) command.

  2. Run the cd command to change to the directory that contains the wsadmin tool:

    cd /QIBM/ProdData/WebASE/ASE5/bin
  3. Start wsadmin.

  4. At the wsadmin prompt, run this command to identify the parent ID:

    set newjdbc [$AdminConfig getid /Cell:myCell/Node:myNode/
    Server:myAppSvr/JDBCProvider:JDBC1/]

    where myCell is the name of the cell that contains your application server, myNode is the name of the node that contains your application server, myAppSvr is the name of your application server, and JDBC1 is the name of your JDBC provider.

    Note: This command has been wrapped for display purposes.

  5. Run this command to display the required attributes for a data source:

    $AdminConfig required DataSource

    The command displays this output:

    Attribute         Type
    name              String
  6. Run these commands to set the required attributes:

    set name [list name DS1]
    set dsAttrs [list $name]

    where DS1 is the name of the data source that you want to create.

  7. Run this command to create a data source:

    set newds [$AdminConfig create DataSource $newjdbc $dsAttrs]
  8. Run this command to save your changes:

    $AdminConfig save