使用 iodbctest 测试 ODBC DSN
Mac OS X 上的标准 iODBC 驱动程序管理器包含一个名为 iodbctest 的实用程序,您可以使用此实用程序测试 DSN,以验证该 DSN 是否配置正确。应向此命令传递与用于打开 ODBC 数据库连接的连接字符串格式相同的连接字符串。配置 DSN 连接之后,您可以运行查询以验证该连接是否正常工作。
例如:
# iodbctest "DSN=VerticaDSN;UID=dbadmin;PWD=password"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0607.1008
Driver: 07.01.0200 (verticaodbcw.so)
SQL> SELECT table_name FROM tables;
table_name
--------------------------------------------------------------------------------------------------------------------------------
customer_dimension
product_dimension
promotion_dimension
date_dimension
vendor_dimension
employee_dimension
shipping_dimension
warehouse_dimension
inventory_fact
store_dimension
store_sales_fact
store_orders_fact
online_page_dimension
call_center_dimension
online_sales_fact
numbers
result set 1 returned 16 rows.