You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: The SQL Server Installation Wizard provides a single feature tree for an in-place upgrade of SQL Server components to the latest version of SQL Server.
The [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Installation Wizard provides a single feature tree for an in-place upgrade of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] components to the latest version of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)].
22
22
23
23
> [!WARNING]
24
-
> When you upgrade [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)], the previous version of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] is overwritten, and no longer exists on your computer.
25
-
>
26
-
> Before upgrading, back up SQL Server databases and other objects associated with the previous SQL Server instance.
24
+
> When you upgrade [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)], the previous version of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] is overwritten, and no longer exists on your computer. Before upgrading, back up SQL Server databases and other objects associated with the previous SQL Server instance.
27
25
28
26
For many production and some development environments, a new installation upgrade or a rolling upgrade is more appropriate than an in-place upgrade. For more information regarding upgrade methods, see:
29
27
@@ -40,7 +38,7 @@ For many production and some development environments, a new installation upgrad
40
38
You must run Setup as an administrator. If you install [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] from a remote share, you must use a domain account that has read and execute permissions on the remote share, and is a local administrator.
41
39
42
40
> [!WARNING]
43
-
> Be aware that you can't change the features to be upgraded, and you can't add features during the upgrade operation. For more information about how to add features to an upgraded instance of [!INCLUDE [ssnoversion](../../includes/ssnoversion-md.md)] after the upgrade operation is complete, see [Add Features to an Instance of SQL Server (Setup)](add-features-to-an-instance-of-sql-server-setup.md).
41
+
> You can't change the features to be upgraded, and you can't add features during the upgrade operation. For more information about how to add features to an upgraded instance of [!INCLUDE [ssnoversion](../../includes/ssnoversion-md.md)] after the upgrade operation is complete, see [Add Features to an Instance of SQL Server (Setup)](add-features-to-an-instance-of-sql-server-setup.md).
44
42
45
43
If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Plan and test the Database Engine upgrade plan](plan-and-test-the-database-engine-upgrade-plan.md) and then perform the following tasks, as appropriate for your environment:
46
44
@@ -52,7 +50,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
52
50
53
51
- Ensure that existing SQL Server system databases - master, model, `msdb`, and `tempdb` - are configured to autogrow, and ensure that they have sufficient hard disk space.
54
52
55
-
- Ensure that all database servers have logon information in the `master` database. This is important for restoring a database, as system logon information resides in master.
53
+
- Ensure that all database servers have logon information in the `master` database. This is important for restoring a database, as system logon information resides in `master`.
56
54
57
55
- Disable all startup stored procedures, as the upgrade process stops and starts services on the SQL Server instance being upgraded. Stored procedures processed at startup time might block the upgrade process.
58
56
@@ -67,7 +65,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
1. Insert the [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] installation media, and from the root folder, double-click Setup.exe. To install from a network share, move to the root folder on the share, and then double-click Setup.exe.
73
71
@@ -94,7 +92,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
94
92
The prerequisites for the selected features are displayed on the right-hand pane. [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Setup installs the prerequisites that aren't already installed during the installation step described later in this procedure.
95
93
96
94
> [!NOTE]
97
-
> If you have opted to upgrade the shared features by selecting **\<Upgrade shared features only>** on the **Select Instance** page, all the shared features are preselected on the Feature Selection page. All the shared components are upgraded at the same time.
95
+
> If you elect to upgrade the shared features by selecting **\<Upgrade shared features only>** on the **Select Instance** page, all the shared features are preselected on the Feature Selection page. All the shared components are upgraded at the same time.
98
96
99
97
1. On the Instance Configuration page, specify the Instance ID for the instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)].
100
98
@@ -112,7 +110,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
112
110
113
111
To specify the same login account for all service accounts in this instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)], provide credentials in the fields at the bottom of the page.
When you're finished specifying login information for [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] services, select **Next**.
@@ -127,9 +125,10 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
127
125
128
126
1. After installation, the Complete page provides a link to the summary log file for the installation and other important notes. To complete the [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] installation process, select **Close**.
129
127
130
-
1. If you're instructed to restart the computer, do so now. It's important to read the message from the Installation Wizard when you have finished with Setup. For more information about Setup log files, see [View and Read SQL Server Setup Log Files](view-and-read-sql-server-setup-log-files.md).
128
+
1. If you're instructed to restart the computer, do so now. You must read the message from the Installation Wizard when you finish with Setup. For more information about Setup log files, see [View and Read SQL Server Setup Log Files](view-and-read-sql-server-setup-log-files.md).
This article explains how to restore the `master` database from a full database backup.
18
+
This article explains how to restore the `master` database from a full database backup.
19
+
20
+
> [!WARNING]
21
+
> In the event of disaster recovery, the instance where the `master` database is being restored to should be as close to an exact match to the original as possible. At a minimum, this recovery instance should be the same version, edition, and patch level, and it should have the same selection of features and the same external configuration (hostname, cluster membership, and so on) as the original instance. Doing otherwise can result in undefined SQL Server instance behavior, with inconsistent feature support, and isn't guaranteed to be viable.
22
+
23
+
## Restore the `master` database
24
+
25
+
1. Start the server instance in single-user mode.
26
+
27
+
You can start SQL Server by either using the `-m` or `-f` startup parameters. For more information about startup parameters, see [Database Engine Service startup options](../../database-engine/configure-windows/database-engine-service-startup-options.md).
18
28
19
-
> [!WARNING]
20
-
> In the event of disaster recovery, the instance where the `master` database is being restored to should be as close to an exact match to the original as possible. At a minimum, this recovery instance should be the same version, edition, and patch level, and it should have the same selection of features and the same external configuration (hostname, cluster membership, and so on) as the original instance. Doing otherwise might result in undefined SQL Server instance behavior, with inconsistent feature support, and is not guaranteed to be viable.
21
-
22
-
### To restore the `master` database
23
-
24
-
1. Start the server instance in single-user mode.
25
-
26
-
You can start SQL Server by either using the `-m` or `-f` startup parameters. For more information about startup parameters, see [Database Engine Service Startup Options](../../database-engine/configure-windows/database-engine-service-startup-options.md).
27
-
28
29
From a command prompt, run the following commands, and make sure you replace `MSSQLXX.instance` with the appropriate folder name:
29
-
30
+
30
31
```console
31
32
cd C:\Program Files\Microsoft SQL Server\MSSQLXX.instance\MSSQL\Binn
32
33
sqlservr -c -f -s <instance> -mSQLCMD
@@ -35,52 +36,51 @@ helpviewer_keywords:
35
36
- The `-mSQLCMD` parameter ensures that only **sqlcmd** can connect to SQL Server.
36
37
- For a default instance name, use `-s MSSQLSERVER`
37
38
-`-c` starts SQL Server as an application to bypass Service Control Manager to shorten startup time
38
-
39
+
39
40
If the SQL Server instance can't start due to a damaged `master` database, you must rebuild the system databases first. For more information, see [Rebuild system databases](../databases/rebuild-system-databases.md).
40
41
41
-
1. Connect to SQL Server using SQLCMD from another Command Prompt window
42
+
1. Connect to SQL Server using **sqlcmd** from another command prompt window:
42
43
43
44
```console
44
-
SQLCMD -S <instance> -E -d master
45
+
sqlcmd -S <instance> -E -d master
46
+
```
47
+
48
+
1. To restore a full database backup of `master`, use the following [RESTORE Statements](../../t-sql/statements/restore-statements-transact-sql.md)[!INCLUDE [tsql](../../includes/tsql-md.md)] statement:
49
+
50
+
```sql
51
+
RESTORE DATABASE master FROM<backup_device> WITH REPLACE;
45
52
```
46
53
47
-
1. To restore a full database backup of **master**, use the following [RESTORE DATABASE](../../t-sql/statements/restore-statements-transact-sql.md)[!INCLUDE[tsql](../../includes/tsql-md.md)] statement:
48
-
49
-
```sql
50
-
RESTORE DATABASE master FROM<backup_device> WITH REPLACE
51
-
```
52
-
53
-
The REPLACE option instructs [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to restore the specified database even when a database of the same name already exists. The existing database, if any, is deleted. In single-user mode, we recommend that you enter the RESTORE DATABASE statement in the [sqlcmd utility](../../tools/sqlcmd/sqlcmd-utility.md). For more information, see [Use the sqlcmd Utility](../../tools/sqlcmd/sqlcmd-use-utility.md).
54
-
55
-
> [!IMPORTANT]
56
-
> After **master** is restored, the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] shuts down and terminates the **sqlcmd** process. Before you restart the server instance, remove the single-user startup parameter. For more information, see [Configure Server Startup Options (SQL Server Configuration Manager)](../../database-engine/configure-windows/scm-services-configure-server-startup-options.md).
54
+
The `REPLACE` option instructs [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] to restore the specified database even when a database of the same name already exists. The existing database, if any, is deleted. In single-user mode, we recommend that you enter the `RESTORE DATABASE` statement in the [sqlcmd utility](../../tools/sqlcmd/sqlcmd-utility.md). For more information, see [Use sqlcmd](../../tools/sqlcmd/sqlcmd-use-utility.md).
55
+
56
+
> [!IMPORTANT]
57
+
> After `master` is restored, the instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] shuts down and terminates the `sqlcmd` process. Before you restart the server instance, remove the single-user startup parameter. For more information, see [SQL Server Configuration Manager: Configure server startup options](../../database-engine/configure-windows/scm-services-configure-server-startup-options.md).
58
+
59
+
1. Restart the server instance normally as a service, without using any startup parameters.
57
60
61
+
1. Continue other recovery steps such as restoring other databases, attaching databases, and correcting user mismatches.
58
62
59
-
1. Restart the server instance normally as a service, without using any startup parameters.
60
-
1. Continue other recovery steps such as restoring other databases, attaching databases, and correcting user mismatches.
61
-
62
-
## Example
63
+
## Examples
63
64
64
-
The following example restores the `master` database on the default server instance. The example assumes that the server instance is already running in single-user mode. The example starts `sqlcmd`and executes a `RESTORE DATABASE` statement that restores a full database backup of `master`from a disk device: `Z:\SQLServerBackups\master.bak`.
65
-
66
-
> [!NOTE]
67
-
> For a named instance, the **sqlcmd** command must specify the **-S**_\<ComputerName>_\\*\<InstanceName>* option.
65
+
The following example restores the `master` database on the default server instance. The example assumes that the server instance is already running in single-user mode. The example starts **sqlcmd** and executes a `RESTORE DATABASE` statement that restores a full database backup of `master` from a disk device: `Z:\SQLServerBackups\master.bak`.
66
+
67
+
For a named instance, the **sqlcmd** command must specify the `-S<computer-name>\<instance-name>` option.
68
68
69
69
```console
70
-
C:\> sqlcmd
71
-
1> RESTORE DATABASE master FROM DISK = 'Z:\SQLServerBackups\master.bak' WITH REPLACE;
[Rebuild System Databases](../../relational-databases/databases/rebuild-system-databases.md)
82
-
[Database Engine Service Startup Options](../../database-engine/configure-windows/database-engine-service-startup-options.md)
83
-
[SQL Server Configuration Manager](../../relational-databases/sql-server-configuration-manager.md)
84
-
[Back UpandRestore of System Databases (SQL Server)](../../relational-databases/backup-restore/back-up-and-restore-of-system-databases-sql-server.md)
0 commit comments