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
2 comments
-
Hi Jonas
Did you solve your problem with custom filegroups? -
Yes, in removed the usage of custom file groups for text/image columns, for internal usage.
Steps to clean up 'MyTable':- Drop keys for 'MyTable' (ForeignKey + PrimaryKeyUnique)
- Rename table (
exec sp_rename 'MyTable', 'MyTableOld';
) - Create new table on default (
textimage_on [PRIMARY]
) - Copy data to new table
(insert into dbo.MyTable (x, y, z) select x, y, z from dbo.MyTableOld;
) - Add keys to new table (PrimaryKeyUnique + ForeignKey)
- Add default constraints and documentation (same as MyTableOld)
- Drop old table (
drop table [dbo].[MyTableOld];
) - Empty custom file (
dbcc shrinkfile (MyFileName, emptyfile);
) - Remove file (
alter database DDM_Content remove file MyFileName;
) - Remove file group (
alter database DDM_Content remove filegroup MyFileGroupName;
)
At customer site use custom file groups as before.
Add comment
Please sign in to leave a comment.