---
title: "Force reload a prepared SQL statement"
canonical: "https://docs.perspectium.com/space/helium/2112779/Force%20reload%20a%20prepared%20SQL%20statement"
format: markdown
---
<span style="color: #000000">When running your Agent for a DataSync integration with </span>**<span style="color: #000000">MS SQL Server</span>**<span style="color: #000000">, a directive in the </span>**<span style="color: #000000">agent.xml</span>**<span style="color: #000000"> configuration file named </span>**<span style="color: #000000"><force_preparedstatement_reload></span>**<span style="color: #000000"> has its value set to </span>**<span style="color: #000000">true</span>**<span style="color: #000000"> by default so that SQL statements are batched together to prevent primary key violation exceptions. You can turn off this functionality, or stop reloading prepared SQL statements, by changing the value of this directive to </span>**<span style="color: #000000">false</span>**<span style="color: #000000"> according to the procedure described below.</span>

## **<span style="color: #000000">Prerequisites</span>**

---

:warning:<span style="color: #000000"> First, you will need to </span>[<span style="color: #000000">install a DataSync Agent</span>](https://docs-perspectium.atlassian.net/wiki/spaces/helium/pages/2111958)<span style="color: #000000"> configured to </span>[<span style="color: #000000">share data to an MS SQL Server database</span>](https://docs-perspectium.atlassian.net/wiki/spaces/helium/pages/2112793)<span style="color: #000000">.</span>

:warning:<span style="color: #000000"> You will also need to </span>[<span style="color: #000000">create a ServiceNow dynamic share</span>](https://docs-perspectium.atlassian.net/wiki/display/helium/Dynamic+Share)<span style="color: #000000"> with an </span>**<span style="color: #000000">update</span>**<span style="color: #000000"> trigger or </span>[<span style="color: #000000">create a ServiceNow bulk share</span>](https://docs-perspectium.atlassian.net/wiki/display/helium/Bulk+Share)<span style="color: #000000">.</span>

:warning: <span style="color: #000000">Finally, make sure to </span>[<span style="color: #000000">stop running your DataSync Agent</span>](https://docs-perspectium.atlassian.net/wiki/display/helium/Start+or+stop+the+DataSync+Agent)<span style="color: #000000"> before making any Agent configuration changes.</span>

## **<span style="color: #000000">Stop reloading prepared SQL statements</span>**

<span style="color: #000000">To stop reloading prepared SQL statements for your DataSync integration to an MS SQL Server database, follow these steps:</span>

---

> Macro (ui-steps)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)
> 
> > Macro (legacy-content)