[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Msg 40636 Cannot use reserved database master

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Msg 40636 Cannot use reserved database master.


Applies to: SQL Azure Database V12.
 

Problem Description.
 

After upgrading a SQL Azure Database server to V12 you run the following statement and notice the master database does not have compatibility level 130.

 

SELECT [name], compatibility_level
FROM sys.databases
WHERE [name] = 'master'

 

You then try to set the compatibility level of master database using the following statement:


ALTER DATABASE [Master] SET COMPATIBILITY_LEVEL = 130;
GO

but you receive below error message:

Msg 40636, Level 16, State 1, Line 1
Cannot use reserved database name 'Master' in this operation.



Cause.


The compatibility level of 100 on the master database of the SQL Azure server is expected as mentioned on SQL Azure documentation:

"Databases created before mid-June 2016 will not be affected, and will maintain their current compatibility level (100, 110, or 120). Databases that migrated from Azure SQL Database version V11 to V12 will have a compatibility level of either 100 or 110. "
Source: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-compatibility-level-query-performance-130

The compatibility level of master database cannot be changed on SQL Azure since it is considered a reserved database.

To this day, we don't know of any benefit from running master database on compatibility 130 instead of 120 or 100.

 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.