SQL Server Performance

Changing DB logical filename

Discussion in 'General DBA Questions' started by eklpublic, May 12, 2004.

  1. eklpublic New Member


    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?
  2. Raulie New Member

    ALTER DATABASE DatabaseName
    MODIFY FILE (NAME = logical_file_name, NEWNAME = new_logical_name)
  3. Raulie New Member

    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. <img src='/community/emoticons/emotion-1.gif' alt=':)' />
  4. Argyle New Member

    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.
  5. Raulie New Member

    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.

Share This Page