DB_MEMBERS table function
The DB_MEMBERS table function returns basic member information about a Db2® pureScale® instance.
Syntax
Authorization
One of the following authorities is required to execute the routine:
- EXECUTE privilege on the routine
- DATAACCESS authority
- DBADM authority
- SQLADM authority
Default PUBLIC privilege
In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the function is automatically created.
Table function parameters
The function has no input parameters.
Example
Retrieve instance information:
$ db2 "select * from table(SYSPROC.DB_MEMBERS()) as members"
The following is an example of output from this query.
MEMBER_NUMBER HOST_NAME PARTITION_NUMBER MEMBER_TYPE
------------- -------------------------------- ---------------- -----------
0 member1.mycompany.com 0 D
1 member2.mycompany.com 0 D
2 member3.mycompany.com 0 D
128 ca1.mycompany.com 0 C
129 ca2.mycompany.com 0 C
PORT_NUMBER SWITCH_NAME STATUS
----------- ------------ ------
0 - -
0 - -
0 - -
0 - -
0 - -
5 record(s) selected.
Information returned
Column name | Data type | Description |
---|---|---|
MEMBER_NUMBER | SMALLINT | member - Database member monitor element |
HOST_NAME | VARCHAR(256) | host_name - Host name monitor element |
PARTITION_NUMBER | SMALLINT | partition_number - Partition Number monitor element |
MEMBER_TYPE | CHAR(1) | The type of member:
|
PORT_NUMBER | SMALLINT | port_number - Port number |
SWITCH_NAME | VARCHAR(128) Starting from version 11.5.6: VARCHAR(256) |
The switch name of the member on the host |
STATUS | SMALLINT | Reserved for future use |