Как переустановить sql server
Перейти к содержимому

Как переустановить sql server

  • автор:

Как переустановить sql server

date18.08.2021
userinsci
directorySQL Server
commentsкомментариев 7

Name already in use

sql-docs / docs / sql-server / install / uninstall-an-existing-instance-of-sql-server-setup.md

  • Go to file T
  • Go to line L
  • Copy path
  • Copy permalink

14 contributors

Users who have contributed to this file

  • Open with Desktop
  • View raw
  • Copy raw contents Copy raw contents

Copy raw contents

Copy raw contents

Uninstall an existing instance of SQL Server (Setup)

This article describes how to uninstall a stand-alone instance of [!INCLUDEssNoVersion]. By following the steps in this article, you also prepare the system so that you can reinstall [!INCLUDEssNoVersion].

[!NOTE]
To uninstall a [!INCLUDEssNoVersion] failover cluster, use the Remove Node functionality provided by [!INCLUDEssNoVersion] Setup to remove each node individually. For more information, see Add or Remove Nodes in a SQL Server Failover Cluster (Setup)

  • To uninstall SQL Server, you must be a local administrator with permissions to log on as a service.
  • If your computer has the minimum required amount of physical memory, increase the size of the page file to two times the amount of physical memory. Insufficient virtual memory can result in an incomplete removal of SQL Server.
  • On a system with multiple instances of SQL Server, the SQL Server browser service is uninstalled only once the last instance of SQL Server is removed. The SQL Server Browser service can be removed manually from Programs and Features in the Control Panel.
  • Uninstalling [!INCLUDEssNoVersion] deletes tempdb data files that were added during the install process. Files with tempdb_mssql_*.ndf name pattern are deleted if they exist in the system database directory.

Back up your data. Either create full backups of all databases, including system databases, or manually copy the .mdf and .ldf files to a separate location. The master database contains all system level information for the server, such as logins, and schemas. The msdb database contains job information such as SQL Server agent jobs, backup history, and maintenance plans. For more information about system databases, see System databases.

The files that you must save include the following database files 1 :

  • master.mdf
  • mastlog.ldf
  • msdbdata.mdf
  • msdblog.ldf
  • model.mdf
  • modellog.ldf
  • mssqlsystemresource.mdf
  • mssqlsystemresource.ldf
  • ReportServer[$InstanceName] data and log files 2
  • ReportServer[$InstanceName]TempDB data and log files 2

1 You can’t back up the tempdb system database.

2 The ReportServer databases are included with SQL Server Reporting Services.

Stop all [!INCLUDEssNoVersion] services. We recommend that you stop all [!INCLUDEssNoVersion] services before you uninstall [!INCLUDEssNoVersion] components. Active connections can prevent successful uninstallation.

Use an account that has the appropriate permissions. Sign in to the server by using the [!INCLUDEssNoVersion] service account or by using an account that has equivalent permissions. For example, you can log on to the server by using an account that is a member of the local Administrators group.

To uninstall SQL Server from Windows 10, Windows Server 2016, Windows Server 2019, and greater, follow these steps:

To begin the removal process, navigate to Settings from the Start menu and then choose Apps.

Search for sql in the search box.

Select Microsoft SQL Server (Version) (Bit). For example, Microsoft SQL Server 2017 (64-bit) .

Select Uninstall.

. image type=»content» source=»media/uninstall-an-existing-instance-of-sql-server-setup/uninstall-sql-server-windows-10.png» alt-text=»Screenshot showing how to uninstall SQL Server.».

Select Remove on the SQL Server dialog pop-up to launch the Microsoft SQL Server installation wizard.

. image type=»content» source=»media/uninstall-an-existing-instance-of-sql-server-setup/remove-sql-2017.png» alt-text=»Screenshot showing how to remove SQL Server.».

On the Select Instance page, use the drop-down box to specify an instance of [!INCLUDEssNoVersion] to remove, or specify the option to remove only the [!INCLUDEssNoVersion] shared features and management tools. To continue, select Next.

On the Select Features page, specify the features to remove from the specified instance of [!INCLUDEssNoVersion].

On the Ready to Remove page, review the list of components and features that will be uninstalled. Select Remove to begin uninstalling

Refresh the Apps and Features window to verify the SQL Server instance has been removed successfully, and determine which, if any, SQL Server components still exist. Remove these components from this window as well, if you so choose.

To uninstall SQL Server from Windows Server 2008, Windows Server 2012 and Windows 2012 R2, follow these steps:

To begin the removal process, navigate to the Control Panel and then select Programs and Features.

Right-click Microsoft SQL Server (Version) (Bit) and select Uninstall. For example, Microsoft SQL Server 2012 (64-bit) .

. image type=»content» source=»media/uninstall-an-existing-instance-of-sql-server-setup/uninstall-sql-server-windows-2012.png» alt-text=»Screenshot showing how to uninstall SQL Server.».

