adspace
Hi
my program is accesing data from two db2 databases.what
is the bind card for this program to genarate plan? how to
specify the two owners and two qualifiers in bind card
Answer Posted / Purushottam
In DB2, a bind card specifies the SQL statements and their associated parameters for compiling an executable module. To generate a plan for accessing data from two databases, you would need separate bind cards for each database connection. The bind card includes information such as the library (owner), qualifier (schema), and database name for the specific database being accessed. Here's an example of a bind card:nn```clnBIND DB2HYPERTEXT EXEC SQL BEGIN DECLARE SECTION ;n db1_user CHAR(30) VALUE 'username';n db1_password CHAR(30) VALUE 'password';n db1_host CHAR(30) VALUE 'host';n db1_port INTEGER VALUE 50000;n db2_user CHAR(30) VALUE 'username';n db2_password CHAR(30) VALUE 'password';n db2_host CHAR(30) VALUE 'host';n db2_port INTEGER VALUE 50001;nBIND DB2HYPERTEXT EXEC SQL END DECLARE SECTION ;```nIn the example above, `db1_user`, `db1_password`, and other variables are used to specify the credentials and connection details for the first database. Similarly, you would define separate variables and values for the second database.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers