Database alter

  • Whats the best way to delete a filegroup from a database and alter it.

  • Before removing a filegroup, you need to know which files are in this filegroup and empty these files and then remove them.

  • the filegroup is empty but still deleting it from enterprise manager doesnt work. if i delete the .ndf file from HD it shows a sharing violation although there arent any connections to the database. any help??

  • If i have a DB with 2 files on 2 diff filegroup and i need to alter the DB to have 2nd file point to 1st filegroupname. Is this the right approach.

    alter database xyz

    modify filegroup 2nd fgname, 1st fgname

  • Use pubs as example. I have added second filegroup (secondgroup) and senond file (pubs2) to the secondgroup. Now, run following commands to remove the second filegroup.

    dbcc shrinkfile(pubs2, emptyfile)

    alter database pubs remove file pubs2

    alter database pubs remove filegroup SecondGroup

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

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