Select Remove on the SQL Server dialog pop-up to launch the Microsoft SQL Server installation wizard.

. image type=»content» source=»media/uninstall-an-existing-instance-of-sql-server-setup/remove-sql-2012.png» alt-text=»Screenshot showing how to remove SQL Server.».

On the Select Instance page, use the drop-down box to specify an instance of [!INCLUDEssNoVersion] to remove, or specify the option to remove only the [!INCLUDEssNoVersion] shared features and management tools. To continue, select Next.

On the Select Features page, specify the features to remove from the specified instance of [!INCLUDEssNoVersion].

On the Ready to Remove page, review the list of components and features that will be uninstalled. Select Remove to begin uninstalling

Refresh the Programs and Features window to verify the SQL Server instance has been removed successfully, and determine which, if any, SQL Server components still exist. Remove these components from this window as well, if you so choose.

In the event of failure

If the removal process fails, review the SQL Server Setup log files to determine the root cause.

How to Install SQL Express Server

The last several versions of Microsoft’s SQL server have seen the introduction of a number of new features. However, not all users will find these necessary, and many may wish to turn to the more lightweight SQL Server Express instead.

In this tutorial we offer a step-by-step guide to installing, testing, upgrading, and uninstalling SQL Server Express 2019.

How to install SQL Express Server

  • A system running Windows 10
  • Access to an administrator-level account
  • Access to the command prompt

What Is SQL Server Express

SQL Server Express is a free version of Microsoft’s SQL Server. This version comes with limited features, having a 10 GB maximum database size and no SQL Server Agent support. Because of this, it is best suited for lightweight, data-driven applications.

SQL Express Installation Guide

The following guide describes the step-by-step process of installing and testing your SQL Server Express.

Step 1: Download SQL Server Express

1. Visit the download SQL Server Express page on the official Microsoft website.

2. Scroll down until you find the Express edition of SQL Server 2019.

3. Click Download now to start the download.

Download SQL Express server.

Step 2: Run the Installation

Once the download is complete, open the download folder and find the installation file. Run the file to start the installation process.

Run the SQL Express Server installation file

Note: The default name for the installation file is SQL2019-SSEI-Expr.exe.

Step 3: Choose the Installation Type

1. After starting the install process, you can choose between three installation types.

SQL Server Express installation types

  • The Basic installation is the quickest, and it installs the default configuration of SQL Server Database Engine.
  • The Custom installation allows you to specify the install location. It also lets you customize which features are installed.

SQL Server Express custom installation

  • The Download Media installation lets you download the setup files for an offline installation. You can choose the version of SQL Server Engine you want to download.

SQL Server Express download media installation

2. For this tutorial, we are using the Custom installation type. Click the center tile to choose this option.

Select the custom installation type

3. Specify the install location and click Install to start downloading the setup files.

Specify the install location and click Install

Depending on your download speed, this process might take some time.

The installer will download the setup files

Step 4: Follow the Screens to Install SQL Server Express

Once the wizard is done downloading the install package, it opens the SQL Server Installation Center. This window offers an array of different tools used to install and manage your SQL server.

1. Select the New SQL Server stand-alone installation or add features to an existing installation option to start the install process.

Select the New SQL Server stand-alone installation or add features to an existing installation option

2. The following screen gives you an overview of the SQL Express Server license terms. Check the box next to I accept the license terms and Privacy Statement and click Next to continue.

Accept the license terms and Privacy Statemen

3. Check the box next to Use Microsoft Update to check for updates to include updates to SQL Server 2019 in the scheduled Windows updates. Click Next to continue.

Include SQL server updates in scheduled Windows updates

4. The Install Rules screen helps identify potential problems with the installation. Any entries showing a Failed status must be resolved before you proceed with the installation. If there are no failed entries, click Next to continue.

Review the Install Rules screen

5. On the Feature Selection screen, check the boxes in the Features section to choose which elements of SQL Server 2019 to install, and define the install directories. Click Next to continue.

Select which features you want to install

6. The Instance Configuration screen lets you choose between the default and custom instance names. For this tutorial, we are using the Named instance option and keeping the default suggested names. Click Next to continue.

Define an instance name

7. The following screen lets you install Java with the current installation or specify a path if you already have it installed. Click Next to continue.

Choose whether you want to install Java

8. The Database Engine Configuration screen lets you specify the authentication mode for your SQL server. For this tutorial, we are using the Mixed Mode option and adding the current user as an administrator. Click Next to continue.

Configure the database engine authentication method

9. The next two screens require you to consent to installing Microsoft R Open and Python, respectively. Click Accept and Next on both to continue.

Agree to installing Microsoft R Open and Python

The following screen displays the current installation progress.

Current installation progress

10. Once the installation is complete, the new screen displays an overview of the installed features. Click Close to finish the installation.

Close the install window once the installation is complete

Note: Make sure to restart your computer for the changes to take effect.

Step 5: Test connection to SQL Server Express

