views:

38

answers:

1

I am using SQL Server for persisting session state in a asp.net web application.

Is there a best practice for the location of the session data? Should it be in the database along with the application data or in a separate 'Application Services Database' as Microsoft suggests by default.

The application services database would also house other provider data (ie. roles, membership, etc.)

Thanks.

+3  A: 

The session data should be stored separately to the data, as it doesn't make sense in a backup/restore situation for example. If you need to revert to a previous version of the database, or restore an old version, it makes no sense to restore the session data at the time of the backup.

Also, you will probably have different maintenance plans for session data as opposed to application data.

Deeksy