Applies ToSQL Server 2008 Developer SQL Server 2008 Enterprise SQL Server 2008 Standard SQL Server 2008 Standard Edition for Small Business SQL Server 2008 Workgroup SQL Server 2008 R2 Developer SQL Server 2008 R2 Enterprise SQL Server 2008 R2 Standard SQL Server 2008 R2 Workgroup

Symptoms

Consider the following scenario:

  • You create a database in Microsoft SQL Server 2008 R2.

  • You update the logical name of the database by using the ALTER DATABASE statement.

  • You perform a full backup of the database. Note A full database backup file is generated after the backup is performed.

  • You try to restore the database from the database backup file.

In this scenario, you receive the following error message:

Msg 3234, Level 16, State 2, Line 1Logical file '<logical file name>' is not part of database '<database name>'. Use RESTORE FILELISTONLY to list the logical file names.Msg 3013, Level 16, State 1, Line 1RESTORE DATABASE is terminating abnormally.

If you use the RESTORE FILELISTONLY statement to check the backup file, you find that the logical file name that you updated is corrupted. The last character of the logical file name is truncated. For example, you try to update the logical name for a database to DB_modified. However, it is incorrectly changed to DB_modifie in the backup file.Note This issue does not occur if you restart the SQL Server service after the logical file name is updated.

Resolution

Cumulative update information

SQL Server 2008 R2

The fix for this issue was first released in Cumulative Update 6. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:

2489376 Cumulative Update package 6 for SQL Server 2008 R2 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=supportNote The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must have Microsoft SQL Server 2008 R2 installed.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

32-bit SQL Server 2008 R2 Database Services Core Instance

File name

File version

File size

Date

Time

Platform

atxcore.dll

2009.100.1755.0

26464

24-Dec-10

0:33

x86

datacollectorcontroller.dll

2009.100.1755.0

135520

24-Dec-10

0:33

x86

etwcls.mof

Not applicable

1116328

23-Dec-10

3:54

Not applicable

instmsdb.sql

Not applicable

2241260

22-Dec-10

20:49

Not applicable

mssqlsystemresource.ldf

Not applicable

524288

22-Dec-10

22:52

Not applicable

mssqlsystemresource.mdf

Not applicable

63569920

22-Dec-10

22:52

Not applicable

sql_engine_core_inst_keyfile.dll

2009.100.1755.0

13664

24-Dec-10

0:31

x86

sqlaccess.dll

2009.100.1755.0

415584

24-Dec-10

0:29

x86

sqlagent.exe

2009.100.1755.0

367968

24-Dec-10

0:34

x86

sqlagent100_msdb_upgrade.sql

Not applicable

2371245

23-Dec-10

3:53

Not applicable

sqlos.dll

2009.100.1755.0

14688

24-Dec-10

0:22

x86

sqlscriptdowngrade.dll

2009.100.1755.0

14688

24-Dec-10

0:21

x86

sqlscriptupgrade.dll

2009.100.1755.0

4611424

24-Dec-10

0:21

x86

sqlservr.exe

2009.100.1755.0

42904928

24-Dec-10

0:34

x86

sqsrvres.dll

2009.100.1755.0

89952

24-Dec-10

0:21

x86

64-bit SQL Server 2008 R2 Database Services Core Instance

File name

File version

File size

Date

Time

Platform

atxcore.dll

2009.100.1755.0

31584

23-Dec-10

23:40

x64

datacollectorcontroller.dll

2009.100.1755.0

262496

23-Dec-10

23:40

x64

etwcls.mof

Not applicable

1116328

23-Dec-10

3:54

Not applicable

instmsdb.sql

Not applicable

2241260

22-Dec-10

20:49

Not applicable

mssqlsystemresource.ldf

Not applicable

524288

22-Dec-10

22:52

Not applicable

mssqlsystemresource.mdf

Not applicable

63569920

22-Dec-10

22:52

Not applicable

sql_engine_core_inst_keyfile.dll

2009.100.1755.0

14176

23-Dec-10

23:40

x64

sqlaccess.dll

2009.100.1755.0

403296

23-Dec-10

23:38

x86

sqlagent.exe

2009.100.1755.0

428384

23-Dec-10

23:40

x64

sqlagent100_msdb_upgrade.sql

Not applicable

2371245

23-Dec-10

3:53

Not applicable

sqlos.dll

2009.100.1755.0

15712

23-Dec-10

23:37

x64

sqlscriptdowngrade.dll

2009.100.1755.0

15712

23-Dec-10

23:37

x64

sqlscriptupgrade.dll

2009.100.1755.0

4610912

23-Dec-10

23:37

x64

sqlservr.exe

2009.100.1755.0

61957984

23-Dec-10

23:40

x64

sqsrvres.dll

2009.100.1755.0

105824

23-Dec-10

23:37

x64

Itanium-architecture SQL Server 2008 R2 Database Services Core Instance

File name

File version

File size

Date

Time

Platform

atxcore.dll

2009.100.1755.0

63328

23-Dec-10

23:05

ia64

datacollectorcontroller.dll

2009.100.1755.0

477024

23-Dec-10

23:05

ia64

etwcls.mof

Not applicable

1116328

23-Dec-10

3:54

Not applicable

instmsdb.sql

Not applicable

2241260

22-Dec-10

20:49

Not applicable

mssqlsystemresource.ldf

Not applicable

524288

22-Dec-10

22:52

Not applicable

mssqlsystemresource.mdf

Not applicable

63569920

22-Dec-10

22:52

Not applicable

sql_engine_core_inst_keyfile.dll

2009.100.1755.0

19296

23-Dec-10

23:05

ia64

sqlaccess.dll

2009.100.1755.0

392032

23-Dec-10

23:01

x86

sqlagent.exe

2009.100.1755.0

1205600

23-Dec-10

23:09

ia64

sqlagent100_msdb_upgrade.sql

Not applicable

2371245

23-Dec-10

3:53

Not applicable

sqlos.dll

2009.100.1755.0

22368

23-Dec-10

22:56

ia64

sqlscriptdowngrade.dll

2009.100.1755.0

20832

23-Dec-10

22:56

ia64

sqlscriptupgrade.dll

2009.100.1755.0

4617056

23-Dec-10

22:56

ia64

sqlservr.exe

2009.100.1755.0

121762656

23-Dec-10

23:09

ia64

sqsrvres.dll

2009.100.1755.0

188768

23-Dec-10

22:56

ia64

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Workaround

To work around this issue, use one of the following two methods:

  • After the logical file name is modified, run the following statements to restart the database:ALTER DATABASE <database name> SET OFFLINEALTER DATABASE <database name> SET ONLINE

  • When you modify the logical file name, append a dummy space character in the new logical name. For example, if you want to change the logical name to DB_modified, use the following statement to modify the logical file name:ALTER DATABASE <database name> MODIFY FILE (NAME=N'<database name>', NEWNAME='DB_modified ') -- Append ' ' to NEWNAME

References

For more information about the ALTER DATABASE Transact-SQL statement, visit the following Microsoft Developer Network (MSDN) website:

General information about the ALTER DATABASE Transact-SQL statementFor more information about the RESTORE FILELISTONLY Transact-SQL statement, visit the following Microsoft Developer Network (MSDN) website:

General information about the RESTORE FILELISTONLY Transact-SQL statement

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.