Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Databases»SQL Server»How To Create ASPState Database in SQL Server

    How To Create ASPState Database in SQL Server

    RahulBy RahulDecember 3, 20142 Mins ReadUpdated:August 7, 2021

    The ASPStage (ASP.NET Session State) provides you the option to store website session data to the SQL server database. This is a useful option with load balancing, where application deployment is on multiple servers. This tutorial will help you to create an ASPState database in SQL server with the command line.

    Prerequsities

    You must have installed the .net framework on your system to complete this task.

    Create ASPState Database

    After installing the .net framework on your system, open the windows command prompt and navigate to the framework installation directory as per your installed version of the .net framework and system architecture.

    Syntax:

    aspnet_regsql.exe -ssadd -sstype p -S {SQL Instance} -U {Username} -P {Password}
    

    Implementation:

    Navigate to the .net framework directory as followings:

    c:\> cd "%windir%\Microsoft.NET\Framework64\v4.0.30319"
    

    Directory path may be changed as per your installation like below.

    .NET Framework 2.0/3.0/3.5 (32-bit): %windir%\Microsoft.NET\Framework\v2.0.50727
    .NET Framework 2.0/3.0/3.5 (64-bit): %windir%\Microsoft.NET\Framework64\v2.0.50727
    .NET Framework version 4.x (32-bit): %windir%\Microsoft.NET\Framework\v4.0.30319
    .NET Framework version 4.x (64-bit): %windir%\Microsoft.NET\Framework64\v4.0.30319
    

    Now execute following command to finally create database named ASPState in SQL server defined instance. As per below command DB1SQLEXPRESS is my SQL instance.

    aspnet_regsql.exe -ssadd -sstype p -S DB1SQLEXPRESS -U sa -P myPassword
    

    On successful execution of the above command, you will get output like below.

    Microsoft (R) ASP.NET SQL Registration Tool version 4.0.30319.33440
    Administrative utility to install and uninstall ASP.NET features on a SQL server.
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Start adding session state.
    .........................
    Finished.
    
    aspstate database mssql session SQL SErver
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Split String with a Delimiter in Bash Script
    Next Article How to Disable root Login in phpMyAdmin

    Related Posts

    How To Install MySQL Server on Ubuntu 22.04

    Updated:April 6, 20224 Mins Read

    How To Install MariaDB on Debian 11

    4 Mins Read

    How to Install Redis on Debian 11 Linux

    Updated:September 16, 20213 Mins Read

    How to Check the PostgreSQL Version

    Updated:August 6, 20212 Mins Read

    How to Rename MySQL Database

    Updated:July 26, 20213 Mins Read

    How to Backup SQL Server Database

    Updated:June 28, 20212 Mins Read

    2 Comments

    1. Vikas on August 27, 2019 11:06 am

      Thanks! it’s helpful to us

      Reply
    2. Mawat on May 11, 2017 1:35 pm

      Thanks Rahul.. nice post

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.