dataSights

Microsoft SQL connector

Last updated

The Microsoft SQL connector copies data from your own SQL Server database into your dataSights database. You pick views on the source database, or write your own SQL queries, and each one lands as a table your reports can use. It suits a line-of-business system, such as an ERP or job costing system, that keeps its data in SQL Server.

Open it from the menu: Data Engineering > 2. Connectors, then open the Microsoft SQL connector.

Set it up

Select Add SQL Server connection. The setup has three steps: Connection, Queries and Review. When you add your first connection, a fourth step, Sync, helps you schedule it.

1. Connection

  1. Fill in:

    • Display name: a name for this connection, for example Production ERP.

    • Server: the server address, with the port after a comma if it is not the default, for example sql.contoso.com,1433.

    • Database: the database to read from.

    • Connection timeout (seconds): how long to wait for the server. 120 suits most servers.

    • Authentication type: SQL Server Authentication or Microsoft Entra Password.

    • User ID and Password: a login with read access to the views or tables you want.

  2. Tick Trust server certificate if your server uses a self-signed certificate.

  3. Select Test connection. A new connection must pass the test before you can select Next.

2. Queries

dataSights lists the views on the source database. For each query you want:

  1. Pick a view under Pick a view from the source database and select Add, or select Add custom query to write your own SQL.

  2. Check the Query name, the Table to save query results to, and the SQL. A view starts as SELECT * FROM the view, which you can narrow down.

  3. Select Next.

Select Reload views if you have just created a view on the source database and it is not in the list yet.

3. Review

Check the connection details and the list of queries. Leave Allow this connection to sync on to include it in scheduled syncs, then select Save.

4. Sync (first connection only)

Choose a Sync Type, a Frequency and the time to run, then select Save sync. Select Skip for now to set the schedule later under Data Engineering > 3. Syncs.

Manage your connections

The connector lists each connection with its server and database, its status and when it last synced. From the actions on each row you can:

  • Trigger a sync straight away.

  • Edit the connection or its queries.

  • Pause or resume syncing for that connection.

  • Delete the connection, together with its queries.

Large tables

For a query that returns a lot of rows, tick Enable paging. dataSights then reads the results in pages of Page size rows, ordered by the Paging key column. Pick a column with unique values, such as the table's ID. If a query needs longer to run, raise its Command timeout (seconds).

Good to know

  • When you edit a connection, leave Password blank to keep the saved one.

  • Untick Allow this query to run to keep a query but stop it syncing.

  • A login that can only read the views you need is safer than a database owner login.

  • The server must accept connections from dataSights. If it sits behind a firewall, ask your IT team to allow access.

Related: Connectors · Excel Online connector · Google Sheets connector · Connectors: how they work, and the full list · SQL Editor · Data Viewer

dataSights

Try dataSights free

See how dataSights automates your Xero consolidation and reporting. Start your 14-day free trial, no credit card required.

Start for free