locked
Alter sessionState SQLServer schema RRS feed

  • Question

  • User1134979656 posted

    In a large scale application we are using SQL Server as session state; so we have built ASPStatedatabase with the following tables:

    • ASPStateTempSessions
    • ASPStateTempApplications

    I have requirements to add some additional informations (eg. installation code, user code, and so on) to ASPStateTempSessions table and update them accordingly so an external service can check it.

    I have altered the table schema and is working well but, my question is:

    Is a good practice? Do I have any alternative?

    Friday, September 18, 2015 5:22 AM

Answers

  • User-986267747 posted

    Hi IrviDominin

    IrvinDominin

    Is a good practice? Do I have any alternative?

    In my experience, It depends on your choice. Sql session is much slower, has object serialization requirements, but can be shared between several web servers, and the Session will not  be lost unless the Server SQL appears to be a problem. Any technology has advantages and disadvantages, isn't it. Besides, according to your description, I think your idea is good choice.

    Best Regards

    Klein zhang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 24, 2015 4:10 AM

All replies

  • User753101303 posted

    At first sight I don't see what thing such as "installation code", "user code" etc..  have to do with session state? Or you mean that sessionid/applicationid is not discriminant enough?

    Friday, September 18, 2015 5:50 AM
  • User1134979656 posted

    I'm in a load balanced situation and multiple DB are touched by the app, I need to let the IT know what "installation" are in use in order to check them for maintenance etc.

    The IT told me that the sessionState DB table seems a good candidate, but I want to avoid any side effect and, eventually, an alternative solution.

    Friday, September 18, 2015 6:02 AM
  • User-986267747 posted

    Hi IrviDominin

    IrvinDominin

    Is a good practice? Do I have any alternative?

    In my experience, It depends on your choice. Sql session is much slower, has object serialization requirements, but can be shared between several web servers, and the Session will not  be lost unless the Server SQL appears to be a problem. Any technology has advantages and disadvantages, isn't it. Besides, according to your description, I think your idea is good choice.

    Best Regards

    Klein zhang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, September 24, 2015 4:10 AM