Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

lreb/Database-MSSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft SQL Server Guide

Table of Contents

  1. Introduction
  2. Installation
  3. Connecting to SQL Server
  4. Managing SQL Server

Introduction

Microsoft SQL Server is a relational database management system developed by Microsoft. This guide will help you install, connect, and manage SQL Server.

Installation

Windows

  1. Download the SQL Server installer from the Microsoft website.
  2. Run the installer and follow the setup wizard.
  3. Choose the edition you want to install.
  4. Follow the prompts to complete the installation.

Linux

  1. Import the public repository GPG keys:
    wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  2. Register the Microsoft SQL Server Ubuntu repository:
    sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/mssql-server-2019.list)"
  3. Install SQL Server:
    sudo apt-get update
    sudo apt-get install -y mssql-server
  4. Run the setup script:
    sudo /opt/mssql/bin/mssql-conf setup

Connecting to SQL Server

Using SQL Server Management Studio (SSMS)

  1. Open SSMS.
  2. In the "Connect to Server" dialog box, enter the server name and authentication details.
  3. Click "Connect".

Using Command Line

  1. Open a terminal.
  2. Use the sqlcmd utility to connect:
    sqlcmd -S <server_name> -U <username> -P <password>

Managing SQL Server

Creating a Database

  1. Connect to the SQL Server instance.
  2. Run the following SQL command:
    CREATE DATABASE MyDatabase;

Backing Up a Database

  1. Connect to the SQL Server instance.
  2. Run the following SQL command:
    BACKUP DATABASE MyDatabase TO DISK = '/path/to/backup/file.bak';

Restoring a Database

  1. Connect to the SQL Server instance.
  2. Run the following SQL command:
    RESTORE DATABASE MyDatabase FROM DISK = '/path/to/backup/file.bak';

For more detailed information, refer to the official documentation.

About

base of net core application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published