Microsoft SQL 凭证#
您可以使用这些凭证来验证以下节点:
先决条件#
在Microsoft SQL server数据库上创建用户账户。
支持的认证方法#
- SQL数据库连接
相关资源#
有关连接到该服务的更多信息,请参阅Microsoft的连接到SQL Server文档。
使用SQL数据库连接#
要配置此凭证,您需要:
- 服务器名称
- 数据库名称
- 您的用户账号/ID
- 您的密码
- 用于连接的端口
- 域名
- 是否使用TLS
- 是否忽略SSL问题
- 连接超时
- 请求超时
- 连接应使用的TDS版本
设置数据库连接:
- Enter the SQL Server Host Name as the Server. In an existing SQL Server connection, the host name comes before the instance name in the format
HOSTNAME\INSTANCENAME. Find the host name:- 在对象资源管理器窗格中作为数据库的顶级对象。
- 在查询窗口的页脚处。
- 查看当前连接的属性,寻找名称或显示名称。
- 更多信息请参考查找SQL Server实例名称 | 当您连接到SQL Server时。您也可以在错误日志中找到相关信息。
- Enter the SQL Server Instance Name as the Database name. Find this name using the same steps listed above for finding the host name.
- 如果在这些位置都没有看到实例名称,那么您的数据库使用的是默认的
MSSQLSERVER实例名称。
- 如果在这些位置都没有看到实例名称,那么您的数据库使用的是默认的
- 输入您的用户账户名称或ID。
- 输入您的密码。
- For the Port:
- SQL Server 默认端口为
1433。 - 如果无法通过端口1433连接,请检查错误日志中的
Server is listening on短语以确定应输入的端口号。
- SQL Server 默认端口为
-
仅当多个域的用户访问您的数据库时,才需要输入域名。运行以下SQL查询以获取域名:
1SELECT DEFAULT_DOMAIN()[DomainName]; -
选择是否使用TLS。
- 选择是否忽略SSL问题:如果开启,即使SSL证书验证失败,凭证仍会连接。
- Enter the number of milliseconds n8n should attempt the initial connection to complete before disconnecting as the Connect Timeout. Refer to the SqlConnection.ConnectionTimeout 属性文档 for more information.
- SQL Server将此超时存储为秒,而n8n将其存储为毫秒。如果您正在复制SQL Server的默认值,请先乘以100再在此处输入数字。
- 输入n8n在超时前应等待给定请求的毫秒数作为请求超时。这基本上是一个查询超时参数。更多信息请参考排查查询超时错误。
- Select the Tabular Data Stream (TDS) protocol to use from the TDS Version dropdown. If the server doesn't support the version you select here, the connection uses a negotiated alternate version. Refer to 附录A:产品行为 for a more detailed breakdown of the TDS versions' compatibility with different SQL Server versions and .NET frameworks. Options include:
- 7_4 (SQL Server 2012 ~ 2019): TDS 版本 7.4。
- 7_3_B (SQL Server 2008R2): TDS版本7.3.B。
- 7_3_A (SQL Server 2008): TDS 版本 7.3.A。
- 7_2 (SQL Server 2005): TDS 版本 7.2。
- 7_1 (SQL Server 2000): TDS版本7.1。