Solved

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

Posted on 2011-02-16
2
1,096 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 39

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now