Changing DB logical filename

Last post 05-13-2004 9:35 AM by Raulie. 4 replies.
Page 1 of 1 (5 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 05-12-2004 3:40 PM

    Changing DB logical filename


    I restore .bak to different server with new dbname in EM but it kept the old logical filename. How can I update the logical filename to new name?
  • 05-12-2004 3:55 PM In reply to

    • Raulie
    • Top 50 Contributor
    • Joined on 12-18-2003
    • Mexico
    • Posts 571
    • Moderator

    Re: Changing DB logical filename

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



  • 05-12-2004 3:58 PM In reply to

    • Raulie
    • Top 50 Contributor
    • Joined on 12-18-2003
    • Mexico
    • Posts 571
    • Moderator

    Re: Changing DB logical filename

    By the way if you are going to perform other modifications to the database useing ALTER DATBASE, it is recommended you use multiple ALTER DATABASE statments for optimal performance. :)
    Raulie



  • 05-13-2004 2:05 AM In reply to

    Re: Changing DB logical filename

    Note that the Alter Database statment only work on SQL 2000. There is no supported way to change logical filename in SQL 7 and below. Having different logical filename on a database doesn't impact functionality.
  • 05-13-2004 9:35 AM In reply to

    • Raulie
    • Top 50 Contributor
    • Joined on 12-18-2003
    • Mexico
    • Posts 571
    • Moderator

    Re: Changing DB logical filename

    True but it could confuse some one, so if you are running 2000 I would go ahead and change the file name as well it wont hurt.
    Raulie



Page 1 of 1 (5 items)
Active Topics   My Discussions    Unanswered Posts


© 2010 Jude O'Kelly All Rights Reserved.