$ freebcp DWSTAGE.BCPTEST in bcptest.txt -f cdr.fmt -S serverfromfreetds -U user@azureserver -P password
Msg 208, Level 16, State 1
Server 'azureserver', Line 1
Invalid object name 'DWSTAGE.BCPTEST'.
Msg 208, Level 16
General SQL Server error: Check messages from the SQL Server
Msg 20064, Level 2
Attempt to use Bulk Copy with a non-existent Server table
$ freebcp DATABASENAME.DWSTAGE.BCPTEST in bcptest.txt -f cdr.fmt -S serverfromfreetds -U user@azureserver -P password
Msg 40515, Level 15, State 1
Server 'azureserver', Line 16
Reference to database and/or server name in 'DATABASENAME.DWSTAGE.BCPTEST' is not supported in this version of SQL Server.
Msg 40515, Level 15
General SQL Server error: Check messages from the SQL Server
Msg 20064, Level 2
Attempt to use Bulk Copy with a non-existent Server table
我还尝试使用 -D 选项将数据库添加到命令行。该连接的默认数据库设置为 freetds.conf 中唯一的 Azure 数据库。
否则,与 SQL Azure 的连接似乎很好——我只是无法让 FreeBCP 工作:
$ isql serverfromfreetds user@azuredatabasename password
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT COUNT(*) FROM DWSTAGE.BCPTEST;
+------------+
| |
+------------+
| 0 |
+------------+
SQLRowCount returns 1
1 rows fetched
SQL> SELECT COUNT(*) FROM DWSTAGE.BCPTESTX;
[ISQL]ERROR: Could not SQLExecute
SQL>
这似乎是一些数据库/架构混乱,但我找不到有效的设置组合。