Answer by matt S. ·
I ran this migration without step 5 and got a duplicate key violation from the index uk_dynamic_measure. I then ran the steps again this time including step 5 and it ran very quickly. The counts for current vs old is 13k : 11k so it seems pretty close.
Answer by Alois M. ·
Hi Matt,
Yes, the counts shows us that the migration did not happened correct.
Explanation to Step 5:
This deletes only measures which got no new measures since a month.
There is one cause why we do that:
We know a bug in former dynatrace versions which produces false data in the dynamic_measure table. This data cannot be migrated.
But it could be that your PWh have not such false data.
So, you can try the steps above without step 5.
If you have problems please open a support ticket and refer to me.
Regards,
Alois
Answer by matt S. ·
Yes. I ran counts on my old measure vs new and its
15959 for new
592677 for old
This also proves that migration didn't happen correctly does it not?
I can do step 5 but I don't understand it. We're deleting measures older than one month ago?
Thank you for the detailed instructions.
Answer by Alois M. ·
Hi Matt,
Answer by matt S. ·
Thank you, I was able to get it to work in some capacity. Since the original script had run partially (there was no begin trans to that commit on the end) some of the tables were already created and the one rename had already happened. Once I got it working fully, I attempted to connect to the warehouse but it failed on the duplicate key row in dynamic_measure on the index uk_dynamic_measure. I deleted that index and was able to connect. Probably not the best solution here as I'm sure that index is needed but I wanted to get this connected.
Answer by Alois M. ·
Hi Matt,
try to insert execute before the sp_rename..... :
like this:
execute sp_rename dynamic_measure , dynamic_measure_old ;
execute sp_rename N'dynamic_measure_old.idxdmconftime' , N'idxdmconftimeold' , N'INDEX';
execute sp_rename N'dynamic_measure_old.dyn_measure_measuretype' , N'dyn_measure_measuretypeold' , N'INDEX';
execute sp_rename N'dynamic_measure_old.IDX1_DYNAMIC_MEASURE' , N'IDX1_DYNAMIC_MEASUREOLD' , N'INDEX';
execute sp_rename N'dynamic_measure_old.uk_dynamic_measure' , N'uk_dynamic_measureold' , N'INDEX';
execute sp_rename N'dynamic_measure_old.i_dynamic_measure_appid_ts' , N'i_dynamic_measure_appid_tsold' , N'INDEX';
Regards,
Alois
JANUARY 15, 3:00 PM GMT / 10:00 AM ET