---
title: "Additional Configurations for DataSync Agent sharing to MS SQL Server"
canonical: "https://docs.perspectium.com/space/Iodine/1704595/Additional%20Configurations%20for%20DataSync%20Agent%20sharing%20to%20MS%20SQL%20Server"
format: markdown
---
First, you will need to  install a DataSync Agent  configured to  share data to an MS SQL Server database .  You will also need to  create a ServiceNow dynamic share  with an  update  trigger or  create a ServiceNow bulk share .   Finally, make sure to  stop running your DataSync Agent  before making any Agent configuration changes. Optional Configuration Directives The following table reflects the available optional configuration directives: Directive Example Use Default amqp_uri <amqp_uri> amqp://localhost</amqp_uri > Primary Message Bus Location Optional amqp_user <amqp_user>admin</amqp_user> User for logging into primary bus Optional amqp_password <amqp_password>adminadmin</amqp_password> User's password for message bus Optional polling_interval <polling_interval>20</polling_interval> Interval between each run Optional max_reads_per_connect <max_reads_per_connect>1500</max_reads_per_connect> Messages to process per interval Optional max_writes_per_connect <max_writes_per_connect>1500</max_writes_per_connect> Messages to process per interval Optional schedule <schedule>* * * * *</schedule> Process messages every minutes Optional schemas_directory <schemas_directory>directory name</schemas_directory> directory holding the schema definitions Optional cant_access_directory <cant_access_directory>directory name</cant_access_directory> directory holding the name of table which can't be accessed. Optional date_format <date_format>MM/dd/yyyy</date_format> format of the date for all tables. Optional date_time_format <date_time_format>MM/dd/yyyy HH:mm:ss</date_time_format> format of the date and time for all tables. Optional key <key>ven0001</key> to specify a “key” or instance to subscribe to and ignore records from all other sources e.g. only records coming from the ServiceNow instance ven0001 will be subscribed to and all other messages will be skipped. Introduced in   v3.8.0 Optional The following table provides the optional target database configuration options. Directive Example Use Default database_type <database_type>mysql|sqlserver|oracle|postgres|etc</database_type> The type of database replicated to Required database <database>psp_repl</database> Name of the target database Optional database_server <database_server>IP or FQDN of the database server</database_server> IP or FQDN of the database server Required database_user <database_user>database user name</database_user> User for logging into the database Required database_password <database_password>database user password</database_password> Password for logging into the database Required database_port <database_port>port used by the server</database_port> Port used by the server Optional database_parms <database_parms>parms passed to the database server</database_parms> Parameters passed to the database server Optional database_sid <database_sid>SID (Oracle Only) </database_sid> SID used for Oracle database Optional ↑ Go to top of page Dynamic Database Port Configuration For   DataSync Agent   integrations using MSSQL Server, a configuration option is available to have dynamic database ports. The   database_port   directive can be nested within each   task   directive of the   agent.xml   configuration file for the Replicator Agent. Configuring your Replicator Agent in this way allows you to specify an instance name that will be compatible with dynamic MS SQL Server database ports. To configure dynamic database ports for your Replicator Agent integration with MS SQL Server, follow these steps: ↑ Go to top of page Force reload a prepared SQL statement. When running your Agent for a DataSync integration with  MS SQL Server , a directive in the  agent.xml  configuration file named  <force_preparedstatement_reload>  has its value set to  true  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  false  according to the procedure described below To stop reloading prepared SQL statements for your DataSync integration to an MS SQL Server database, follow these steps: ↑ Go to top of page