Submit a Ticket
Support Center » Knowledgebase » Databases » SQL converter

SQL converter

ALTER DATABASE Compatibility Level

If there are issues with your database and it does not work properly in some of the SQL servers, you probably might look your syntax and check if it is compitable to the used server.


The following function sets certain database behaviors to be compatible with the specified version of SQL Server.


Syntax:
ALTER DATABASE database_name 
SET COMPATIBILITY_LEVEL = { 90 | 100 | 110 }

Areguments:
database_name

Is the name of the database to be modified.


COMPATIBILITY_LEVEL { 90 | 100 | 110 }

Is the version of SQL Server with which the database is to be made compatible. The value must be one of the following:

90 = SQL Server 2005

100 = SQL Server 2008 and SQL Server 2008 R2

110 = SQL Server 2012


Examples:

The following example changes the compatibility level of the AdventureWorks2012 database to 110, SQL Server 2012.

 ALTER DATABASE AdventureWorks2012
SET COMPATIBILITY_LEVEL = 110;
GO


 This answer was helpful  This answer was not helpful
 Back