Change Logical File Name

  • Is there a way to change the Logical File Names for a Database?

    I'm talking about the FILE_NAME.

    If I have a Database called Boo and this Database has 1 Database file and 1 Transaction Log file like below. How do I change the File Name to another File Name?

    File Name                        Physical Name

    Boo_dat                       Boo.mdf

    Boo_log                        Boo.ldf


    Kindest Regards,

  • If you are using SS 2000 or later, this should work for you.

    ALTER DATABASE DatabaseName MODIFY FILE ( NAME = logical_file_name, NEWNAME = new_logical_name )

  • I'm on SQL Server 2000. Thanks for that.


    Kindest Regards,

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply