alter database is not happening in sqlserver 2000

  • Hi all,

    I am using sql server 2000

    I am trying to use alter database option to move datafiles.

    But it showed me error below-

    Server: Msg 5037, Level 16, State 1, Line 1

    MODIFY FILE failed. Do not specify physical name.

    Look at the my qry

    ALTER DATABASE NewTestDB

    MODIFY FILE (NAME = NewTestDB_Data, FILENAME = 'D:\SQLData\NewTestDB_Data.mdf');

    ALTER DATABASE NewTestDB

    MODIFY FILE (NAME = NewTestDB_Log, FILENAME = 'D:\SQLData\NewTestDB_Log.ldf');

    Whats wrong in this?

    Pls let me know why alter database is not happening.

    [font="Verdana"]Regards,

    Pritam Salvi
    SQL DBA
    Mumbai. India[/font]

  • The ALTER DATABASE ... MOVE was not an option for any database other than TempDB on SQL 2000.

    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
  • Thanks for reply.

    Is there any way to do that except of doing detach/atach while copying from windows.

    [font="Verdana"]Regards,

    Pritam Salvi
    SQL DBA
    Mumbai. India[/font]

  • I want to move data/log files from C drive to E drive.

    Is there any other option in SQL Server 2000 except of detach/atach

    [font="Verdana"]Regards,

    Pritam Salvi
    SQL DBA
    Mumbai. India[/font]

  • Nope.

    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
  • Nope. Sorry, you have to detach/attach. You do not have to do it through the GUI though; you can use SPs to accomplish it if you were wanting to script it out.

    How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server

    Joie Andrew
    "Since 1982"

Viewing 6 posts - 1 through 5 (of 5 total)

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