You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


You can configure your DataSync Agent to share data from ServiceNow to a Snowflake database by changing some additional configurations in your agent.xml file

The DataSync Agent uses the Snowflake COPY command to bulk load data from the local file system where the Agent is running to optimize performance. Being that Snowflake is a cloud-based database, the COPY command is used to improve performance as standard SQL operations (i.e. INSERT, UPDATE, etc) on a record by record basis will have slow performance due to network latency.


Prerequisites


(warning) First, you will need to Install the DataSync Agent.

(warning) You will also need to create a ServiceNow dynamic share/bulk share.

(warning) Make sure to stop running your DataSync Agent before making any Agent configuration changes.


Procedure

To set up your DataSync Agent to share application data to an IBM DB2 database, follow these steps:


Navigate to the directory where you saved your agent.xml file when installing your DataSync Agent.

Open your agent.xml file in a text editing application. Then, locate the <task> directive(s) within your <subscribe> directive, and update the following database-related directives:

DirectiveValue to enter
<database_type>db2
<database_server>

URL/IP address for your DB2 database. If your database is installed on your local machine, set this value to localhost.

<database_port>Port number for your DB2 database
<database_user>Username used to access your DB2 database
<database_password>Password used to access your DB2 database
<database_parms>characterEncoding=UTF-8

Your agent.xml file should look similar to the example shown below:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<config>
    <agent>
       	<share>
     	</share>  
     	<subscribe>
     	<task>
            <task_name>test_db2_subscribe</task_name>
            <message_connection password="encrypted:vlOtU71yu8N/EFIJH85SSBtaIt7qEEfvqiqft9VZyYE=" user="exampleuser">amqps://example.perspectium.net</message_connection>
            <instance_connection password="encrypted:vlOtU71yu8N/EFIJH85SSBtaIt7qEEfvqiqft9VZyYE=" user="example.user">https://myinstance.service-now.com</instance_connection>
            <handler>com.perspectium.replicator.sql.SQLSubscriber</handler>
            <decryption_key>The cow jumped over the moon</decryption_key>
            <database_type>db2</database_type>
            <database_server>localhost</database_server>
            <database_port>50000</database_port>
            <database_user>exampleuser</database_user>
            <database_password>examplepassword</database_password>
            <database_params>characterEncoding=UTF-8</database_params>
            <database>SAMPLE</database>
         </task>
      </subscribe>
      <max_reads_per_connect>4000</max_reads_per_connect>
      <polling_interval>30</polling_interval>
   </agent>
</config>

Save the changes you made to your agent.xml file and close the file.

After configuring your agent.xml file to support replication to your IBM DB2 database, start running your DataSync Agent again.

  • No labels