Error adding filestream file goup on SQL Server Developers Edition

David 20 Reputation points
2023-05-11T17:30:32.8433333+00:00

I have SQL Server Developers Edition installed and have successfully created a filestream enabled database (including the file group file). Yet when I try to alter an existing database, even a newly created empty one, to add a file for the file group, I get the following error:

Msg 35221, Level 16, State 1, Line 1

Could not process the operation. Always On Availability Groups replica manager is disabled on this instance of SQL Server. Enable Always On Availability Groups, by using the SQL Server Configuration Manager. Then, restart the SQL Server service, and retry the currently operation.

What am I doing wrong? Here are the commands I'm running to set things up.

-- This works
create database Testing
on primary (name = Test1, filename = 'c:\path\to\my\db\data.mdf')
filegroup fgGroup1 contains filestream 
(name = TestFiles, filename = 'c:\path\to\my\db\fgTesting')
log on (name = TestLog1, filename = 'c:\path\to\my\db\log.ldf')
go

-- This does not work
create database Testing
on primary (name = Test1, filename = 'c:\path\to\my\db\data.mdf')
log on (name = TestLog1, filename = 'c:\path\to\my\db\log.ldf')
go

alter database Testing
add filegroup fgGroup1 contains filestream
go

alter database Testing
add file (name = TestFiles, filename = 'c:\path\to\my\db\fgTesting')
to filegroup fgGroup1
go
SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2023-05-11T21:16:04.93+00:00

    This is a known issue that has been fixed. Download and install the most recent Cumulative Update for SQL 2022,

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. RahulRandive 10,486 Reputation points Volunteer Moderator
    2023-05-12T00:15:56+00:00

    Hi @David

    Thanks for your question.

    Just adding reference document/details https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate1

    1993393

    Fixes error 35221 that occurs in the following scenarios:-

    You attempt to add a file to a FILESTREAM filegroup or a memory-optimized filegroup.- You attempt to add additional transaction log files to a database.Error message:

    Msg 35221, Level 16, State 1, Line <LineNumber>Could not process the operation. Always On Availability Groups replica manager is disabled on this instance of SQL Server. Enable Always On Availability Groups, by using the SQL Server Configuration Manager. Then, restart the SQL Server service, and retry the currently operation. For information about how to enable and disable Always On Availability Groups, see SQL Server Books Online.

    Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.