显然达梦数据库中的静态视图要比Oracle中的USER开头的静态视图少一个数量级:
SQL> SELECT COUNT(*)
2 FROM ALL_OBJECTS
3 WHERE OBJECT_NAME LIKE 'USER_%'
4 AND OBJECT_TYPE = 'SYNONYM';
COUNT(*)
----------
449
2 FROM ALL_OBJECTS
3 WHERE OBJECT_NAME LIKE 'USER_%'
4 AND OBJECT_TYPE = 'SYNONYM';
COUNT(*)
----------
449
下面看看动态视图,相比静态视图而言,达梦数据库中的动态视图就更是少的可怜了,在达梦的文档中只列出了V$VERSION、V$LOCK、V$SESSION、V$FILESTAT和V$BUFFER五个动态视图:
SQL>select * from system.sysdba.v$version;
select * from system.sysdba.v$version;
BANNER
1 DM Database Server V6.0.2.51-Build(2010.03.10)
2 DB Version: 0X1022b
2 rows got
time used: 0.413(ms) clock tick:678960.
SQL>select login_name, login_time, status
2 from system.sysdba.v$session;
select login_name, login_time, status
from system.sysdba.v$session;
login_name login_time status
1 SYSDBA NULL ACTIVE
2 SYSDBA 2010-04-12 18:49:20 ACTIVE
3 test 2010-04-12 18:54:24 ACTIVE
3 rows got
time used: 0.524(ms) clock tick:861090.
select * from system.sysdba.v$version;
BANNER
1 DM Database Server V6.0.2.51-Build(2010.03.10)
2 DB Version: 0X1022b
2 rows got
time used: 0.413(ms) clock tick:678960.
SQL>select login_name, login_time, status
2 from system.sysdba.v$session;
select login_name, login_time, status
from system.sysdba.v$session;
login_name login_time status
1 SYSDBA NULL ACTIVE
2 SYSDBA 2010-04-12 18:49:20 ACTIVE
3 test 2010-04-12 18:54:24 ACTIVE
3 rows got
time used: 0.524(ms) clock tick:861090.
而在Oracle中动态性能视图有几百个:
SQL> SELECT COUNT(*)
2 FROM ALL_OBJECTS
3 WHERE OBJECT_NAME LIKE 'V$%'
4 AND OBJECT_TYPE = 'SYNONYM';
COUNT(*)
----------
604
2 FROM ALL_OBJECTS
3 WHERE OBJECT_NAME LIKE 'V$%'
4 AND OBJECT_TYPE = 'SYNONYM';
COUNT(*)
----------
604
除了这些视图外,Oracle还提供了大量的系统包,来实现众多的功能:
SQL> SELECT COUNT(*)
2 FROM DBA_OBJECTS
3 WHERE OBJECT_NAME LIKE 'DBMS%'
4 AND OBJECT_TYPE = 'PACKAGE';
COUNT(*)
----------
531
2 FROM DBA_OBJECTS
3 WHERE OBJECT_NAME LIKE 'DBMS%'
4 AND OBJECT_TYPE = 'PACKAGE';
COUNT(*)
----------
531
在达梦数据库中,虽然在SYSDBA用户下也提供了一些过程和函数,但是这个数量也要比Oracle少一个数量级。
显然对于达梦数据库而言,数据字典信息以及在数据库中提供的各种过程和函数,仍然是一个短板,对于使用Oracle习惯的用户在使用达梦数据库的时候会有不方便、不透明的感觉,这应该是达梦数据库进一步完善的方面。