Database logical file naming question

  • No problem, just a question and maybe it's because I've led a sheltered life. At the company that I recently began employment at, the database logical names are the same for all databases but, of course, the physical names are different. Is this a common practice in the real world? Pros, cons?

    -- You can't be late until you show up.

  • Meaning you have two databases with the same logical name?

    I've never messed with the logical name. Just let it go along with the physical based on defaults.

  • Actually, about a dozen databases on one server have the same logical name. I had never messed with the names before, always accepting the defaults on create. And I was thinking, I was at my last position for a LONG time and that was how I did things. Now I'm at a new employer and they have done things differently than I did. That got me thinking " What is the proper approach?". I can understand from a restore perspective, using EM, you wouldn't have to change the logical name but I was also thinking that this could lead to some confusion or potential problems if they all have the same logical name. I don't know, I'm just trying to get a handle on a new environment and some things are raising flags as it's not the way I have done things in the past. Maybe I'm being overly anal/critical???

    -- You can't be late until you show up.

  • Hi all,

    I'm having the same issue, but I'm experiencing the issue with these dbs having the same logical name. I'm attempting to configure log shipping for over 100 dbs and they all have the same logical name, so when I attempt to configure log shipping I get the error that this dbs already exists and cannot be over-written. Any help or clarification about the usage of logical db names vs physical db name would be greatly appreciated. Thanks.....

  • Databases only have one name. It's files that have logical and physical names. Physical name of the file - file name in the file system. Logical name of the file, unique within the DB and just used by SQL to refer to that file.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • reggie burns-317942 (12/16/2011)


    Hi all,

    I'm having the same issue, but I'm experiencing the issue with these dbs having the same logical name. I'm attempting to configure log shipping for over 100 dbs and they all have the same logical name, so when I attempt to configure log shipping I get the error that this dbs already exists and cannot be over-written. Any help or clarification about the usage of logical db names vs physical db name would be greatly appreciated. Thanks.....

    don't use the log shipping wizard to do the initial database restore, do it manually and use the with move option

    ---------------------------------------------------------------------

  • I wouldn't say its a common practice, but the logical name is not really that important except perhaps for clarity within sys.master_files and making restores more straight forward.

    I would guess these databases have all been created from one root database rather than through a create database statement.

    If these databases are not related to each other its probably not best practice, their identical logical file naming makes it a bit easier to overwrite the database with the wrong backup.

    ---------------------------------------------------------------------

  • You are correct on that. They are all created with a comment database script, but I'm think there could be some issues with Replicating and or migrating these databases. Any suggestion or insight? Thanks.

  • Can you explain alittle further about the suggested process? Thanks.

  • reggie burns-317942 (12/16/2011)


    Can you explain alittle further about the suggested process? Thanks.

    pls starrt a new thread so we don't hijack this one

    ---------------------------------------------------------------------

Viewing 10 posts - 1 through 9 (of 9 total)

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