主DB - SP_WHO2 [英] Master DB - SP_WHO2

查看:96
本文介绍了主DB - SP_WHO2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前始终在3节点集群上的可用性组上运行。在一台服务器,当我连接到主数据库,并尝试运行SP_WHO2,它似乎忽略了它的运行对MASTER查询并尝试使用$ B $的一架B可用性组所以不能访问数据库中的。

We are currently running always on availability groups on a 3 node cluster. On one of the servers, when I connect to the Master database and try and run SP_WHO2, it seems to be ignoring that it's running the query against MASTER and trying to use one of the databases in the availability group so not accessible.

Msg 978,Level 14,State 1,Procedure sp_who2,Line 94

目标数据库(' XXXXX')位于可用性组中,当应用程序意图设置为只读时,当前可以访问连接。有关应用程序意图的详细信息,请参阅SQL Server联机丛书。

Msg 978, Level 14, State 1, Procedure sp_who2, Line 94
The target database ('XXXXX') is in an availability group and is currently accessible for connections when the application intent is set to read only. For more information about application intent, see SQL Server Books Online.

AG仅设置为读取意图,但我认为这是主数据库,我已连接对此,它会运行SP_WHO2无论如何。

The AG's are set to read intent only but I would of thought that as this was the master database, and I've connected to this, it would run SP_WHO2 regardless.

我检查了我的连接字符串,它指向默认的数据库,即使我输入或选择主数据库,我也得到相同的消息。  

I've checked my connection strings and it is pointing to the default db and even if I type or select master db I get the same message. 

这是SQL Server 2014 

This is SQL Server 2014 

推荐答案

登录问题服务器上的默认数据库是否与服务器上的默认数据库相同?

Does the login have the same default db on the problem server as on the servers where it works?


这篇关于主DB - SP_WHO2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