Specifies whether to attach to the server instance. You can specify this keyword in the connection string or set it in the db2cli.ini or db2dsdriver.cfg file.
When you set the keyword to TRUE, the SQLDriverConnect() function does not connect to a database but instead connects to the specified server instance.
To establish a connection with a DB2 server instance for Linux, UNIX, and Windows remote server, the CLI application must specify values for the Hostname, Port, UID, PWD, and Protocol along with setting the keyword to TRUE.
Any value other than TRUE that you assign to the ATTACH keyword is treated as FALSE.
ATTACH=TRUE
<configuration>
<dsncollection>
<dsn
alias="db2dsn01",name="db2db01",host="server1.mynet.com",
port="50001">
<parameter name="ATTACH" value="TRUE"/>
</dsn>
</dsncollection>
<databases>
<database name="sample", host="serv1.mynet.com",
port="50001">
<parameter name="ATTACH" value="TRUE"/>
</database>
</databases>
</configuration>