SQL Server
Connect to Microsoft SQL Server for enterprise analytics
Microsoft SQL Server is a leading enterprise relational database management system, widely used in corporate environments. Scoop connects directly to SQL Server, enabling AI-powered analysis on your enterprise data.
Connection Details
| Setting | Value |
|---|---|
| Default Port | 1433 |
| Connection Type | TCP/IP |
| Authentication | SQL or Windows |
Prerequisites
Before connecting Scoop to SQL Server:
- SQL Server instance (2016 or later recommended)
- SQL Server Authentication enabled (or Azure AD for Azure SQL)
- Read-only user with SELECT permissions
- Network access from Scoop's IP addresses
Enable SQL Server Authentication
If using Windows Authentication only, enable mixed mode:
- Open SQL Server Management Studio (SSMS)
- Right-click your server > Properties
- Go to Security
- Select SQL Server and Windows Authentication mode
- Restart the SQL Server service
Create a Read-Only User
Connect to your SQL Server and run:
-- Create a login
CREATE LOGIN scoop_user WITH PASSWORD = 'your_secure_password';
-- Create a user in your database
USE your_database;
CREATE USER scoop_user FOR LOGIN scoop_user;
-- Grant SELECT on all tables in the database
GRANT SELECT TO scoop_user;
-- Or grant SELECT on specific schemas only
GRANT SELECT ON SCHEMA::dbo TO scoop_user;Replace your_database and the password with your actual values.
Whitelist Scoop IP Addresses
For Azure SQL Database
- Go to your SQL server in Azure Portal
- Navigate to Security > Networking
- Add a firewall rule for Scoop's IP addresses
For On-Premises SQL Server
Configure your firewall to allow incoming connections on port 1433 from Scoop's IP addresses.
Also ensure:
- SQL Server is configured for TCP/IP connections
- SQL Server Browser service is running (for named instances)
Contact Scoop support for the current list of IP addresses to whitelist.
Connect in Scoop
- Navigate to Datasets and click New Dataset
- Select Database as your source
- Choose SQL Server from the database type dropdown
- Enter your connection details:
- Server Host: Your server hostname (e.g.,
myserver.database.windows.netfor Azure) - Port: 1433 (or your custom port)
- Database: Your database name
- Username: scoop_user
- Password: The user's password
- Server Host: Your server hostname (e.g.,
- Click Test Connection to verify
- Enter your SQL query and proceed
Connection URL Format
If using a JDBC URL directly:
Standard connection:
jdbc:sqlserver://hostname:1433;databaseName=your_database
With encryption (recommended for Azure):
jdbc:sqlserver://hostname:1433;databaseName=your_database;encrypt=true;trustServerCertificate=false
For named instances:
jdbc:sqlserver://hostname\instance_name;databaseName=your_database
Best Practices
- Enable encryption for connections, especially over the internet
- Use contained database users for easier migration
- Create indexes on frequently filtered columns
- Use NOLOCK hints sparingly and understand their implications
Troubleshooting
Cannot connect to server
- Verify SQL Server is configured for TCP/IP connections
- Check that port 1433 is open in your firewall
- For named instances, ensure SQL Server Browser is running
- Verify the server name is correct
Login failed
- Verify SQL Server Authentication is enabled
- Check the username and password are correct
- Ensure the login is not disabled:
SELECT is_disabled FROM sys.sql_logins WHERE name = 'scoop_user'
Permission Denied
- Verify the user was created in the correct database
- Check current permissions:
SELECT * FROM fn_my_permissions(NULL, 'DATABASE') - Ensure GRANT SELECT was executed
Updated about 5 hours ago