Using custom filegroups
JonasG
Posts: 11 Bronze 1
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
Did you solve your problem with custom filegroups?
Steps to clean up 'MyTable':
- Drop keys for 'MyTable' (ForeignKey + PrimaryKeyUnique)
- Rename table (
- Create new table on default (
- Copy data to new table
- Add keys to new table (PrimaryKeyUnique + ForeignKey)
- Add default constraints and documentation (same as MyTableOld)
- Drop old table (
- Empty custom file (
- Remove file (
- Remove file group (
In repository, no file groups.exec sp_rename 'MyTable', 'MyTableOld';
)textimage_on [PRIMARY]
)(
insert into dbo.MyTable (x, y, z) select x, y, z from dbo.MyTableOld;
)drop table [dbo].[MyTableOld];
)dbcc shrinkfile (MyFileName, emptyfile);
)alter database DDM_Content remove file MyFileName;
)alter database DDM_Content remove filegroup MyFileGroupName;
)At customer site use custom file groups as before.