Avamar: SQL restore fails "Logical file XX is not part of database XX Use RESTORE FILELISTONLY to list the logical file names"
Summary:
Avamar: SQL restore is failing with the error: Logical file '_log' is not part of database ''. Use RESTORE FILELISTONLY to list the logical file names
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
Avamar SQL restore is failing with the error:
Logical file '<LOGICAL_NAME>_log' is not part of database '<DB_NAME>'. Use RESTORE FILELISTONLY to list the logical file names.
Relevant portion of the log:
2017-08-01 14:11:06 avsql Error <40088>: sqlconnectimpl_smo::execute Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Logical file '<LOGICAL_NAME>_log' is not part of database '<DB_NAME>'. Use RESTORE FILELISTONLY to list the logical file names.
RESTORE DATABASE is terminating abnormally.
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(String sqlCommand, Boolean retry)
RESTORE DATABASE is terminating abnormally.
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteWithResults(String sqlCommand, Boolean retry)
Cause
The logical name of this specific database differs between sys.database_files and sys.master_files.
The logical file name of a database can be found from two places, sys.database_files and sys.master_files. Usually, these two should be showing the same, but if they go out of sync the issue occurs.
The logical file name of a database can be found from two places, sys.database_files and sys.master_files. Usually, these two should be showing the same, but if they go out of sync the issue occurs.
Resolution
Workaround (for previous backups):
Restore to a flat file
Permanent fix:
Restart SQL services
If logical name does not synch up after restart, change the logical name of '<LOGICAL_NAME>_log' to some other name and then rename it back to original using SSMS. This should ensure that the logical name is updated properly at both places.
Once the issue is fixed, the restore of new backups should work and this error should not be generated.
Restore to a flat file
Permanent fix:
Restart SQL services
If logical name does not synch up after restart, change the logical name of '<LOGICAL_NAME>_log' to some other name and then rename it back to original using SSMS. This should ensure that the logical name is updated properly at both places.
Once the issue is fixed, the restore of new backups should work and this error should not be generated.
Affected Products
AvamarProducts
Avamar, Avamar Plug-in for SQLArticle Properties
Article Number: 000062013
Article Type: Solution
Last Modified: 05 Mar 2025
Version: 4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.