Options

Using custom filegroups

We run a database CI project in Jenkins, with DLM Autmation plugin. One database has custom filegroups, and can't be created. The databases is stored in Subversion.
What to do?
Use a pre-create script? Like in forum query FileGroup support? (Where to save/handle that script?)
Use a post-alter script? (Where to save/handle that script?)



Comments

  • Options
    Hi Jonas
    Did you solve your problem with custom filegroups?
  • Options
    JonasGJonasG Posts: 11 Bronze 1
    Yes, in removed the usage of custom file groups for text/image columns, for internal usage.

    Steps to clean up 'MyTable':
    1. Drop keys for 'MyTable' (ForeignKey + PrimaryKeyUnique)
    2. Rename table (exec sp_rename 'MyTable', 'MyTableOld';)
    3. Create new table on default (textimage_on [PRIMARY])
    4. Copy data to new table
      (insert into dbo.MyTable (x, y, z) select x, y, z from dbo.MyTableOld;)
    5. Add keys to new table (PrimaryKeyUnique + ForeignKey)
    6. Add default constraints and documentation (same as MyTableOld)
    7. Drop old table (drop table [dbo].[MyTableOld];)
    8. Empty custom file (dbcc shrinkfile (MyFileName, emptyfile);)
    9. Remove file (alter database DDM_Content remove file MyFileName;)
    10. Remove file group (alter database DDM_Content remove filegroup MyFileGroupName;)
    In repository, no file groups.
    At customer site use custom file groups as before.
Sign In or Register to comment.