patternsqlModerate
In Memory Database Remove File and FileGroup
Viewed 0 times
filefilegroupdatabaseremovememoryand
Problem
I have a SQL Server 2016 database and I configured in-memory table.
I want to drop this configuration, then I drop that table.
When I want to delete that file and filegroup, I got following error.
Msg 41802, Level 16, State 1, Line 3 Cannot drop the last
memory-optimized container 'InMemFile'. Msg 5042, Level 16, State 11,
Line 5 The filegroup 'InMemFileGroup' cannot be removed because it is
not empty.
I want to drop this configuration, then I drop that table.
When I want to delete that file and filegroup, I got following error.
USE [InMem_Test]
GO
ALTER DATABASE [InMem_Test] REMOVE FILE [InMemFile]
GO
ALTER DATABASE [InMem_Test] REMOVE FILEGROUP [InMemFileGroup]
GOMsg 41802, Level 16, State 1, Line 3 Cannot drop the last
memory-optimized container 'InMemFile'. Msg 5042, Level 16, State 11,
Line 5 The filegroup 'InMemFileGroup' cannot be removed because it is
not empty.
Solution
Currently, the only way to remove Hekaton is to drop the whole database.
Probably not your first choice, but it doesn't look like Microsoft is willing to change course on that.
Probably not your first choice, but it doesn't look like Microsoft is willing to change course on that.
Context
StackExchange Database Administrators Q#179853, answer score: 11
Revisions (0)
No revisions yet.