SQL 2022 Bug - FILESTREAM

Clarke, Ron 26 Reputation points
2022-12-15T20:37:53.993+00:00

Trying to setup database with FILESTREAM. Using scripts that work great on previous versions of SQL Server (2016 to 2019). Getting strange error message when trying to add file to filegroup:

Msg 35221, Level 16, State 1, Line 2

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.

We do not use Always On, so of course it is disabled. Why would SQL require it to be enabled for SQL 2022?

Command being attempted is similar to this:

ALTER DATABASE MyDb ADD FILE ( Name = FILESTREAM_Files, FileName = 'C:\Databases\SQL2022\MyDb') To Filegroup My_FILESTREAM;

Also tried using SQL Mgmt Studio to do same and get same error.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,716 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 101K Reputation points MVP
    2022-12-15T22:10:30.327+00:00

    This is a known issue. Microsoft has said that this will be fixed in CU1 for SQL 2022. The fix is also available in the RTM version of SQL 2022, but it is hidden under a traceflag, TF12324.

    Add it as a startup parameter in SSCM and restart SQL Server:

    271168-image.png

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Øyeblikk 5 Reputation points
    2023-10-28T01:28:10.2633333+00:00

    Does anyone know if this is fixed in 2023? Came across the error when I was working with SQL Express 2022 installation... added the flag and it's fine. But was wondering if the cumulative updates solved the issue?

    1 person found this answer helpful.

  2. Jitendra 1 Reputation point
    2022-12-20T10:03:55.687+00:00

    Hi,

    Facing same issue with SQL 2022. Adding TF12324 as startup parameter is not working, the SQL Server process doesn't start after adding this flag.

    When the CU1 for SQL 2022 will be available?

    Thanks,
    Jitendra