How to fix Error 5600 on Windows Server 2025 / Windows 11

Troubleshooting Guide: Error 5600 — Cross Database Chaining Option Cannot Be Set

Why This Error Happens

Error 5600 occurs when the SQL Server login attempting to change the DB_CHAINING database option lacks the required ALTER ANY DATABASE or sysadmin level permissions. This error can also surface if the target database is a system database (like master, model, or tempdb) where cross-database chaining modifications are restricted, or if the database is currently in a state (such as read-only, single-user, or offline) that prevents metadata changes. Additionally, if Windows Server 2025 Group Policy or SQL Server’s policy-based management has locked down server-level configuration options, the ALTER DATABASE statement will be rejected.

Step-by-Step Resolution Guide

Step 1: Verify Current User Permissions

  • Open SQL Server Management Studio (SSMS) and connect using an account with known sysadmin privileges.
  • Run the following query to check your current permission level:
  SELECT IS_SRVROLEMEMBER('sysadmin');
  • A return value of 1 confirms sysadmin rights; 0 means you need to escalate privileges or use a different login.

Step 2: Enable Cross-Database Ownership Chaining Correctly

  • Ensure you are not trying to apply this setting to a system database unless absolutely necessary.
  • Execute the command using a sysadmin login, specifying the exact database name:
  ALTER DATABASE [YourDatabaseName] SET DB_CHAINING ON;
  • If this fails, check whether the server-wide chaining policy is disabled via sp_configure:
  EXEC sp_configure 'cross db ownership chaining', 1;
  RECONFIGURE;

Step 3: Check Database State and Connection Mode

  • Confirm the database is not in SINGLE_USER mode while other connections are active, as this can block ALTER DATABASE commands.
  • Run this query to check the current state:
  SELECT name, state_desc, user_access_desc FROM sys.databases WHERE name = 'YourDatabaseName';
  • If the state shows RESTRICTED_USER or SINGLE_USER unexpectedly, switch it back using:
  ALTER DATABASE [YourDatabaseName] SET MULTI_USER;

Step 4: Review Windows Server 2025 Security Policies

  • Open the Local Security Policy editor (secpol.msc) and verify that the SQL Server service account has not been restricted under “Deny log on locally” or similar policies.
  • Check if Windows Defender Application Control (WDAC) or Group Policy Objects (GPOs) are blocking SQL Server service processes from modifying registry-based configuration caches.
  • Restart the SQL Server service via Services.msc after any policy adjustments to apply changes cleanly.

Alternative or Verification Steps

  • To verify the fix, re-run SELECT is_db_chaining_on FROM sys.databases WHERE name = 'YourDatabaseName'; — a return value of 1 confirms the setting was applied successfully.
  • If the issue persists, use the sp_dboption legacy stored procedure (if running in compatibility mode) as an alternative method to toggle the setting, or restart the SQL Server instance entirely to clear any cached permission tokens.