When the DB2_COMPATIBILITY_VECTOR registry variable is set to support Oracle data dictionary-compatible views, the views are automatically created when the database is created.
Support for Oracle data dictionary-compatible views is at the database level, and must be enabled before creating the database where support is required. The data dictionary definition includes CREATE VIEW, CREATE PUBLIC SYNONYM, and COMMENT statements for each view that is compatible with Oracle's data dictionary. These views, which are created in the SYSIBMADM schema, are listed in Table 1.
Category | Defined views |
---|---|
General | DICTIONARY, DICT_COLUMNS |
Tables or views | USER_CONSTRAINTS, DBA_CONSTRAINTS, ALL_CONSTRAINTS |
Programming objects | USER_PROCEDURES, DBA_PROCEDURES, ALL_PROCEDURES |
Security | USER_ROLE_PRIVS, DBA_ROLE_PRIVS, ROLE_ROLE_PRIVS |
db2set DB2_COMPATIBILITY_VECTOR=ORA
db2stop
db2start
db2 create db mydb
connect to mydb
select * from dictionary
connect to mydb
select * from user_sys_privs
connect to mydb
describe select * from dba_tables