Troubleshooting Guide: SQL Server Error 12336 – “The use of replication is not supported with %S_MSG”
Why This Error Happens
This error typically occurs when a SQL Server edition restriction is encountered, such as attempting to configure replication on an Express or Web edition that does not support it as a Publisher or Distributor. It can also surface when a database is enabled for a feature incompatible with replication, such as Contained Databases or certain Always On Availability Group configurations without proper sequencing. Additionally, mismatched compatibility levels or attempting to replicate system databases (master, tempdb, model) can trigger this message since these databases are explicitly excluded from replication support.
Step-by-Step Resolution Guide
Step 1: Verify SQL Server Edition Compatibility
- Confirm your SQL Server 2025 edition supports replication by running:
SELECT SERVERPROPERTY('Edition') AS Edition;
- Replication as a Publisher/Distributor requires Standard, Enterprise, or Developer edition. Express edition only supports Subscriber roles.
- If running Express, upgrade to Standard or higher via Setup.exe from installation media.
Step 2: Check Database Configuration for Conflicting Features
- Query whether the database has Contained Database settings enabled, which can conflict with replication:
SELECT name, containment, containment_desc
FROM sys.databases
WHERE name = 'YourDatabaseName';
- If containment is set to PARTIAL, disable it before configuring replication:
ALTER DATABASE YourDatabaseName SET CONTAINMENT = NONE;
- Ensure you are not attempting to replicate system databases (master, model, tempdb, msdb).
Step 3: Validate Always On Availability Group Sequencing
- If using Always On AGs in Windows Server 2025, confirm replication was configured on the Primary Replica before adding the database to the Availability Group.
- Remove the database temporarily from the AG:
ALTER AVAILABILITY GROUP [AGName] REMOVE DATABASE [YourDatabaseName];
- Reconfigure replication first, then re-add the database to the AG using SQL Server Management Studio (SSMS) or T-SQL.
Step 4: Review Compatibility Level Settings
- Check the database compatibility level, as very old levels (below 130) can cause unexpected replication errors in SQL Server 2025:
SELECT name, compatibility_level
FROM sys.databases
WHERE name = 'YourDatabaseName';
- Update to a supported level:
ALTER DATABASE YourDatabaseName SET COMPATIBILITY_LEVEL = 160;
Step 5: Restart SQL Server Services and Reconfigure Replication
- Restart the SQL Server (MSSQLSERVER) and SQL Server Agent services via Services.msc on Windows Server 2025/Windows 11.
- Reopen the Replication folder in SSMS, right-click, and select “Configure Distribution” or “New Publication” to rebuild the setup cleanly.
Alternative or Verification Steps
- Run
sp_helpdistributorandsp_helppublicationin SSMS to confirm replication components are correctly registered without errors. - If the issue persists, drop and recreate the Publisher/Distributor configuration from scratch using the Replication Wizard, ensuring the target database excludes any unsupported containment or compatibility settings.