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 |
About the setdbparms.txt file
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.
For examples of how to use the setdbparms.txt
configuration
type, see Tutorials and examples.
Creating a configuration for the setdbparms.txt type by using the configuration panel
You can create an setdbparms.txt
-type configuration while creating an integration server or integration runtime, or independently, as follows:
- Open the Configuration page by clicking the Configuration icon in the navigation pane, or go to the Configuration view of an integration server or integration runtime that you are creating. Then, click Create configuration. For more information, see Managing configuration objects from the Configuration page.
- From the
Create configuration
panel, select setdbparms.txt from the Type list. - In the Name field, specify a name for this configuration.
- In the Description field, specify text that will help you identify the
integration server or integration runtime that will use this
setdbparms.txt file, or the purpose of the commands that will be executed.
- Complete the setdbparms.txt section by completing either of the following steps:
- Copy the contents of your setdbparms.txt file, which contains the commands
to run, and then paste it into the setdbparms.txt text editor.
- Import your setdbparms.txt file, which contains the commands to run, from
your file system:
- Click the Import setdbparms file icon .
- Click within the boxed area to select the file from a file browser, or drag-and-drop the file.
The name of the imported file is displayed.
- If you want to view the file contents, click View file contents to return
to the text editor.
Tip: For security reasons, thesetdbparms.txt
content that you add is available only asREDACTED
content after you create the configuration. If you need to update this content later, ensure that you retain a copy of the original file that you used to create this configuration, so you can update it as required. The update will replace the original content with the edited content. - Copy the contents of your setdbparms.txt file, which contains the commands
to run, and then paste it into the setdbparms.txt text editor.
- Click Create. The configuration is added to the configurations table and can be selected for use with an integration server or integration runtime.
Updating or deleting a configuration
If you need to update the content or settings in a configuration, or delete a configuration that's no longer needed, see Managing configuration objects from the Configuration page.