The DBPATHS administrative view returns the values for database paths required for tasks such as split mirror backups.
The schema is SYSIBMADM.
SELECT * FROM SYSIBMADM.DBPATHS
DBPARTITIONNUM TYPE ...
-------------- ------------------------...
0 LOGPATH ...
0 MIRRORLOGPATH ...
0 DB_STORAGE_PATH ...
0 DB_STORAGE_PATH ...
0 TBSP_CONTAINER ...
0 TBSP_CONTAINER ...
0 TBSP_CONTAINER ...
0 TBSP_DIRECTORY ...
0 TBSP_DIRECTORY ...
0 LOCAL_DB_DIRECTORY ...
0 DBPATH ...
11 record(s) selected.
... PATH
... ------------------------------------------------
... S:\dbfiles\INST5\NODE0000\SQL00001\SQLOGDIR\
... S:\mirrorlogs\NODE0000\
... S:\dbfiles\
... S:\dbfile2\
... S:\dbfiles\INST5\NODE0000\SQL00001\TS3
... S:\dbfiles\INST5\NODE0000\SQL00001\long3
... S:\dbfiles\INST5\NODE0000\SQL00001\regular05
... S:\dbfiles\INST5\NODE0000\SQL00001\usertemp3\
... S:\dbfiles\INST5\NODE0000\SQL00001\systemp3\
... S:\dbfiles\INST5\NODE0000\SQLDBDIR\
... S:\dbfiles\INST5\NODE0000\SQL00001\
The ADMIN_LIST_DB_PATHS table function returns the list of files required for backup mechanisms such as split mirror backup.
SELECT DBPARTITIONNUM, TYPE, PATH FROM TABLE(ADMIN_LIST_DB_PATHS()) AS FILES
DBPARTITIONNUM TYPE PATH
---------------------------------------------------------------------
0 TBSP_CONTAINER C:\tablespaces\dms\dms1
0 TBSP_CONTAINER C:\tablespaces\dms\dms2
1 TBSP_CONTAINER C:\tablespaces\dms\dms3
1 TBSP_DIRECTORY D:\tablespaces\sms\sms1\
2 TBSP_DIRECTORY D:\tablespaces\sms\sms2\
2 TBSP_DIRECTORY D:\tablespaces\sms\sms3\
0 LOGPATH C:\DB2\NODE0000\SQL00004\SQLOGDIR\
0 DBPATH C:\DB2\NODE0000\SQL00004\
1 LOGPATH C:\DB2\NODE0001\SQL00004\SQLOGDIR\
1 DBPATH C:\DB2\NODE0001\SQL00004\
2 LOGPATH C:\DB2\NODE0002\SQL00004\SQLOGDIR\
2 DBPATH C:\DB2\NODE0002\SQL00004\
SELECT DBPARTITIONNUM, TYPE, PATH
FROM TABLE(ADMIN_LIST_DB_PATHS()) AS FILES
WHERE TYPE LIKE '%_DEVICE%'
SELECT DBPARTITIONNUM, TYPE, PATH
FROM TABLE(ADMIN_LIST_DB_PATHS()) AS FILES
WHERE TYPE NOT LIKE '%_DEVICE%'
Column name | Data type | Description |
---|---|---|
DBPARTITIONNUM | SMALLINT | Database partition number. |
TYPE | VARCHAR(64) | Describes the type of database object that the path belongs to. For example the path to the log directory indicated by the LOGPATH database configuration parameter would be shown in this column as LOGPATH. See Table 2 for a list of possible return values. |
PATH | VARCHAR(5000) | Path to location where the database manager has a file or directory located. If the path ends with the file system delimiter ('/' on UNIX environments, '\' on Windows environments), the path points to a directory. |
Type value | Description |
---|---|
TBSP_DEVICE | Raw device for a database managed space (DMS) table space. |
TBSP_CONTAINER | File container for a DMS table space. |
TBSP_DIRECTORY | Directory for a system managed space (SMS) table space. |
LOGPATH | Primary log path. |
LOGPATH_DEVICE | Raw device for primary log path. |
MIRRORLOGPATH | Database configuration mirror log path. |
DB_STORAGE_PATH | Automatic storage path. |
DBPATH | Database directory path. |
LOCAL_DB_DIRECTORY | Path to the local database directory. |
/storage/svtdbm3/svtdbm3/NODE0000/SQL00001/
can be used to specify the DB_PATH parameter in a db2relocatedb
configuration file as follows: DB_PATH=/storage/svtdbm3,/storage_copy2/svtdbm3
This administrative view cannot be called when the database is in WRITE SUSPEND mode. The database administrator must ensure that the physical layout of the database does not change in the time between the invocation of the view and the activation of the WRITE SUSPEND mode, which is needed to perform the split mirror operation. The split mirror backup image might not be restored successfully if, for example, the table space layout changed in that time.