Apologies for any confusion caused by the previous response.
Thanks for sharing the details! Based on the image you provided; we can see that you have added IgnorePrepare=true
in the Linked Service JSON configuration. However, ADF may not officially support this parameter in the connection settings, which means it could be ignored during execution.
Possible Solutions to Fix the "Prepared statement needs to be re-prepared" Error:
Use a Custom Query Instead of Selecting a Table - Instead of selecting a table directly in the Copy Activity, try using the "Query" option and writing a direct SELECT statement:
SELECT * FROM your_table_name;
This prevents ADF from using prepared statements, which are causing the issue.
Increase MySQL Cache Settings (If You Have DB Access) - If you have control over the MySQL database, increasing these parameters can help prevent statement cache invalidation:
SET GLOBAL table_open_cache = 4000;
SET GLOBAL table_definition_cache = 2000;
SET GLOBAL performance_schema_max_table_instances = 4000;
Enable ADF Retry Logic - You can configure retries in Copy Activity → Settings: Retry count = 3 Retry interval (seconds) = 10 This ensures that ADF retries in case of transient failures.
Conclusion:
IgnorePrepare=true
may not be supported in ADF Linked Services.
Use custom queries instead of selecting tables.
Optimize MySQL cache settings if possible.
Add retries in ADF for transient errors.
For additional information, please refer the following link:
Appreciate if you could share the feedback on our feedback channel. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.
I hope this information helps.
Thank you.