在 Linux 服务器上,我想批量加载到数据库表中。我试过:
bcp dbo.ProjectStaging_AdIMI out test.txt -c -T -S localhost
但出现错误:
SQLState = 08001, NativeError = -1
Error = [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider:
[error:0A000086:SSL routines::certificate verify failed:self-signed certificate]
SQLState = 08001, NativeError = -1
Error = [Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection.
For solutions related to encryption errors, see https://go.microsoft.com/fwlink/?linkid=2226722
这是测试计算机,我不需要任何加密。我知道对于“sqlcmd”工具,我需要使用“-No”开关来禁用此加密,但我不知道使用“bcp”命令使用哪个开关。
指定 -u BCP 参数 以信任 BCP 版本 18 及更高版本的证书:
bcp dbo.ProjectStaging_AdIMI out test.txt -c -T -S localhost -u