sql-server - 如何在 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 一起使用吗?
解决方案
问题是潮汐变量被定义为更高的几个级别,并且在我运行它时不在范围内。通常这会运行良好,但我试图运行它的方式不起作用。一切都按预期工作,我只需要了解更多关于潮汐的信息。
推荐阅读
- xml - 通过匹配另一个节点名称来获取一个节点或通过匹配另一个节点来排除一个节点
- apache-kafka - Kafka 连接和流
- laravel - 不同控制器的 Laravel 虚拟主机
- javascript - D3在x和y轴上的刷牙和抚摸问题
- css - 设置模态对话框的高度
- google-bigquery - BigQuery:根据着陆页重新创建 GA 细分 - 指标不一致
- c - 无效表达式回调函数的使用无效
- dart - 如何在 Flutter 的单独页面中处理 _googleSignIn.disconnect()(Google 退出)?
- javascript - 将事件侦听器状态作为道具传递
- reactjs - 每个视图中的一个组件,但具有不同的类名