改变 sessionState SQLServer 架构

Alter sessionState SQLServer schema

在大型应用程序中,我们使用 SQL 服务器作为会话状态;所以我们用以下 tables:

建立了 ASPState 数据库

我需要向 ASPStateTempSessions table 添加一些附加信息(例如安装代码、用户代码等)并相应地更新它们,以便外部服务可以检查它。

我已经更改了 table 架构并且运行良好,但是,我的问题是:

Is a good practice? Do I have any alternative?

update them accordingly so an external service can check it.

您 运行 外部服务阻止访问会话 table 从而损害站点的风险。确保外部服务使用对 tables 的最佳访问(即服务发出的所有查询始终使用索引并且不进行 table 扫描)并考虑启用 read committed snapshot.