Microsoft SQL Server (MSSQL)
Premium Connector
This connector requires the Standard Plan or higher.
Preparation
To allow Shaped to connect to your MSSQL database, you need to create a read-only user and share those credentials through the Create Table endpoint.
You can create a read-only user on a MSSQL database with the following commands:
-- 1. Create a new login (server-level).
CREATE LOGIN [username] WITH PASSWORD = '[password]';
-- 2. Create a user (database-level) and map it to the login.
USE [database_name];
CREATE USER [username] FOR LOGIN [username];
-- 3. Grant read-only access by adding the user to the db_datareader role.
ALTER ROLE db_datareader ADD MEMBER [username];
-- 4. (Optional) Restrict access to specific tables instead of granting db_datareader role.
GRANT SELECT ON [schema].[table_name] TO [username];