Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法询问 sql server 实例或 db 以识别它是 alwayson 副本?
您可以查询sys.dm_hadr_database_replica_states然后查看您的数据库是否在其中。
sys.dm_hadr_database_replica_states
SELECT DB_NAME ( database_id ) , * FROM sys.dm_hadr_database_replica_states