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
Copy file name to clipboardExpand all lines: support/sql/database-engine/backup-restore/backup-restore-operations.md
+40-5Lines changed: 40 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,6 @@ Backup and restore operations are I/O intensive. Backup/Restore throughput depen
46
46
| [2820470 Delayed error message when you try to access a shared folder that no longer exists in Windows](https://support.microsoft.com/help/2820470)|Discusses an issue that occurs when you try to access a shared folder that no longer exists in Windows 2012 and later versions.|
47
47
| [967351 A heavily fragmented file in an NTFS volume may not grow beyond a certain size](https://support.microsoft.com/help/967351)|Discusses an issue that occurs when an NTFS file system is heavily fragmented.|
48
48
| [304101 Backup program is unsuccessful when you back up a large system volume](https://support.microsoft.com/help/304101)||
49
-
| [2455009 FIX: Slow performance when you recover a database if there are many VLFs inside the transaction log in SQL Server 2005, in SQL Server 2008 or in SQL Server 2008 R2](https://support.microsoft.com/help/2455009)|The presence of many virtual log files could affect the required time to restore a database. This is especially true during the recovery phase of the restore operation. For information about other possible issues that can be caused by the presence of many VLFs, see [Database operations take a long time to complete, or they trigger errors when the transaction log has numerous virtual log files](https://support.microsoft.com/help/2028436).|
50
49
|A backup or restore operation to a network location is slow|Isolate the issue to the network by trying to copy a similarly sized file to the network location from the server that's running SQL Server. Verify the performance.|
51
50
52
51
2. Check for error messages in the SQL Server error log and Windows event log for more pointers about the cause of the problem.
@@ -57,10 +56,14 @@ Backup and restore operations are I/O intensive. Backup/Restore throughput depen
57
56
58
57
## Issues that affect database restoration between different SQL Server versions
59
58
59
+
**Symptoms:**
60
+
60
61
A SQL Server backup can't be restored to an earlier version of SQL Server than the version at which the backup was created. For example, you can't restore a backup that's taken on a SQL Server 2019 instance to a SQL Server 2017 instance. Otherwise, the following error message appears:
61
62
62
63
> Error 3169: The database was backed up on a server running version %ls. That version is incompatible with this server, which is running version %ls. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server.
63
64
65
+
**Resolution:**
66
+
64
67
Use the following method to copy a database that's hosted on a later version of SQL Server to an earlier version of SQL Server.
65
68
66
69
> [!NOTE]
@@ -83,18 +86,24 @@ For more information about how to generate scripts for your database, see [Scrip
83
86
84
87
## Backup job issues in Always On environments
85
88
86
-
If you encounter problems that affect backup jobs or maintenance plans in Always On environments, note the following:
89
+
**Symptoms:**
90
+
91
+
You encounter problems that affect backup jobs or maintenance plans in Always On environments.
92
+
93
+
**Resolution:**
87
94
88
95
- By default, the automatic backup preference is set to **Prefer Secondary**. This specifies that backups should occur on a secondary replica - except if the primary replica is the only replica online. You can't take differential backups of your database by using this setting. To change this setting, use SSMS on your current primary replica, and navigate to **Backup Preferences** page under **Properties** of your availability group.
89
96
- If you're using a maintenance plan or scheduled jobs to generate backups of your databases, make sure to create the jobs for each availability database on every server instance that hosts an availability replica for the availability group.
90
97
91
-
For more information about backups in an Always On environment, see the following topics:
98
+
For more information about backups in an Always On environment, see the following articles:
92
99
93
100
- [Configure backups on secondary replicas of an Always On availability group](/sql/database-engine/availability-groups/windows/configure-backup-on-availability-replicas-sql-server)
94
101
- [Offload supported backups to secondary replicas of an availability group](/sql/database-engine/availability-groups/windows/active-secondaries-backup-on-secondary-replicas-always-on-availability-groups)
95
102
96
103
## Media-related errors when you restore a database from a backup
97
104
105
+
**Symptoms:**
106
+
98
107
If you receive error messages that indicate a file issue, this is symptomatic of a corrupted backup file. The following are some examples of errors that you could get if a backup set is corrupted:
99
108
100
109
- > 3241: The media family on device '%ls' is incorrectly formed. SQL Server cannot process this media family.
@@ -104,8 +113,12 @@ If you receive error messages that indicate a file issue, this is symptomatic of
104
113
> [!NOTE]
105
114
> You can use the [Restore Header](/sql/t-sql/statements/restore-statements-headeronly-transact-sql) statement to check your backups.
106
115
116
+
**Cause:**
117
+
107
118
These issues can occur because of issues that affect the underlying hardware (hard disks, network storage, and so on) or that are related to a virus or malware. Review Windows System event logs and hardware logs for reported errors, and take appropriate action (for example, upgrade firmware or fix networking issues).
108
119
120
+
**Resolution:**
121
+
109
122
To prevent these errors, enable the **Backup CHECKSUM** option when you run a backup to avoid backing up a corrupted database. For more information, see [Possible Media Errors During Backup and Restore (SQL Server)](/sql/relational-databases/backup-restore/possible-media-errors-during-backup-and-restore-sql-server).
110
123
111
124
You can also enable trace flag 3023 to enable a checksum when you run backups by using backup tools. For more information, see [How to enable the CHECKSUM option if backup utilities don't expose the option](https://support.microsoft.com/topic/how-to-enable-the-checksum-option-if-backup-utilities-do-not-expose-the-option-0d5efb4c-5dfc-0122-c7e3-312a5dd5af3b).
@@ -117,6 +130,8 @@ To fix these issues, you have to either locate another usable backup file or cre
117
130
118
131
## Backups fail because of permissions issues
119
132
133
+
**Symptoms:**
134
+
120
135
When you try to run database backup operations, one of the following errors occurs.
121
136
122
137
- **Scenario 1**: When you run a backup from SQL Server Management Studio, the backup fails and returns the following error message:
@@ -135,8 +150,12 @@ When you try to run database backup operations, one of the following errors occu
135
150
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
136
151
```
137
152
153
+
**Cause:**
154
+
138
155
Either of these scenarios can occur if the SQL Server service account doesn't have Read and Write permissions to the folder that backups are being written to. Backup statements can be run either as part of a job step or manually from SQL Server Management Studio. In either case, they always run under the context of the SQL Server Service startup account. Therefore, if the service account doesn't have the necessary privileges, you receive the error messages that were noted earlier.
139
156
157
+
**Resolution:**
158
+
140
159
For more information, see [Backup Devices](/sql/relational-databases/backup-restore/backup-devices-sql-server).
141
160
142
161
> [!NOTE]
@@ -168,23 +187,39 @@ SQL Server provides a Virtual Backup Device Interface (VDI) tool. This API enabl
168
187
169
188
## Backups might fail if change tracking is enabled
170
189
190
+
**Symptoms:**
191
+
171
192
Backups might fail if change tracking is enabled on the databases and returns errors that resemble the following one:
172
193
173
194
> "Error: 3999, Severity: 17, State: 1.
174
195
> \<Time Stamp\> spid \<spid\> Failed to flush the commit table to disk in dbid 8 due to error 2601. Check the error log for more information."
175
196
197
+
**Resolution:**
198
+
176
199
To solve the issue, see the following articles:
177
200
178
201
- [2682488 FIX: Backup operation fails in a SQL Server 2008, in a SQL Server 2008 R2 or in a SQL Server 2012 database after you enable change tracking](https://support.microsoft.com/help/2682488)
179
202
- [2603910 FIX: Backup fails in SQL Server 2008, in SQL Server 2008 R2 or in SQL Server 2012 if you enable change tracking on the database](https://support.microsoft.com/help/2603910)
180
203
181
204
## Issues restoring backups of encrypted databases
182
205
183
-
If you encounter issues when restoring backups of encrypted databases, see [Move a TDE Protected Database to Another SQL Server](/sql/relational-databases/security/encryption/move-a-tde-protected-database-to-another-sql-server).
206
+
**Symptoms:**
207
+
208
+
You encounter issues when restoring backups of encrypted databases.
209
+
210
+
**Resolution:**
211
+
212
+
To solve the issue, see [Move a TDE Protected Database to Another SQL Server](/sql/relational-databases/security/encryption/move-a-tde-protected-database-to-another-sql-server).
184
213
185
214
## Fail to restore a CRM backup from the Enterprise edition
186
215
187
-
If you fail to restore a CRM backup from the Enterprise edition on a Standard edition, see [2567984 "Database cannot be started in this edition of SQL Server" error when restoring a Microsoft Dynamics CRM database](https://support.microsoft.com/help/2567984).
216
+
**Symptoms:**
217
+
218
+
You fail to restore a CRM backup from the Enterprise edition on a Standard edition.
219
+
220
+
**Resolution:**
221
+
222
+
To solve the issue, see [2567984 "Database cannot be started in this edition of SQL Server" error when restoring a Microsoft Dynamics CRM database](https://support.microsoft.com/help/2567984).
188
223
189
224
## FAQ about SQL Server backup and restore operations
By using the exec subsystem command approach, you add verbose console logging switches to the SSIS command line to call the Dtexec.exe SSIS command-line executable file. Additionally, you use the Advanced job feature of the output file. You can also use the **Include Step Output in the history** option to redirect the logging information to a file or to the SQL Server Agent Job History.
93
93
94
-
The following is an example of a command line:
94
+
Here is an example of a command line:
95
95
96
96
```console
97
97
dtexec.exe /FILE "C:\_work\SSISPackages\ProtectionLevelTest\ProtectionLevelTest\AgentTesting.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V /CONSOLELOG NCOSGXMT
98
98
```
99
99
100
-
The console logging returns details that resemble the following:
100
+
The console logging returns details that resemble the following messages:
101
101
102
102
```output
103
103
Error: 2006-04-27 18:13:34.76 Code: 0xC0202009 Source: AgentTesting Connection manager "(local).msdb" Description: An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D Description: "Login failed for user 'DOMAINNAME\username'.". End Error
You may receive an error message similar to the following when using SQL Server Management Studio (SSMS)
16
+
You might receive an error message similar to the following one when using SQL Server Management Studio (SSMS):
17
17
18
18
> Failed to retrieve data for this request (Microsoft.SqlServer.Management.sdk.sfc)
19
19
20
-
## Cause and resolution
20
+
## Troubleshooting
21
21
22
-
There can be multiple causes that can contribute to this problem. The following items may help you understand and troubleshoot the issue:
22
+
There can be multiple symptoms that can contribute to this problem. The following items may help you understand and troubleshoot the issue:
23
23
24
-
- Check if you are running into any known issues listed below and use the resolutions documented in the corresponding articles:
24
+
-**Symptom 1:**
25
+
26
+
You might run into known issues in the following articles:
25
27
26
28
-[SQL Server 2016 Agent fails to start or “Failed to retrieve data” error when you try to read error log from SSMS 2016](https://support.microsoft.com/help/3185365)
27
29
28
30
-[KB4550657 - FIX: Error occurs when you interact with SQL Server Agent in SQL Server 2019](https://support.microsoft.com/help/4550657)
29
31
30
-
- You can run into this issue if are using an older version of SSMS and when one of the following conditions is true:
32
+
**Resolution:**
33
+
34
+
To solve the known issues, see the resolutions documented in the corresponding articles above.
35
+
36
+
-**Symptom 2:**
37
+
38
+
You can run into this issue if using an older version of SSMS and when one of the following conditions is true:
31
39
32
40
- SQL Server Management Studio cannot correctly read one or more databases. Therefore, certain properties of a database cannot be retrieved.
33
41
34
-
- One or more databases is in an offline mode and you are using an older version of SSMS to connect to that SQL instance hosting this offline database.
42
+
- One or more databases is in an offline mode and you're using an older version of SSMS to connect to that SQL instance hosting this offline database.
43
+
44
+
In these situations, the collection of objects doesn't appear in the **Object Explorer** pane or in the **Object Explorer Details** pane. Therefore, certain properties of the database aren't computed as a group in the collection of objects.
35
45
36
-
In these situations, the collection of objects does not appear in the **Object Explorer** pane or in the **Object Explorer Details** pane. Therefore, certain properties of the database are not computed as a group in the collection of objects.
46
+
> [!NOTE]
47
+
> This problem also occurs if you're not a member of the Sysadmins group.
37
48
38
-
> [!NOTE]
39
-
> This problem also occurs if you are not a member of the Sysadmins group.
49
+
**Resolution:**
40
50
41
-
To work around this problem, using the older version of SSMS follow these steps:
51
+
To work around this problem, follow these steps:
42
52
43
-
1. Close the error message.
53
+
1. Close the error message.
44
54
45
-
2. Press **F7** to open theObject Explorer Detailspane.
55
+
2. Press **F7** to open the**Object Explorer Details**pane.
46
56
47
-
3. Right-click the column headers, and make sure that only the following columns are selected:
57
+
3. Right-click the column headers, and make sure that only the following columns are selected:
48
58
49
59
- Name
50
60
@@ -54,8 +64,7 @@ There can be multiple causes that can contribute to this problem. The following
54
64
55
65
- Owner
56
66
57
-
4. Right-click theDatabasesnode, and then click Refresh.
67
+
4. Right-click the**Databases**node, and then select **Refresh**.
58
68
59
-
Alternatively, you can download and install SSMS from [Download SQL Server Management Studio (SSMS)](/sql/ssms/download-sql-server-management-studio-ssms) and see if the issue goes away. If the issue still occurs with new version of SSMS, see [SQL Server help and feedback](/sql/sql-server/sql-server-get-help) for additional ways to get assistance with your issue.
69
+
Alternatively, you can download and install SSMS from [Download SQL Server Management Studio (SSMS)](/sql/ssms/download-sql-server-management-studio-ssms) and see if the issue goes away. If the issue still occurs with new version of SSMS, see [SQL Server help and feedback](/sql/sql-server/sql-server-get-help) for additional ways to get assistance with your issue.
60
70
61
-
- You are connecting to a SQL Server 2008 R2 or an earlier version of SQL Server and when guest user is disabled in the msdb database. For additional information review [You should not disable the guest user in the msdb database in SQL Server](https://support.microsoft.com/help/2539091)
0 commit comments