Missing mdf extension for database file

  • I have a database in SQL2k (sp3) which is named CodeEnf.  Since I am trying to write some documentation I would like to change the name to CodeEnf.mdf.  I'm not sure how the extension was left off when it was created.  What would be the best way to accomplish this?

    Sue

  • I haven't looked it up, but Alter,Database, and File are the three search words for BOL that comes to mind. Or if that doesn't do the trick, then a restore with a move will allow you rename those files to anything you'd like them to be. If both work, then whichever you want to do would be fine. I don't believe there's a convention on what way is "best" in this circumstance. I do agree that adding the .mdf extension to the file is "best" practice.

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

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