How we have to store session state in database??? Is there any configuration to store the Session & Application variables in SQL Server 2005 database.
Assuming you mean in asp.net (if you don't remove the tag I just added) then follow these instructions
By default, session state values and information are stored in memory within the ASP.NET process. Alternatively, you can store session data in a SQL Server database, where it can be shared by multiple Web servers. For more information about session state, see Implementing a Session-State Store Provider and Session-State Modes.
If the database that you specify for session state with Aspnet_regsql.exe does not already exist, then the current user must have rights to create databases in SQL Server as well as to create schema elements within a database. If the database does exist, then the current user must have rights to create schema elements in the existing database.
To install the session state database on SQL Server, run Aspnet_regsql.exe tool supply the following information with the command:
The name of the SQL Server instance, using the -S option.
The logon credentials for an account that has permission to create a database on a computer running SQL Server. Use the -E option to use the currently logged-on user, or use the -U option to specify a user ID along with the -P option to specify a password.
The -ssadd command-line option to add the session state database.
By default, you cannot use Aspnet_regsql.exe to install the session state database on a computer running SQL Server 2005 Express Edition. For more information about using SQL Server 2005 Express Edition to store session state, see Session-State Modes.
From here: ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe)