Solved

logical file name is different  in sys.database_files vs sys.master_files

Posted on 2011-02-16
2
1,203 Views
Last Modified: 2012-05-11
The logical name of a database file went out sync after running following statement.

ALTER DATABASE UserDataBase MODIFY FILE (NAME = 'FileNameOld', NEWNAME = 'FileNameNew')

It updated the name column of sys.master_files table correctly to "FileNameNew" but the name column of sys.Database_files table remained as "FileNameOld".

Does anyone know the cause of it and how to fix the problem? Thanks in advance.
0
Comment
Question by:Merion
2 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 500 total points
ID: 34907405
You need to do a SQL server service re-start for the change to take place but it may be tricky in cluster environment. If your db is attached to a SQL server not a SQL cluster then restart should do it.
0
 

Author Closing Comment

by:Merion
ID: 34921109
That was it. Thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question