In order to run the sample, create two databases, either in one database node or two database nodes. In the production mode, these database nodes are usually deployed in different machines. However, for this example, you can create two databases in one database node. These two databases have same table schemas, security configuration, etc.
DB2 UDB is used as a sample.
The following example is for DB2 UDB only. DB2 for z/OS details
are not shown.
Create two DB2 databases. For example, two databases with the names westtest and easttest. You need a user ID and password to connect to them. In this example, dbuser1 and xxxxxx are used as the user name and password. Note that the user ID and password to connect to these two databases are the same.
>db2 create database westtest >db2 create database easttest >db2 connect to westtest user dbuser1 using xxxxxx >db2 -tvf Table.ddl >db2 connect to easttest user dbuser1 using xxxxxx >db2 -tvf Table.ddl