有没有一种方法可以在SQL Server查询中始终在群集名称上了解SQL
我在群集设置上总是有一个SQL Server。群集名称是:
DBCLUSTER001.mydomain.net
它有几个节点(虚拟服务器)用于失败。
假设他们是:
Node1,
Node2, etc...
要知道哪个节点当前处于活动状态,我运行的
SELECT activeServer = @@SERVERNAME;
-- Let's say, it resulted in 'Node1'
是我要找出的是有一个SQL命令或查询,我可以从当前的Active Node(node1)中运行以获取群集名称?
就像
SELECT *
FROM <something; a function, table, command>
--my expected output is: DBCLUSTER001.mydomain.net
我想实现的是这样的事情。
我正在寻找 sql Server操作系统查询,但是到目前为止,它们都只给我节点信息。
实际上可以获取群集名称吗?
我正在使用SQL Server 2019。
I have a SQL Server Always On cluster set up. The cluster name is:
DBCLUSTER001.mydomain.net
It has a few nodes (virtual servers) for fail overs.
Let's say they are:
Node1,
Node2, etc...
To know which node is currently active I run this
SELECT activeServer = @@SERVERNAME;
-- Let's say, it resulted in 'Node1'
What I'm trying to find out that is there a SQL command or query that I can run from the current active node (Node1) to get the cluster name?
It's like if there is something like
SELECT *
FROM <something; a function, table, command>
--my expected output is: DBCLUSTER001.mydomain.net
This is what I'm trying to achieve.
I am looking in to the SQL Server Operating System queries, but so far they all are giving me the Node info only.
Is getting the cluster name actually possible?
I am using SQL Server 2019.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论