sp_countmetadata "<configname>"[, <dbname>]
<configname>
是“number of open databases”、“number of open objects”、“number of open indexes”或“number of open partitions”。
<dbname>
是要在其上运行 sp_countmetadata 的数据库的名称。如果未提供任何数据库名称,sp_countmetadata 将提供所有数据库的总计数。
报告 SAP ASE 服务器中用户对象的数目。使用此值可以设置数据库中允许的对象数,以及附加对象和临时表的空间:
sp_configure "number of open objects", 310
sp_countmetadata "open objects"
There are 283 user objects in all database(s), requiring
117.180 Kbytes of memory. The 'open objects'
configuration parameter is currently set to a run value
of 500.
报告 SAP ASE 服务器中索引的数目。
sp_countmetadata "open indexes", pubs2
There are 21 user indexes in pubs2 database(s),
requiring 8.613 kbytes of memory. The 'open indexes'
configuration parameter is currently set to 600.
使用 sp_countmetadata 时,还存在一些其它注意事项:
<database_name> 选项的情况下运行 sp_countmetadata。
<configname> 指定不唯一的“open indexes”、“open objects”、“open databases”或“open partitions”片断,sp_countmetadata 将返回带有配置值和当前值的匹配配置参数名的列表。例如:
sp_countmetadata "open"
Configuration option is not unique.
option_name config_value run_value
------------------------------ ------------ -----------
curread change w/ open cursors 1 1
number of open databases 12 12
number of open indexes 500 500
number of open objects 500 500
open index hash spinlock ratio 100 100
open index spinlock ratio 100 100
open object spinlock ratio 100 100