CONNECT CLPPlus command
The CONNECT CLPPlus command changes the user ID connected to a database, connects to a different database, or does both. The command also displays the result of the change.
Invocation
This command must be run from the CLPPlus interface.
Authorization
None
Required connection
None
Command syntax
Command parameters
Do not include spaces between any of the parameters.
- accesstoken
- Specifies the accesstoken that is obtained from the IAM (Identity Access Management) service to connect to the database.
- apikey
- Specifies the apikey that is obtained from the IAM (Identity Access Management) service to connect to the database.
- user
- Specifies the user ID to connect to the database.
For Identity Access Management based Authentication, dsn_alias userid can also be in email id format, such as ibmid : abc@xy.ibm.com. In the case of apikey and accesstoken, The userID is not specified with dsn_alias.
- password
- Specifies the password that corresponds to the user ID.
- hostname
- Specifies the name of the computer on which the database is located. For example, for a computer that is named ascender, specify @ascender.
- variable
- Specifies the name of a variable, which contains CLPPlus related information. This variable can
define connection string type information and must be defined in a file that is called
login.sql, which is read by the CLPPlus interface during start-up. login.sql is
read from following locations:
- Loc-1: login.sql is configurable using environment variable CLPPLUS_USER_STARTUP_SCRIPT. For example, define in an environment variable as <CLPPLUS_USER_STARTUP_SCRIPT=C:\conf\login.sql>
- Loc-2: Configure login.sql in the home directory of a client machine to launch directory.
- Loc-3: Configure login.sql in the current directory. Clpplus is launched from the current directory.
If login.sql is configured using all three locations in the client machine then Loc-1 is of highest precedence to apply in clpplus. Order of precedence from highest to lowest for applying in clpplus is Loc-1>Loc-2>Loc-3.
- port
- Specifies the port number that receives connections on the computer where the database server is installed. The default is 50000.
- database
- Specifies the database name to which the connection is made. The default is SAMPLE.
- /
- Specifies the current operating system login user ID is used to connect to the database.
- dsn_alias
- Specifies the database connection information is read from the IBM® data server driver configuration file with alias name dsn_alias. If
dsn_alias is not found in the IBM data
server driver configuration file, the string dsn_alias is used as a database name
and all other connection parameters are obtained interactively. If you
configure an LDAP directory server in the specified IBM data
server driver configuration file, the following steps apply:
- The database connection information is read from the DSN entry with alias name dsn_alias in the IBM data server driver configuration file.
- If dsn_alias is not found in the IBM data server driver configuration file, the configured LDAP Directory server is searched for an entry with the name dsn_alias.
- If dsn_alias is not found on the LDAP Directory server, dsn_alias is used as a database name and all other connection parameters are obtained interactively.
Note: CLPPlus supports connection attempts to databases with DSN aliases and the authentication mechanism that is defined in the IBM data server driver configuration. If you do not define an authentication mechanism in the IBM data server driver configuration file, a default authentication mechanism is used by CLPPlus. The default authentication mechanism is equivalent to that of JCC. - clientApplompat
- For connections to Db2 for z/OS 12.0 with data servers at a function level of V12R1M501 or later, set the capabilities of a particular instance of the IBM Data Server Driver for JDBC and SQLJ to a function level that is less than or equal to the function level of the data server. This is optional when using ().
- currentPackageSet
- The currentPackageSet identifies the collection ID to search for necessary packages when executing test cases using clpplus. This is optional when using ().
