sp_merge_dup_inline_default [@report_only = {yes | no}
[, @show_progress = {yes | no}]]
@report_only
报告当前数据库中唯一行内缺省值的数量,但如果指定 yes,则不执行任何更改。如果指定 no:
@report_only 的缺省值为 yes。
@show_progress
如果设置为 yes,则当 @report_only 设置为 no 时,sp_merge_dup_inline_default 会显示井号以显示进度。
@show_progress 的缺省值为 no。
在不带任何选项的情况下针对 pubs2 数据库运行 sp_merge_dup_inline_default。sp_merge_dup_inline_default 不进行任何更改,但会显示信息性消息以指示适当的唯一行内缺省值数:
sp_merge_dup_inline_default
</h1>
sp_merge_dup_inline_default is used to identify duplicate inline default objects,
subsequently to convert one of them into sharable inline default object and remove the
rest. As the result, it will remove entries from sysobjects, syscomments and
sysprocedures. It will also update entries in syscolumns, syscomments and sysprocedures.
Following is the current state of your inline default objects found out by
sp_merge_dup_inline_default and what it could potentially do to them. By default,
sp_merge_dup_inline_default only reports the current state and this warning message. If
you really intend to carry out the changes, please rerun this stored procedure using
sp_merge_dup_inline_default @report_only = "NO"
Database pubs2 has about 0 unique inline defaults If you convert them into sharable inline
<h1>defaults, the rest of total 0 duplicate defaults can be removed from the system catalogs.</h1>
将唯一行内缺省值转换为可共享行内缺省值:
sp_merge_dup_inline_default @report_only = 'NO'
Total 2 duplicate defaults are removed and 7 defaults are converted to sharable inline
defaults. Database is modified and in single-user mode. System Administrator (SA) must
reset it to multi-user mode with sp_dboption.
如果没有重复的行内缺省值,则生成以下输出:
sp_merge_dup_inline_default @report_only = 'NO'
Database is not modified. Please try it later if duplicate inline defaults do exist and
the current resource limitation is preventing this conversion process.
包括 show_progress 参数以指示进度:
sp_merge_dup_inline_default @report_only = 'NO', @show_progress = "YES"
Calculating...
Converting...
[# ]
[########## ]
[################### ]
[############################ ]
[##################################### ]
[############################################## ]
[################################################### ]
[####################################################]
Total 2 duplicate defaults are removed and 7 defaults
are converted to sharable inline defaults.
Database is modified and in single-user mode.
System Administrator (SA) must reset it to multi-user mode with sp_dboption
- 增加 number of locks 的值,或者
- 通过 sp_setpglockpromote 或 sp_setrowlockpromote 降低锁升级阈值。
重新运行 sp_merge_dup_inline_default,并在 sp_merge_dup_inline_default 结束后重置值。