Skip to content

Commit c076f69

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/sql-docs-pr (branch live)
2 parents 0442afa + 442cf6c commit c076f69

File tree

2 files changed

+62
-63
lines changed

2 files changed

+62
-63
lines changed

docs/database-engine/install-windows/upgrade-sql-server-using-the-installation-wizard-setup.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Upgrade: Installation Wizard (Setup)"
33
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.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: 10/31/2024
6+
ms.date: 04/17/2025
77
ms.service: sql
88
ms.subservice: install
99
ms.topic: install-set-up-deploy
@@ -21,9 +21,7 @@ monikerRange: ">=sql-server-2016"
2121
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)].
2222

2323
> [!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.
2725
2826
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:
2927

@@ -40,7 +38,7 @@ For many production and some development environments, a new installation upgrad
4038
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.
4139

4240
> [!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).
4442
4543
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:
4644

@@ -52,7 +50,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
5250

5351
- 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.
5452

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`.
5654

5755
- 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.
5856

@@ -67,7 +65,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
6765

6866
<a id="to-upgrade-include-ssnoversionincludesssnoversion-mdmd"></a>
6967

70-
### Upgrade [!INCLUDE [ssNoversion](../../includes/ssnoversion-md.md)]
68+
### Upgrade SQL Server
7169

7270
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.
7371

@@ -94,7 +92,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
9492
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.
9593

9694
> [!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.
9896
9997
1. On the Instance Configuration page, specify the Instance ID for the instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)].
10098

@@ -112,7 +110,7 @@ If you're upgrading the [!INCLUDE [ssDE](../../includes/ssde-md.md)], review [Pl
112110

113111
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.
114112

115-
> [!CAUTION]
113+
> [!CAUTION]
116114
> [!INCLUDE [ssNoteStrongPass](../../includes/ssnotestrongpass-md.md)]
117115
118116
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
127125

128126
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**.
129127

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).
131129

132130
## Related content
133131

134132
- [Upgrade SQL Server](upgrade-sql-server.md)
135-
- [Backward Compatibility_deleted](/previous-versions/sql/sql-server-2016/cc280407(v=sql.130))
133+
- [Issues when upgrading to SQL Server 2022](/troubleshoot/sql/database-engine/install/windows/issues-upgrading-sql-server-2022)
134+
- [Backward Compatibility](/previous-versions/sql/sql-server-2016/cc280407(v=sql.130))
Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
title: "Restore the master database (Transact-SQL)"
2+
title: "Restore the master Database (Transact-SQL)"
33
description: This article shows you how to restore the master database in SQL Server from a full database backup by using Transact-SQL.
44
author: MashaMSFT
55
ms.author: mathoma
6-
ms.date: "12/07/2022"
6+
ms.reviewer: randolphwest
7+
ms.date: 04/17/2025
78
ms.service: sql
89
ms.subservice: backup-restore
910
ms.topic: how-to
@@ -12,21 +13,21 @@ helpviewer_keywords:
1213
---
1314
# Restore the master database (Transact-SQL)
1415

15-
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
16+
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
1617

17-
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).
1828

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-
2829
From a command prompt, run the following commands, and make sure you replace `MSSQLXX.instance` with the appropriate folder name:
29-
30+
3031
```console
3132
cd C:\Program Files\Microsoft SQL Server\MSSQLXX.instance\MSSQL\Binn
3233
sqlservr -c -f -s <instance> -mSQLCMD
@@ -35,52 +36,51 @@ helpviewer_keywords:
3536
- The `-mSQLCMD` parameter ensures that only **sqlcmd** can connect to SQL Server.
3637
- For a default instance name, use `-s MSSQLSERVER`
3738
- `-c` starts SQL Server as an application to bypass Service Control Manager to shorten startup time
38-
39+
3940
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).
4041

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:
4243

4344
```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;
4552
```
4653

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 &#40;SQL Server Configuration Manager&#41;](../../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.
5760

61+
1. Continue other recovery steps such as restoring other databases, attaching databases, and correcting user mismatches.
5862

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
6364

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.
6868

6969
```console
70-
C:\> sqlcmd
71-
1> RESTORE DATABASE master FROM DISK = 'Z:\SQLServerBackups\master.bak' WITH REPLACE;
72-
2> GO
73-
```
74-
75-
## See Also
76-
77-
[Complete Database Restores &#40;Simple Recovery Model&#41;](../../relational-databases/backup-restore/complete-database-restores-simple-recovery-model.md)
78-
[Complete Database Restores &#40;Full Recovery Model&#41;](../../relational-databases/backup-restore/complete-database-restores-full-recovery-model.md)
79-
[Troubleshoot Orphaned Users &#40;SQL Server&#41;](../../sql-server/failover-clusters/troubleshoot-orphaned-users-sql-server.md)
80-
[Database Detach and Attach &#40;SQL Server&#41;](../../relational-databases/databases/database-detach-and-attach-sql-server.md)
81-
[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 Up and Restore of System Databases &#40;SQL Server&#41;](../../relational-databases/backup-restore/back-up-and-restore-of-system-databases-sql-server.md)
85-
[RESTORE &#40;Transact-SQL&#41;](../../t-sql/statements/restore-statements-transact-sql.md)
86-
- [Start SQL Server in Single-User Mode](../../database-engine/configure-windows/start-sql-server-in-single-user-mode.md)
70+
C:\> sqlcmd
71+
1> RESTORE DATABASE master FROM DISK = 'Z:\SQLServerBackups\master.bak' WITH REPLACE;
72+
2> GO
73+
```
74+
75+
## Related content
76+
77+
- [Complete Database Restores (Simple Recovery Model)](complete-database-restores-simple-recovery-model.md)
78+
- [Complete Database Restores (Full Recovery Model)](complete-database-restores-full-recovery-model.md)
79+
- [Troubleshoot orphaned users (SQL Server)](../../sql-server/failover-clusters/troubleshoot-orphaned-users-sql-server.md)
80+
- [Database detach and attach (SQL Server)](../databases/database-detach-and-attach-sql-server.md)
81+
- [Rebuild system 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 up and restore: System databases (SQL Server)](back-up-and-restore-of-system-databases-sql-server.md)
85+
- [RESTORE Statements (Transact-SQL)](../../t-sql/statements/restore-statements-transact-sql.md)
86+
- [Single-user mode for SQL Server](../../database-engine/configure-windows/start-sql-server-in-single-user-mode.md)

0 commit comments

Comments
 (0)