无法使用 bcp 从 SQL 服务器提取 XML 数据

Unable to extract XML Data from SQL Server using bcp

我正在尝试通过 bcp 从 sql 服务器 table 中提取 xml 列值,但我遇到了以下错误。

Error = [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]SELECT failed beca use the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Veri fy that SET options are correct for use with indexed views and/or indexes on com puted columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.

这是我通过 bcp 使用的查询

select EventLog.payload.value('(/EventData/Pin)[1]', 'varchar(10)') 
as payload_pin 
from usp.EventLog

以上查询在 sql 服务器中有效,但不能通过 bcp。 有人遇到过这种情况吗?

bcp "SET QUOTED_IDENTIFIER ON ;select ColumnName.value('(/EventData/Pin)[1]', 'varchar(10)') as pin;" 查询data.txt