Microsoft SQL Server DSR integration
Automate privacy request handling by integrating MineOS with Microsoft SQL Server.
Missing an action you need, or an integration we don't support yet? Contact your Customer Success Manager.
This integration automates privacy requests for Microsoft SQL Server. MineOS runs the queries you define against your database, using the requester's email address, so you can preview, delete or copy their records.
To scan SQL Server for personal data, see Microsoft SQL Server data classification integration.
How It Works
- Preview: before MineOS deletes or copies anything, it runs your search query so you can preview the records it found for the requester.
- Delete: MineOS runs your delete query for the requester. The search query is also used to check that the data was deleted.
- Get a copy: MineOS runs your copy query and sends the requester a copy of the records it returns.
You write one query for each action. Each query must include the requester's email address; use the placeholder shown in the example text of the query field.
What MineOS Does in Microsoft SQL Server
The integration works only with the tables your own queries read from and delete from. MineOS doesn't pick any tables or columns itself.
-
Finds the requester by: email address — MineOS takes your search query, replaces the
{{value}}placeholder with the requester's email address, and runs the query exactly as written. Whatever rows it returns are the requester's records, so how the match is made (exact, case-insensitive,LIKE) and which tables are joined are up to your query. -
Delete: MineOS replaces
{{value}}in your delete query and runs it once. The number of rows SQL Server reports as affected is recorded as the number of deleted records. Only what your query deletes is removed; MineOS doesn't run the search query afterwards to check the result. -
Get a copy includes: every row your copy query returns, with all of its columns as returned by SQL Server.
-
What you configure: in the setup wizard:
- Connection string — the server, port, database, user ID and password MineOS connects with (SQL Server authentication; Windows authentication isn't supported).
- Query used for search records & delete validation — the query that finds the requester's records.
- Copy Query — the query whose result is sent to the requester.
- Delete Query — the statement that deletes (or updates) the requester's records.
{{value}}is replaced as plain text, so put it inside quotes. For example:SELECT id, email, first_name, last_name FROM customers WHERE email = '{{value}}'andDELETE FROM customers WHERE email = '{{value}}'.
Before You Start
- The integration supports SQL Server 2019 and later.
- The database user MineOS connects with needs SELECT (the
db_datareaderrole covers this) on the tables you query, and DELETE on the tables you want MineOS to delete from. - MineOS must be able to reach your database. Whitelist the MineOS IPs in your database or firewall (IP & Email Whitelisting), or, if the database is on a private network, connect through a VPN tunnel.
Test your queries firstMineOS runs your queries exactly as you write them and doesn't check them. Test each one in your own database before you save.
Setting Up
Step 1: Create a user for MineOS
Create a new database user and grant it:
- SELECT on the databases and tables you want to scan. You can use the
db_datareaderrole on the database, which allows read access to all tables and views in it. - VIEW DEFINITION on system tables, which lets MineOS view the metadata of system objects such as tables, schemas and indexes.
MineOS can only scan the tables this user has access to.
Step 2: Connect in MineOS
- Log in to MineOS. On the left sidebar, click Inventory → Add data source, search for Microsoft SQL Server and add it.
- Open the Microsoft SQL Server system and go to the DSR & integrations tab. If the system already has an instance, click Add instance.
- Under Action for fulfilling requests, select Integration. In the Integration Type dropdown, select Microsoft SQL Server, then click Set up integration.
- In the setup wizard, enter your database connection string, including the user ID, password, server IP, port and database name.
Step 3: Add your privacy request queries
In the same setup wizard, fill in the three query fields, then click Finish:
- Query used for search records & delete validation: finds the requester's records.
- Copy Query: returns everything to include in the copy.
- Delete Query: deletes the requester's records.
You're done! MineOS has been connected to your SQL Server database.
Using the Integration in Requests
To handle requests automatically, add the SQL Server integration to the workflows of the privacy rights it should handle, such as deletion or get a copy.
Need Help?
If you need any help with this integration, please contact your Customer Success Manager. They will be happy to assist you!
Updated 1 minute ago
