October 5, 2015 at 8:27 am
I restored a copy of a database from a 2008r2 instance to a 2014 instance that is clustered with a different database name. Now the logical name for the log file does not match when I query sys.master_files and sys.database_files. Sys.master_files is showing the original log file name. How can I fix this? When I try to use alter database modify file it says the name does not exist. The instance was restarted before the database was added to an always on group.
October 5, 2015 at 8:45 am
IIRC you need to restart the instance after the restore. Might be tricky with Always On, might have to take all the servers offline.
October 13, 2015 at 6:10 am
The instance has been restarted. Both before it was added to the always on group and after.
October 13, 2015 at 6:56 am
I found this link that said renaming the database to a temporary name and then renaming it back to what it is now will fix the issue. Does anyone have any other suggestions?
http://jamessql.blogspot.com/2012/09/change-file-logical-name-for-mirror.html
December 12, 2016 at 7:32 am
I had this same issue. The DB rename didn't work, but this did.
Right click on DB, Properties, Files and I changed the Logical Log Name to something completely different. This updates in both places. Then I changed it back again to what it actually should be.
Making the logical log names the same fixed my false SCOM alert that kept saying the database was running out of log file space (when it wasn't).
December 12, 2016 at 8:06 am
https://msdn.microsoft.com/en-us/library/bb522469.aspx
To modify the logical name of a data file or log file, specify the logical file name to be renamed in the NAME clause, and specify the new logical name for the file in the NEWNAME clause. For example:
MODIFY FILE ( NAME = logical_file_name, NEWNAME = new_logical_name )
December 15, 2016 at 5:19 am
This was removed by the editor as SPAM
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply