Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 407
user3864233 Avatar asked Nov 22 '22 22:11

user3864233


1 Answers

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

like image 63
xodusprime Avatar answered Nov 24 '22 13:11

xodusprime