IBM Support

Adding and updating connection profiles from the command line

Question & Answer


Question

How can I add a new connection profile from the command line? How can I update an existing connection profile from the command line?

Answer

IBM Data Server Manager provides a command line utility named upddbprofile which allows you to add a new connection profile and update an existing connection profile. The upddbprofile script is located in the <DSM installation directory>/dsutil/bin directory (for example c:\ibm-datasrvrmgr\dsutil\bin>upddbprofile).

Invoking upddbprofile

To display the upddbprofile purpose and usage instructions, invoke the upddbprofile script with no parameters, as shown below:
c:\ibm-datasrvrmgr\dsutil\bin>upddbprofile.bat

Purpose: Add a new connection profile or modify existing connection profile properties.

Usage: upddbprofile

-dbProfile <unique connection profile name>; required
          -dataServerType <data server type; DB2LUW | DB2Z>
          -host <host machine of the database server>
          -port <port number of the database server>
          -databaseName <database name>; used when connection profile -dataServerType=DB2LUW
          -location <location name>; used when connection profile -dataServerType=DB2Z
          -user <user id>
          -password <password>
          -xtraProps <JDBC URL properties>
Note: Use double quotes around any value that contains spaces (for example, "hello world").

Adding a new connection profile

To add a new connection profile, you must specify the -dbProfile, -dataServerType, -host, -port, -databaseName or -location, -user, and -password parameters. For example, to add a new connection profile named TEST that will use a local DB2 for Linux, UNIX, and Windows database named SAMPLE, specify the following parameters:

upddbprofile -dbProfile TEST -host localhost -port 50000 -databaseName SAMPLE -user db2admin -password db2admin -dataServerType DB2LUW

Updating an existing connection profile

To update an existing connection profile, you must specify the -dbProfile parameter and then any of the other parameters that you wish to change. For example, to update an existing connection profile named TEST to use host=emme.svl.ibm.com and password=hello world, specify the following parameters:

upddbprofile -dbProfile TEST -host emme.svl.ibm.com -password "hello world"

[{"Product":{"code":"SS5Q8A","label":"IBM Data Server Manager"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"},{"code":"PF002","label":"AIX"}],"Version":"1.1.1;1.1","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21963035