Overview
The SQL Server integration enables your agents to execute T-SQL queries against Microsoft SQL Server and Azure SQL Database. Ideal for querying operational data, generating reports, and analyzing business metrics stored in SQL Server.Features
- Full T-SQL Support: Execute any T-SQL query including SELECT, INSERT, UPDATE, DELETE, and DDL operations
- Azure SQL Compatible: Works with both on-premises SQL Server and Azure SQL Database
- Structured Results: Returns data with column headers and type information
- CSV Export: Automatically generates downloadable CSV files for large result sets
- Smart Truncation: Token-based result truncation to manage response sizes while preserving full CSV output
Prerequisites
- SQL Server instance or Azure SQL Database accessible over the network
- Database user credentials with appropriate permissions
- Network connectivity from Vercel to your SQL Server (may require firewall rules)
Setup Guide
Configure Network Access
Ensure your SQL Server is accessible from external connections:
- Azure SQL: Add Vercel’s IP ranges to your firewall rules, or enable “Allow Azure services”
- On-premises: Configure your firewall to allow inbound connections on port 1433
Enable SQL Server Integration
In Aster Agents, navigate to Control Hub > Integrations and locate the SQL Server card. Click Connect and provide:
- Server Host — hostname or IP (e.g.,
myserver.database.windows.netfor Azure) - Port — default is 1433
- Database Name — the database to connect to
- Username — database user credentials
- Password — database user password
- Encrypt Connection — enable for Azure SQL (required) and recommended for all connections
Security Considerations
- Use a dedicated read-only account unless write access is specifically needed
- Apply least-privilege permissions — grant access only to the schemas and tables the agent needs
- Enable TLS encryption for all connections (required for Azure SQL)
- Use Azure AD authentication where possible for Azure SQL Database
- Monitor query activity in SQL Server Audit or Azure SQL auditing
- Set connection and request timeouts — the integration uses 15-second connection and 30-second request timeouts by default
Troubleshooting
Connection Timeout
Connection Timeout
- Verify the server hostname and port are correct
- Check firewall rules — your SQL Server must accept connections from Vercel’s IP ranges
- For Azure SQL, ensure “Allow Azure services and resources to access this server” is enabled if needed
- Confirm the SQL Server instance is running and accepting TCP/IP connections
Authentication Failed
Authentication Failed
- Verify username and password are correct
- For Azure SQL, use the full username format:
username@servername - Check that SQL Server authentication mode is enabled (not just Windows Authentication)
- Confirm the user account is not locked or disabled
Encrypt Connection Issues
Encrypt Connection Issues
- Azure SQL requires encryption — set Encrypt Connection to “Enabled”
- For on-premises servers without a trusted certificate, you may need to disable encryption (not recommended for production)
- If using a self-signed certificate, the integration will trust it when encryption is disabled
Query Timeout
Query Timeout
- The default request timeout is 30 seconds — optimize long-running queries with indexes or filtering
- Break large queries into smaller, more targeted queries
- Use
TOPor pagination to limit result set sizes
Related Tools
- SQL Server - Execute T-SQL queries
