When you set the DB2_COMPATIBILITY_VECTOR registry variable to support Oracle data dictionary-compatible views, the views are automatically created when you create a database.
db2set DB2_COMPATIBILITY_VECTOR=400
db2stop
db2start
To take full advantage of the DB2 compatibility
features for Oracle applications, the recommended setting for the
DB2_COMPATIBILITY_VECTOR is ORA, which sets all of the compatibility
bits.The data dictionary is a repository for database metadata. The data dictionary views are self-describing. The DICTIONARY view returns a listing of all data dictionary views with comments that describe the content of each view. The DICT_COLUMNS view returns a list of all columns in all data dictionary views. With these two views, you can determine what information is available and how to access it.
The data dictionary definition includes CREATE VIEW, CREATE PUBLIC SYNONYM, and COMMENT statements for each view that is compatible with the Oracle data dictionary. The 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