Thursday, September 25, 2008

MODIFY LOGICAL NAME IN SQL SERVER

To modify the logical name of a data file or a log file in SQL Server, specify the logical file name you want to rename by using the Name parameter and then specify the new logical name for the file by using the NewName parameter. To rename the logical file, run the following T-SQL statement:

ALTER DATABASE database_name MODIFY FILE ( NAME = current_logical_name, NEWNAME = new_logical_name)

No comments:

Post a Comment