Connect to a SQL Server Database
This procedure describes the easiest method for connecting to a SQL Server database. If you do not have the appropriate SQL Server driver installed, Designer prompts you to install it.
- Drag an Input Data Tool or Output Data Tool onto the canvas and select it.
- In the Configuration window, click the drop-down arrow and select Microsoft SQL Server.
- Designer checks your system for a SQL Server driver.
- If a driver for connecting to SQL Server is already installed, the SQL Server Database Connection window displays. Proceed to the next step.
- If the SQL Server driver is not installed, you are provided a link to install it. For driver information, see Microsoft SQL Server.
- In Connection Name, type a new connection name or select an existing connection. New connections are stored in the Manage Data Connections.
- You can view and select any System connection or any User connection created by you.
- Data Source Name (DSN) connections configured in the ODBC driver are not listed. To configure ODBC and OLEDB connections, see ODBC and OLEDB Database Connections.
- When you select an existing connection, you can modify all connection properties except Type.
- If you are an administrator user, you can modify any System connection or any User connection created by you.
- If you are a non-administrator user, you can only modify User connections created by you.
- If you modify a connection property (for example, Host), you will need to re-enter your password.
- Select a connection Type (new connections only):
- User: Creates a connection that only you can use. User connections are visible only by the user who created them.
- System: Selectable only by administrator users. Creates a connection for any user on a machine. System connections are visible by all users.
- In Host, either search the network for SQL Server hosts or type a host name.
- Under Authentication Type, select either Windows Authentication or SQL Server Authentication depending on how the SQL server is configured.
- Click Test to test the connection.
- If the connection test is successful, a list of databases appears in the Default Database drop-down.
- To use the default database as configured by your server administrator, leave the drop-down unselected.
- To override the default, select a database from the list.
- Click OK.
If no driver is detected, Designer provides a link to install SQL Server Native Client 11. However, if you have a more recent driver installed (for example, ODBC Driver 13 for SQL Server), Designer uses the most recent driver for this connection. To use a newer driver with an existing connection created with an older driver, you must delete and re-add the connection from the Manage Data Connections.
A network search for SQL Server hosts takes time to execute and may not return a complete list of hosts. If you know the name of the host, Alteryx recommends specifying it manually.
See Manual connection setup for more information on authentication requirements.
Alternate SQL Server connection methods
For ODBC and OLEDB connection instructions, see ODBC and OLEDB Database Connections.
If you experience performance issues writing to SQL Server, you can use the bulk loader. In the Output Data Tool Configuration window, click the drop-down and select Other Databases > SQL Server Bulk.
This option requires a DSN connection with ODBC. See ODBC and OLEDB Database Connections.