sp_whoisactive resulting an unknown query: “Insert Into <table_name> select *,%%bmk%% from <table_name> option (maxdop 1)”

陌路散爱 提交于 2019-12-10 13:47:24

问题


sp_whoisactive resulting an unknown query:

insert into <table_name> select *,%%bmk%% from <table_name> option (maxdop 1)

I have checked the above code block but did not find this code in any of my procedures. Can anyone please suggest what this query might be doing.


回答1:


This is a clustered index being rebuilt.

%BMK% is the function that maps the old bookmarks to the new.

There is a document here that discusses the process: https://technet.microsoft.com/en-in/library/cc966402(en-us).aspx




回答2:


sp_whoisactive is not a built in SQL Server procedure.

It is a UPD (Used defined Procedure).

Check the procedures on your database or master / msdb



来源:https://stackoverflow.com/questions/29506640/sp-whoisactive-resulting-an-unknown-query-insert-into-table-name-select

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!