System Requirements

Before installing MS SQL Server, ensure that your system meets the following requirements:

Hardware Requirements

  1. Processor:

    • Minimum: x64 Processor: 1.4 GHz for x64 processors.
    • Recommended: 2.0 GHz or faster.
  2. Memory:

    • Minimum: 512 MB.
    • Recommended: 4 GB or more.
  3. Hard Disk Space:

    • Minimum: 6 GB of available hard-disk space.
    • Recommended: Additional space may be required depending on the installation and usage of the database.
  4. Network:

    • Minimum: 1 Gbps Ethernet adapter.

Software Requirements

  1. Operating System:

    • Windows Server 2012 (or later)
    • Windows 10 (or later)
    • Linux (Red Hat Enterprise Linux, SUSE Linux Enterprise Server, Ubuntu)
  2. .NET Framework:

    • .NET Framework 4.6 (or later) for Windows installations.
  3. Additional Software:

    • Internet Explorer 11 (or later) for some SQL Server features.

Installation Steps

For Windows

  1. Download SQL Server:

  2. Run the Installer:

    • Launch the downloaded installer (SQLServer2022-SSEI-Expr.exe for example).
  3. Select Installation Type:

    • Choose “Basic,” “Custom,” or “Download Media.”
    • For most users, the “Basic” option is sufficient.
  4. Accept the License Terms:

    • Review and accept the license terms.
  5. Choose Install Location:

    • Select the installation directory for SQL Server.
  6. Install SQL Server:

    • Click “Install” to begin the installation process. This may take several minutes.
  7. Complete Installation:

    • Once the installation is complete, note the instance name and click “Close.”
  8. Install SSMS (SQL Server Management Studio):

    • Download and install SQL Server Management Studio (SSMS) from the SSMS download page.
    • Run the SSMS installer and follow the prompts to complete the installation.

For Linux

  1. Add Microsoft SQL Server Repository:

    • Follow the steps specific to your Linux distribution as described on the Microsoft SQL Server Linux Installation page.
  2. Install SQL Server:

    • For example, on Ubuntu:
      sudo apt-get update
    sudo apt-get install -y mssql-server
      
  3. Configure SQL Server:

    • Run the configuration script:
      sudo /opt/mssql/bin/mssql-conf setup
      
  4. Install SQL Server Tools:

    • Install tools like sqlcmd and bcp:
      sudo apt-get install mssql-tools unixodbc-dev
      
  5. Add tools to PATH:

    • Add the tools to your path in ~/.bash_profile or ~/.bashrc:
      echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
    source ~/.bashrc
      

Configuring SQL Server

  1. Open SQL Server Management Studio (SSMS):

    • Connect to your SQL Server instance using the server name (local) or localhost.
  2. Configure Authentication Mode:

    • By default, SQL Server uses Windows Authentication.
    • To enable Mixed Mode (Windows and SQL Server Authentication):
      • Right-click on the server name in SSMS, select “Properties.”
      • Go to the “Security” page and select “SQL Server and Windows Authentication mode.”
      • Click “OK” and restart the SQL Server service.
  3. Create SQL Server Logins:

    • In SSMS, expand the “Security” node.
    • Right-click on “Logins” and select “New Login.”
    • Enter the login name and configure authentication settings.
    • Assign appropriate server roles and user mappings.
  4. Set Up Database and Users:

    • Create a new database by right-clicking on the “Databases” node and selecting “New Database.”
    • Assign users to the database and configure their permissions as needed.
  5. Configure Firewall Rules (if applicable):

    • Ensure that the SQL Server port (default is 1433) is open in your firewall to allow remote connections.
  6. Backup and Maintenance:

    • Set up regular database backups and maintenance plans to ensure data integrity and performance.

By following these steps, you can successfully install, configure, and start using MS SQL Server for your database needs.