有人通过 Excel 宏 (VBA) 连接到 Amazon Redshift 数据库吗?我想使用与直接从 Macrco 连接字符串连接到 Teradata 相同的流程来连接到 Amazon Redshift 数据库。有人可以帮忙吗?
Teradata 我遵循以下操作:Conn.ConnectionString = "DRIVER={Teradata};"&“UID=”&suid&“;” &“PWD=”&spwd&“;” &“DBCNAME=”&sdbcnm&“;” &“身份验证=;”
最佳答案
假设您已经安装了 ODBC 驱动程序,您应该能够使用此字符串的更改:
Driver={Amazon Redshift (x64)};
Server=examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com;
Database=dev; UID=masteruser; PWD=your_password; Port=5439
注意:如果您有 32 位版本的 Excel(最常见),则需要确保您的连接字符串(和驱动程序安装)反射(reflect)了这一点。
文档引用: http://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html#obtain-odbc-url
关于excel - 通过 Excel 宏连接到 Amazon Redshift(到 Amazon Redshift 的 ODBC 连接字符串),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38430175/