我们正在使用 Tidal 6.5.3.164。我正在使用 sqlcmd 运行 SQL Server 存储过程。当我指定服务器但我想为服务器使用潮汐变量但它不起作用时,它可以工作。在命令行中,我有 sqlcmd。在命令参数中我有:
-E -S <Group.Report_Server> -Q "exec dbo.test_sproc"
我收到以下错误消息:
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [53]. .
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
我的猜测是 sqlcmd 正在尝试连接到名为 <Group.Report_Server> 的服务器,因为当我指定实际的服务器名称时它工作正常。知道如何将变量与 sqlcmd 一起使用吗?