将 ApplicationIntent=ReadOnly 与将数据插入临时表的存储过程一起使用

Using ApplicationIntent=ReadOnly with stored procedures which insert data to temp tables

我正在使用 SQL Server 2012 AlwaysOn 侦听器,我想使用带有 ApplicationIntent=ReadOnly 参数的连接来调用一些存储过程,这是我的问题:将数据插入的存储过程temp table 可以使用与 ApplicationIntent=ReadOnly 的连接 ?

根据Readable Secondary Replicas

Note

Though you cannot write data to secondary databases, you can write to read-write databases on the server instance that hosts the secondary replica, including user databases and system databases such as tempdb.

所以答案是您的存储过程会起作用。