TMAegisBeta
Thêm quy tắc cho db2

IBM Db2

TMA-DB2-4.5.3

Review System Tablespaces

ThấpCấp 1Tự độngdb2

Mô tả

System tablespaces store all system object data within that database. It is recommended that system tablespaces are used to store system data only and not user data. Only certain table spaces can be used to hold user tables. Counts user tables stored in SYSTOOLSPACE/SYSTOOLSTMPSPACE; 0 is required. Database-level check: set DB2DBDFT to the database name to audit (the rule connects to it with the instance owner's credentials and fails when DB2DBDFT is unset). Run as the instance owner (or with sqllib/db2profile sourced) so the db2 CLP reads this instance's configuration.

Cách kiểm tra

Phương pháp kiểm tra: Truy vấn SQL

sql_query
db="${DB2DBDFT:?set DB2DBDFT to the database to audit}"; db2 connect to "$db" >/dev/null || exit 1; db2 -x "select count(*) from syscat.tables where tabschema not in ('SYSIBM','SYSTOOLS') and tbspace in ('SYSTOOLSPACE','SYSTOOLSTMPSPACE')"; rc=$?; db2 connect reset >/dev/null 2>&1; db2 terminate >/dev/null 2>&1; exit $rc
Đầu ra mong đợi
0

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

1. Connect to the Db2 database. db2 => connect to <dbname> 2. Review the system tablespaces to identify any user data objects within them. 3. Drop, migrate, or otherwise remove all user data objects (tables, schemas, etc.) from within the system tablespaces. 4. Revoke write access for the system tablespaces from all users. 5 Authentication Considerations

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
db2databaseprivileges
Tham chiếu
CIS IBM Db2 12.1 Benchmark v1.0.0 - 4.5.3 Review System Tablespaces

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target db2