ssms - Rename database data file in SQL Server 2005 -


I need to rename the database data file. Is this possible through SQL Server Management Studio?

FYI, I do not have the built-in box allowed.

EDIT: I also need to change the location of the file.

Yes, you can do this, as long as you have the right to separate and re-attach the database , And as long as you physically rename files on the disk:

1) Issues these commands

  ALTER DATABASE Modify your database file (NAME) = Logical_file_name, FILENAME = 'your-new-file-on- (As a DCGET commentary:' Your new file-on-disk.mdf 'should be a full file name - this includes paths -  

2) Separate the database

3) Rename the file to disk

4) Re-attach the database Then


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -