Sql Server 2005

  • i have modified the model database physical file path by " alter database model modify file(name=modeldev ,filename ='d:\data\model' "

    I forget to mention data base name on the query after that i have stopped the server and located the data base file to the specified location .

    Problem is i have not mention the data base name(model.mdf) with the path because of that i am not able to start server .

    Any help will be appreciated .

  • Do you have any recent system backups... Is it possible to restore your system databases? I am thinking if you restore your sytems database to the one previous to the ALTER then you might be able to pick up to where it was before the change. Not sure have not been in those shoes but it only makes sense.. if you restore...master, model, and msdb to a "correct" date and original location then try again. Just a thought. 🙂 Hope it works

    -D-

    DHeath

  • i don't have backup ..is there any other way to change physical file location of database ?

  • Are you using SQL Server 2005?

    Do you have the Original file of the MSDB? Then please copy it over to the new location and give try. It is working for me.

    What error are you getting, while restarting the SQL Server ?

    Regards

    Vijai

  • Problem is i have not updated the file location with data base file name ....like 'd:\database' instead of 'd:\database\modle.mdf'

    FCB::Open: Operating system error 5(Access is denied.) occurred while creating or opening file 'D:\Master_Files\Model_Data'. Diagnose and correct the operating system error, and retry the operation.

  • sudhakara (10/6/2008)


    ...occurred while creating or opening file 'D:\Master_Files\Model_Data'...

    Looks like the SQL Engine tries to open the file 'D:\Master_Files\Model_Data', but it doesn't exist. Copy your msdb.mdf file to this location (and name) and give it a try.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • You can add these switches and restart SQL in minimal mode, then rerun the modify file cmd.

    -c -m -T3608

    Better still give this KB article a look on how to relocate files:

    http://support.microsoft.com/kb/224071

    Andrew

  • I think Andrew has the best idea, otherwise you need a backup.

    Lesson one: never alter master without a backup. or any database for that matter.

  • Thanks for your reply ..its working now...

Viewing 9 posts - 1 through 8 (of 8 total)

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