Microsoft SQL Server

Connect your Microsoft SQL Server databases to Memex for AI-powered data analysis.

What is Microsoft SQL Server?

Microsoft SQL Server is an enterprise relational database management system developed by Microsoft. It's widely used in business environments for transaction processing, business intelligence, and analytics applications. Once connected, Memex can query your SQL Server databases, explore schemas, and help you analyze your data through natural conversation.

What You'll Need

Credential
Description
Example

Server

SQL Server hostname or IP address

myserver.database.windows.net or 192.168.1.100

Database

Name of the database to connect to

SalesDB

Username

SQL Server login username

sa or app_user

Password

SQL Server login password

Your secure password

Finding Your Credentials

For Azure SQL Database

  1. Navigate to your SQL database resource

  2. In the Overview section, find the Server name (e.g., yourserver.database.windows.net)

  3. The database name is shown at the top of the overview page

  4. Use the SQL authentication credentials you set up when creating the database

For On-Premises SQL Server

Contact your database administrator to obtain:

  • The server hostname or IP address

  • The database name you need to access

  • A username and password with appropriate permissions

circle-info

For security, request a database user with read-only access to the specific database you need. Avoid using the sa (system administrator) account.

Connecting to Memex

  1. Open the Memex Hub from the sidebar

  2. Click on the Connectors tab

  3. Find and click the Microsoft SQL Server card

  4. Enter your Server, Database, Username, and Password

  5. Give your connection a memorable name (e.g., "Production Sales DB")

  6. Click Add Connection

Verifying Your Connection

Once connected, try asking Memex:

You should see a list of tables in your database.

Using Your Connection

Here are some examples of what you can ask:

Security Considerations

Authentication Best Practices

SQL Server supports multiple authentication modes:

  • SQL Authentication: Uses username and password stored in SQL Server

  • Windows Authentication: Uses Windows/Active Directory credentials (not supported through Memex)

When using SQL Authentication:

  • Use a dedicated service account for Memex

  • Grant only the minimum permissions needed (typically db_datareader role)

  • Use strong, unique passwords

Network Security

  • Ensure your SQL Server allows connections from external sources if using cloud-hosted Memex

  • For Azure SQL, configure firewall rules to allow access

  • Consider using encrypted connections (TLS/SSL)

User Permissions

Create a dedicated read-only user for Memex:

circle-exclamation

Troubleshooting

Connection Refused

  • Verify the server hostname or IP address is correct

  • Check that SQL Server is running and accepting connections

  • Ensure firewall rules allow connections on port 1433 (default)

  • For Azure SQL, verify your IP is allowed in the firewall settings

Login Failed

  • Double-check your username and password

  • Verify the user has access to the specified database

  • Ensure SQL Server authentication is enabled (mixed mode authentication)

  • Check if the account is locked or disabled

Database Not Found

  • Verify the database name is spelled correctly (case-sensitive on some configurations)

  • Ensure the user has permission to access the database

  • Check that the database is online and not in a restricted state

Timeout Errors

  • The server may be under heavy load—try again later

  • Check network connectivity between Memex and your SQL Server

  • Consider increasing connection timeout settings if available

Learn More

Last updated

Was this helpful?