

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在 Windows 中设置 Amazon DocumentDB ODBC 驱动程序
<a name="connect-odbc-setup-windows"></a>

使用以下步骤在 Windows 中设置 Amazon DocumentDB ODBC 驱动程序：

1. 在 Windows 中打开**控制面板**并搜索“ODBC”（或在菜单中选择**Windows 工具**>**ODBC 数据来源（32 位）**或**ODBC 数据来源（64 位）**）：  
![\[Windows 控制面板界面显示了适用于 ODBC 32 位和 64 位数据来源的设置链接。\]](http://docs.amazonaws.cn/documentdb/latest/developerguide/images/odbc-control-panel-1.png)

1. 选择适当的 ODBC 驱动程序数据来源管理器：如果已安装 32 位版本，请选择 32 位版本，否则，请选择 64 位版本。

1. 选择系统 DSN 选项卡，然后单击**添加...**添加新的 DSN：  
![\[“ODBC 数据来源管理器”界面显示了“添加”按钮。\]](http://docs.amazonaws.cn/documentdb/latest/developerguide/images/odbc-add-dsn-1.png)

1. 从数据来源驱动程序列表中选择 **Amazon DocumentDB**：  
![\[“创建新数据来源”界面，其中选择了 Amazon DocumentDB 驱动程序选项。\]](http://docs.amazonaws.cn/documentdb/latest/developerguide/images/create-data-source-1.png)

1. 在**配置 Amazon DocumentDB DSN** 对话框中，完成**连接设置**、**TLS** 选项卡和**测试连接**字段，然后单击**保存**：  
![\[“配置 Amazon DocumentDB DSN”界面，其中包含“连接设置”、“TLS”和“测试连接”等字段。“保存”按钮位于底部。\]](http://docs.amazonaws.cn/documentdb/latest/developerguide/images/config-docdb-dsn-1.png)

1. 确保您准确填写了 Windows 表单，因为连接详细信息会因您选择的连接 EC2 实例的 SSH 隧道方法而异。[此处](https://github.com/aws/amazon-documentdb-odbc-driver/blob/develop/src/markdown/setup/setup.md#using-an-ssh-tunnel-to-connect-to-amazon-documentdb)查看 SSH 隧道方法。有关每个属性的详细信息，请参阅[连接字符串语法和选项](https://github.com/aws/amazon-documentdb-odbc-driver/blob/develop/src/markdown/setup/connection-string.md)。  
![\[“配置 Amazon DocumentDB DSN”界面，其中已填写“SSH 隧道”字段。\]](http://docs.amazonaws.cn/documentdb/latest/developerguide/images/config-docdb-dsn-ssh-1.png)

[有关在 Windows 上配置 Amazon DocumentDB ODBC 驱动程序的更多信息，请单击此处。](https://github.com/aws/amazon-documentdb-odbc-driver/blob/develop/src/markdown/setup/windows-dsn-configuration.md)