Configure SQL server to store session state

末鹿安然 提交于 2019-12-11 09:05:57

问题


I am trying to set up session state in SQL server.

Command:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regsql.exe -ssadd –sstype c -d SomeName -S SERVERNAME -U someUser -P somePass

It throws: The argument '-sstype' is invalid.

Any tips?


回答1:


Stupid.

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regsql.exe -ssadd -d SomeName -S SERVERNAME -U someUser -P somePass –sstype c

The arguments order...




回答2:


You need to enable Agent XPs to run Aspnet_regsql.exe tool

From Installing the Session State Database Using the Aspnet_regsql.exe Tool

By default, you cannot use the Aspnet_regsql.exe tool to install the session state database on SQL Server Express. In order to run the Aspnet_regsql.exe tool to install a SQL Server Express database, you must first enable the Agent XPs SQL Server option using Transact-SQL commands like the following:


EXECUTE sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO

EXECUTE sp_configure 'Agent XPs', 1
RECONFIGURE WITH OVERRIDE
GO

EXECUTE sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO


来源:https://stackoverflow.com/questions/22634044/configure-sql-server-to-store-session-state

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!