Pergunta

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?

Foi útil?

Solução

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...

Outras dicas

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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top