setdbparms.txt type
Use the setdbparms.txt
type to create configurations that
contain mqsisetdbparms commands to run when the integration server or integration runtime is deployed.
Summary of key details for the configuration type
File name or type | Contains secrets | Path extracted/imported to | Maximum allowed per integration server or integration runtime |
---|---|---|---|
TXT | Yes | Not applicable (mqsisetdbparms commands in the file are run) | Multiple |
Creating the file for a configuration object of type setdbparms.txt
The setdbparms.txt
type requires a TXT file that lists one or more
mqsisetdbparms commands to run. For more information, see mqsisetdbparms command.
To create a TXT file that lists one or more mqsisetdbparms commands, complete the following steps:
- Create a text file that is named setdbparms.txt or use another name with a .txt extension. (These instructions use setdbparms.txt as the file name.)
- Include one or more mqsisetdbparms commands in the file by using either of
the following formats:
- Add one or more lines to the file, where each line contains three space-separated values that
identify a resource, a username, and a password, which is specified in this form:
resource username password
For each line, these three values are used to run an mqsisetdbparms command with the -n, -u, and -p parameters.
For example, if you add an
mq::user1 app1 t0pSecret
line to your setdbparms.txt file, the following command is run:mqsisetdbparms -n mq::user1 -u app1 -p t0pSecret
Similarly, an
odbc::datasourceName userID password
line, which specifies credentials for authenticating to an ODBC data source, results in the following command:mqsisetdbparms -n odbc::datasourceName -u userID -p password
- Specify the entire mqsisetdbparms command in the file. The entry must start
with mqsisetdbparms followed by the parameter flags and values, and the
command is run as specified. When you specify the parameter flags, use the short format (for example,
-w
). The long format (for example,--work-directory
or--work-dir
) might not produce the expected result.For example, to set credentials for authenticating to an ODBC data source that is accessed from a message flow, you can add the following line to the file, where:- workDir is the work directory of the integration server or integration runtime. This parameter is optional. If you don't specify
the
-w
parameter, the correct work directory is used automatically. If you do specify the-w
parameter, you must set it to /home/aceuser/ace-server. - datasourceName is the name of the stanza in the odbc.ini file that stores fixed data source properties for connecting to the database.
- userID and password are authentication credentials.
mqsisetdbparms -w workDir -n datasourceName -u userID -p password
Example:mqsisetdbparms -w /home/aceuser/ace-server -n USERDB -u janedoe -p t0psecret
- workDir is the work directory of the integration server or integration runtime. This parameter is optional. If you don't specify
the
Note: For both formats, when the command is executed, all arguments are enclosed within single quotation marks, and any single quotation marks within the values are escaped. Therefore, do not include quotation marks on the parameters within the file. - Add one or more lines to the file, where each line contains three space-separated values that
identify a resource, a username, and a password, which is specified in this form:
- Save and close the file.
After you create the file, you can use it to create a configuration object as described in Configuration reference: Creating an instance from the Red Hat OpenShift web console and Creating an instance from the Red Hat OpenShift CLI or Kubernetes CLI.
For examples of how to use the setdbparms.txt
configuration type, see Tutorials and examples.