renaming logical file names

  • Is there any danger with renaming the LOGICAL file names behind the database?

    There are a bunch of databases that were restored copies and all of them have the same logical database file name. I'm trying to get some growth data so I want the logical files to be different (prefer them to match the actual database name) so I can more easily identify them.

    For instance:

    database_id name type_desc name physical_name

    1 DLMdb1 ROWS DLMDB1 D:\dlmdb1.mdf

    1 DLMdb1 LOG DLMDB1_log E:\dlmdb1.ldf

    2 DLMdb2 ROWS DLMDB1 D:\dlmdb2.mdf

    2 DLMdb2 LOG DLMDB1_log E:\dlmdb2.ldf

    3 DLMdb3 ROWS DLMDB1 D:\dlmdb3.mdf

    3 DLMdb3 LOG DLMDB1_log E:\dlmdb3.ldf

    Am I safe to rename the logical names? I can't think of anything that references those logical file names that I would be breaking [backups, applications].

    Thanks!

  • You should have no problem changing the logical names, except maybe for some scripted restores that have a MOVE clause using the logical name.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.

  • If you've automated any restore operations to test your backups or move data around for development or QA, that would be the one place. But, as you say, applications and backups, they'll be fine.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks for the confirmation. I'll let you know if I see anything blow up!

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

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