Rename a SQL Server database

  • Comments posted to this topic are about the item Rename a SQL Server database

  • I run into this a lot. What about the file names (physical and logical)? Say, for example you rename a database to indicate an edition or vintage and you plan to reuse the old database name; won't renaming the database leave you with the old mdf/ldf and logical files in place but now being accessed by a "new" (i.e., renamed) database?

    Agreed, this example is perhaps a less than ideal way to make editions of databases, say for certified tax rolls for each year. But regardless of whether one plans to use the "old" database name again on the server, one should explicitly keep track of the logical and physical file names.

    Thanks for posting the code.

    Cheers!

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

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