This guide will help you do the following steps for connecting the MSPbots SQL agent.

What's in this article:

Complete the prerequisites


Please create a new read-only account in your SQL Server or MySQL as follows: How to Create a Read-only Account for Your SQL Server or MySQL. If you already have a read-only account specifically for communicating with MSPbots, please skip this prerequisite.

Connect the MSPbots agent


    1. Go to Integrations on the MSPbots app menu. 
    2. Find the SQL Agent and click the Config icon.
      SQL agent config
    3. Next, click the download icon for the MSPbots SQL Agent Client to start downloading the installer file.
    4. After the download is complete, follow the prompts to install the MSPbots SQL Agent client.
    5. During the setup, select Automatic Start and Create a desktop shortcut, then click Next
      sql setup
    6. In the last step, tick the Launch MSPbotsAgentService checkbox and click Finish. The window will automatically close when the service starts.
      complete sql setup
    7. Launch the MSPbots agent and log in using your MSPbots account. You can Minimize or Close the window after login but do not log out. 
      login agent client

Set up the MSPbots Agent Connector


  1. Go to Integrations on the MSPbots app menu.
    integrations
  2. Search for SQL Agent and click it to open the connection settings. 

  3. Click the +Add Connector button. 
    image sql add connector

    The last success auth shows the last time when the MSPbots Agent successfully pulled the database configuration information. By default, this process is set to occur every 5 minutes.


  4. Fill in all of the following required fields. It may take a few moments for the agent to check in after installation.
  5. Click Save And Sync

Create a dataset and validate the data


  1. Go to Datasets on the MSPbots app menu and click the New Agent Dataset button. 
    new agent dataset
  2. When the New window appears, click Integration and select SQL Agent. Don't forget to fill in the dataset Name and Description fields.

    new dataset
  3. Next, go to the Data Cleaning tab to show the Validate SQL section below.
    1. Select a database from the DB dropdown list. 
    2. Scroll down to the Validate SQL section, fill in the SQL field. The most common SQL statement to use here is “select * from TABLENAME”. 
    3. Input your desired Sync Frequency in minutes.

      Sync Frequency is currently limited to 30 minutes and can only be decreased for smaller datasets. For larger datasets, the frequency may be limited due to a large amount of data ingestion and the constraint it would place on both your server and ours. 


      DB name and sync frequency
  4. Click Confirm when done. This will show a preview of the data for your validation. You can customize or use the default character length for string-type fields, and the time field can be set with a timezone.
  5. Once you confirm the data is correct, click OK to create and save the dataset. The data will be synchronized in 10 minutes.

Save the logs and send the file to MSPbots Support Team


  1. Open the MSPbots Agent client and click the Save Log button on the upper right corner of the window. 
    save log
  2. Click Confirm on the Tips popup that appears. 
    tips
  3. Next, select the location to save the logs, provide a filename, and click Save.
  4. Send the file to support@mspbots.ai

Related Topics