SDU Tools are free tools and example T-SQL code for SQL Server developers and DBAs. ServerMaximumDBCompatibilityLevel is a simple function that returns the highest database compatibility level that's supported by the server.
To join SDU Insiders and get all our free resources, including SDU Tools, see the details at http://sdutools.sqldownunder.com