The DATABASE object contains metadata about a source database or target database, file system, or file.
Table 55 provides information about the properties of the DATABASE
object.
Table 55. Properties of the DATABASE object
Tag language property name | Description | Allowed values |
---|---|---|
NAME | The business name of the source. | A text string, up to 80 bytes in length. |
DBNAME | The physical database name as defined to the database manager.
This value is null for generic ODBC databases, Sybase databases, IMS databases, generic ODBC databases, and file systems. | A text string, up to 40 bytes in length. |
SHRTDESC | The short description of the source. | A text string, up to 200 bytes in length. |
LONGDESC | The long description of the source. | A text string, up to 32700 bytes in length. |
DBTYPE | The database or file family. | One of the following values:
|
DBETYPE | The type of database or file within a family. | One of the following values:
|
DBETYPE (continued) | The type of database or file within a family. | One of the following values:
|
ISWH | A flag that indicates whether this source is a warehouse target or warehouse source. | One of the following values:
|
USERID | The user ID that the Data Warehouse Center uses to connect to the source. | A text string, up to 36 bytes in length. |
CONTACT | The name of the person who is responsible for the source. | A text string, up to 64 bytes in length. |
USEODBC | A flag that specifies whether to use the user-supplied connect string or to generate the string. Use N for files. | One of the following values:
|
ODBCSTR | The user-defined ODBC connect string to use if USEODBC is set to Y. Otherwise, this property is null. | A text string, up to 254 bytes in length. |
PREACCMD | If the source is a local Flat File LAN source, a command to run to access the remote file. | A text string, up to 64 bytes in length. |
POSTACMD | If the source is a local Flat File LAN source, a command to run after accessing the remote file. | A text string, up to 64 bytes in length. |
RETRYCNT | The number of times to try to extract data from this source in case of an error. | A numeric value. |
RETRYINT | The time that is to elapse between attempts to extract data. | A numeric value. |
VERSION | The version of DB2 in use. | A text string, up to 128 bytes in length. |
DBMSSERV | The database instance/subsystem/server name for ODBC connect. | A text string, up to 128 bytes in length. |
DFLTDEL | The System 390 database default character string delimiter. | A text string, up to 1 byte in length. |
Figure 13 shows an example of a DATABASE object instance that defines a target warehouse database.
Figure 13. Target DATABASE object instance
:COMMENT. Begin DATABASE Instance :COMMENT. :ACTION.OBJINST(MERGE) :OBJECT.TYPE(DATABASE) :INSTANCE. NAME(iwhtar) DBNAME(IWHTAR) DBTYPE(1) DBETYPE(11) ISWH(Y) USERID(marlow) USEODBC(N) CODEPAGE(437) RETRYCNT(3) RETRYINT(30) |
Figure 14 shows an example of a DATABASE object instance that defines a source file.
Figure 14. Source file DATABASE object instance
:ACTION.OBJINST(MERGE) :OBJECT.TYPE(DATABASE) :INSTANCE. NAME(TBC Operations) SHRTDESC(The Beverage Company operational data sources) DBTYPE(70) DBETYPE(70) ISWH(N) LOCATION(Thirsty City) USERID(XXXXXXXX) USEODBC(N) CODEPAGE(437) RETRYCNT(0) RETRYINT(0) |
Table 56 shows the relationship in which the
DATABASE object participates and that is useful for partner applications. The Source column
and the Target column indicate how many times the source object or the target
object of the relationship can participate in the relationship. For
example, in Table 56, the values 1 and M indicate that one
database can relate to many tables, but a table can relate only to one
database.
Table 56. Relationships in which the DATABASE object participates
Source | Source tag language object type | Relation type | Target | Target tag language object type | Description |
---|---|---|---|---|---|
1 | DATABASE | CONTAIN | M | TABLES | Tables or files that are contained in the database or file system. |
Figure 15 shows an example of a relationship between a DATABASE object instance and a TABLES object instance.
Figure 15. Linking DATABASE object instance to TABLES object instance
:COMMENT. Relation: DATABASE to TABLES :COMMENT. :ACTION.RELATION(ADD) :RELTYPE.TYPE(CONTAIN) SOURCETYPE(DATABASE) TARGETYPE(TABLES) :INSTANCE. SOURCEKEY(NAME(TBC Operations) DBNAME() ) TARGETKEY(DBNAME(TBC Operations) OWNER() TABLES(d:\iwhdemo\outcusti.txt) ) |