locked
ASPState Session database RRS feed

  • Question

  • User-331498646 posted

    Is it possible to have more than one ASPstate database on the same SQL server? Since we have multiple applications using the same ASPstate database, we would like to seperate out and have one dedicated to one specific application (ASPState_SpecificDB1) and another for the rest of the applications(ASPState_Other). Can this be done using the aspnet_regsql registration tool? What parameters are needed here?

    Your inputs & feedback much appreciated.

    Thanks,

    mary

    Wednesday, May 22, 2013 12:48 PM

Answers

  • User-837620913 posted

    Yes, you can specify a different database for ASP.NET Session State in the aspnet_reqsql registration tool. The parameter you want is p:

    Option -  Description
    t - Stores session data in the SQL Server tempdb database. This is the default. If you store session data in the tempdb database, the session data is lost if SQL Server is restarted.
    p - Stores session data in the ASPState database instead of in the tempdb database.
    c - Stores session data in a custom database. If you specify the c option, you must also include the name of the custom database using the -d option.

    For example, you would use the tool like this:

    aspnet_regsql.exe -S SampleSqlServer -E -ssadd -sstype c -d Databasename

    For more info on the parameters, see this page: http://msdn.microsoft.com/en-us/library/ms178586(v=VS.80).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 23, 2013 5:47 AM

All replies

  • User-837620913 posted

    Yes, you can specify a different database for ASP.NET Session State in the aspnet_reqsql registration tool. The parameter you want is p:

    Option -  Description
    t - Stores session data in the SQL Server tempdb database. This is the default. If you store session data in the tempdb database, the session data is lost if SQL Server is restarted.
    p - Stores session data in the ASPState database instead of in the tempdb database.
    c - Stores session data in a custom database. If you specify the c option, you must also include the name of the custom database using the -d option.

    For example, you would use the tool like this:

    aspnet_regsql.exe -S SampleSqlServer -E -ssadd -sstype c -d Databasename

    For more info on the parameters, see this page: http://msdn.microsoft.com/en-us/library/ms178586(v=VS.80).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 23, 2013 5:47 AM
  • User-331498646 posted

    Thanks Darell for the information.  So, it is possible to have more than one ASPState Session databases on the same server. The MSDN link was very helpful.

    Thanks,

    Mary

    Thursday, May 23, 2013 9:06 AM