How to Fix SQL Server Error 41349 (Msg 41349)
You trigger sql server error 41349 when you turn on encryption for a database with schema-only memory tables. To fix this warning, review your table durability needs or change how your tables store data. Database admins often see this message during security updates. The engine throws a severity 10 warning to alert your team. It means your new encryption rule does not write these specific memory tables to disk. You must understand why the engine sends this alert before you change your setup.
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You trigger sql server error 41349 when you turn on encryption for a database with schema-only memory tables. To fix this warning, review your table durability needs or change how your tables store data.
Database admins often see this message during security updates. The engine throws a severity 10 warning to alert your team. It means your new encryption rule does not write these specific memory tables to disk. You must understand why the engine sends this alert before you change your setup.
What causes sql server error 41349 in the engine
The database engine logs message 41349 at severity level 10. This level is an informational warning rather than a hard failure. It happens when you enable encryption on a database with memory-optimized tables. In this case, one or more tables use schema-only durability.
Tables with schema-only durability keep their data in memory. They do not write table rows to disk storage. Because database encryption protects files on disk, it does not encrypt data that stays in memory. The database engine warns you so you do not assume memory data is written to encrypted files.
Your encryption task still finishes when this warning appears. Still, your team needs to know how the engine handles these tables. If the server restarts, schema-only tables lose their rows and keep only their structure.
How to check and fix the warning in production
Start by checking which tables in your database use memory optimization. Look at the durability setting for each of those tables. If a table holds temporary session state or cache data, schema-only durability is often fine. You can note the warning in your log and move on.
If a table holds sensitive data like emails or card numbers, examine your design. You may need that data saved to encrypted disk storage. To do that, you must recreate the table with both schema and data durability. Keep in mind that changing table durability requires dropping and recreating the table.
Kubernetes API Server Access + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
When your team checks these tables, use safe database permissions. Do not hand out the db_owner role just to inspect table settings. Members of db_owner can change any setup and can even drop the database. Instead, give engineers a read-only role like db_datareader to read user tables and views.
How to manage database roles during encryption updates
Good access control keeps your production database safe during encryption changes. A database user is the identity of a login when it connects to a database. For people who need access to many databases, a SQL user with a login in master is common. For access to one or a few databases, you can use a contained database user.
An admin must first enable contained databases on the server and the database. There are 13 types of database users available in the engine. When you assign roles, remember that fixed database roles cannot be changed. All roles, including the public role, have the basic permission to connect.
If an engineer only needs to check data before a change, use db_datareader. If they need to change data in user tables, use db_datawriter. You can also block access with db_denydatareader or db_denydatawriter when needed. You can pair role checks with data masking to rewrite phone numbers or national IDs in query results.
Check SQL Server batches and results on the wire
SQL Server logins and roles decide who connects. They do not check what each TDS batch does or mask sensitive values in returned rows. With hoop.dev, you run an open-source proxy, a sidecar for your SQL Server, inline in the TDS wire protocol. On every batch an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
Before a batch hits the server, hoop.dev guardrails refuse disallowed actions with a native TDS error or hold risky statements for approval. On the way back, hoop.dev data masking rewrites sensitive values in supported result columns in memory, and every decision is logged. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Does sql server error 41349 stop encryption from working?
No, message 41349 is a severity 10 warning, so encryption still turns on for disk files. It only reminds you that schema-only memory tables do not write data to those encrypted disk files.
How can I stop message 41349 from appearing?
You can remove schema-only memory tables before you turn on encryption, or change them to store data on disk. If you need schema-only tables for speed, you can accept the one-time warning.
What role should an engineer use to check memory tables?
Give the engineer a limited role like db_datareader to read user tables and views safely. Avoid giving out the db_owner role for simple checks, because db_owner can drop the whole database.
Related guides
In this post