There are two ways to test your connection to SQL Server Express:

  • Using the SQL Server Management Studio.
  • Using the command prompt.

1. Start by downloading the SQL Server Management Studio. Scroll down to the Download SSMS section and use the provided link.

Download SQL Server Management Studio

2. Open the installation file and click Install to start the setup.

Install SQL Server Management Studio

4. Once the setup is complete, click Close to exit.

Close the installation once completed

5. Run SQL Server Management Studio.

6. In the login window, choose the SQL Server Authentication option and use the default Login (sa) and the password you set up during the SQL Server 2019 setup.

7. Click Connect to try to connect to the server.

Connect to the server using the credentials you created during the setup

If the login window closes without any issues and you have access to the SQL Server Management Studio main window, this means the connection works properly.

8. Another way to test the connection to the server is to use the following commands in the command prompt:

For this tutorial, the computer name we are using is DESKTOP-TUK3DNQ:

Testing the connection to the SQL server using the command prompt

How to Update SQL Server Express

The update process for SQL Server Express is similar to installing the application from scratch. In this example, we are upgrading from SQL Server 2017 to SQL Server 2019:

1. In the SQL Server Installation Center window, select the Upgrade from a previous version of SQL Server option.

Select the Upgrade from a previous version of SQL Server option

2. After the installation searches for online updates, click Next to continue.

Let the installation search for online updates

3. Check the box next to I accept the license terms and Privacy Statement and click Next to continue.

Accept the license terms and Privacy Statement

4. Select the SQL Server instance you want to update from the drop-down menu and click Next to continue.

Select the SQL Server instance you want to update

5. Give consent to install Microsoft R Open and Python by clicking Accept and then Next on the following two screens.

Allow Microsoft R Open and Python to be installed

6. On the Server Configuration screen, click Next to continue with the update.

Server Configuration screen

7. The Full-text Upgrade screen offers different options for upgrading your full-text catalogs. Select the Rebuild option and click Next.

Select the Rebuild option on the Full-text Upgrade screen

8. Once the update is complete, click Close to exit the update window.

Close the update window once finished

How to Uninstall SQL Server Express

1. To uninstall SQL Server Express, start by navigating to Start > Settings > Apps and finding the entry called Microsoft SQL Server 2019 on the app list.

2. Select the entry and click Uninstall.

Uninstall the SQL Server Express 2019 in Settings - Apps

3. Select the Remove option in the uninstall window.

Select the Remove option to begin the uninstall

4. Select the SQL instance you want to remove in the drop-down menu. Click Next to continue.

Select the SQL instance you want to remove

5. Select the features you want to uninstall. Click the Select All button to make sure you remove all of the features, then click Next to continue.

Select the features you want to remove

6. The following screen gives an overview of the features to be removed. Click Remove to start the uninstall process.

Overview of the features selected for removal

7. Once the uninstall process is complete, click Close to exit the uninstall window.

Close the uninstall window once finished

After following this tutorial, you should have a fully functional copy of SQL Server Express 2019 installed and ready to use. You will also be able to upgrade or uninstall your copy of SQL Server Express 2019.

Исследование установки LocalDB для SQL Server при работе с Advance Steel / Revit

Автор:

Проблема

Решение

Для изучения SQL Server Express LocalDB на компьютере выполните следующий рабочий процесс:

Проверьте состояние sqllocaldb

  1. Откройте окно командной строки (нажмите клавишу Win + R, а затем введите CMD).
  2. Введите «sqllocaldb i».
  3. Нажмите клавишу ENTER.
  4. Должны отображаться следующие сообщения:
  • Для версий Advance Steel/Revit 2020 и более ранних используется экземпляр MSSQLLocalDB.
  • Для Advance Steel / Revit 2021 и более поздних версий используются следующие экземпляры SQL:
    • Advance Steel 202X > AdvanceSteel202X.
    • Revit 202X > SteelConnections202X.
    1. Введите «sqllocaldb i [имя экземпляра]».
    2. Нажмите клавишу ENTER.
    3. Например, для экземпляра MSSqlLocalDB должно отображаться следующее сообщение:
    • 12.0.5000.0, соответствует SQL Server 2014 с пакетом обновления 2 (SP2) Express;
    • 12.0.6024.0, соответствует SQL Server 2014 с пакетом обновления 3 (SP3) Express.
    1. Если сообщение имеет другой формат, то, вероятно, локальная база данных SQL Server не установлена (правильно). В этом случае (переустановите) Microsoft SQL Server 2014 Express LocalDB. О том, как очистить ее и переустановить, см. ниже.

    Убедитесь, что можно запустить sqllocaldb

      Если сообщение отображается так, как ожидалось выше, откройте окно командной строки (нажмите клавишу Win + R, а затем введите CMD) и выполните следующие тесты:

      В командной строке (по умолчанию это C:\Users\%USERNAME%\) введите следующее и нажмите клавишу ENTER:

      (например, для Revit 2022 введите «sqllocaldb start SteelConnections2022»).

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *