首页 > 解决方案 > 如何在 sqlcmd 中使用潮汐调度程序变量?

问题描述

我们正在使用 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 一起使用吗?

标签: sql-servertidal-scheduler

解决方案


问题是潮汐变量被定义为更高的几个级别,并且在我运行它时不在范围内。通常这会运行良好,但我试图运行它的方式不起作用。一切都按预期工作,我只需要了解更多关于潮汐的信息。


推荐阅读