Not able to remove the file from db

  • When I try to remove the file from the database and I got the below error

    Server: Msg 5009, Level 16, State 3, Line 1

    ALTER DATABASE failed. Some disk names listed in the statement were not found. Check that the names exist and are spelled correctly before rerunning the statement.

    Pls suggest


    Kindest Regards,

    karthik

  • karthikeyan (3/11/2009)


    When I try to remove the file from the database and I got the below error

    Server: Msg 5009, Level 16, State 3, Line 1

    ALTER DATABASE failed. Some disk names listed in the statement were not found. Check that the names exist and are spelled correctly before rerunning the statement.

    Pls suggest

    Can you post the statement you are executing?

  • Select the exact file name by using

    select * from sysfiles.

  • ALTER DATABASE [Sales] REMOVE FILE [INDEXES]

    ALTER DATABASE [Sales] REMOVE FILEGROUP [INDEXES]

    Both are not working....

    Thanks,


    Kindest Regards,

    karthik

  • Hope you are not trying to remove the primary file.

    Please post the error you got .

  • karthikeyan (3/11/2009)


    ALTER DATABASE [Sales] REMOVE FILE [INDEXES]

    ALTER DATABASE [Sales] REMOVE FILEGROUP [INDEXES]

    Both are not working....

    Thanks,

    Did you check whether these files exist at all? it should be a minor mistake you are doing. Is it the right database?

  • Server: Msg 5009, Level 16, State 3, Line 1

    ALTER DATABASE failed. Some disk names listed in the statement were not found. Check that the names exist and are spelled correctly before rerunning the statement.


    Kindest Regards,

    karthik

  • Hi karthikeyan,

    In order for us to achieve a better understanding of your environment/configuration, would you be so kind as to post the details for all files and filegroups that makeup the database in question.

    Please post the results of the query

    sp_helpdb 'DatabaseName'

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

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