How do I change the collation on Azure SQL server?
Steps in brief:
- Take a copy of the production database to a higher service tier ex: P11 on the same server.
- Export the database to bacpac using SQLPackage.
- Modify the collation by editing the model.
- Import the database again to a higher service tier ex: P11 by using SQLPackage and overriding the model.
What is Latin1_General_CI_AS collation?
The Latin1_General_CI_AS collation is a Windows collation and the rules around sorting unicode and non-unicode data are the same. A Windows collation as per this example can still use an index if comparing unicode and non-unicode data albeit with a slight performance hit.
Is it possible to change the default collation of an Azure SQL database?
We created an Azure SQL database using the default collation that was available. Now, there is a requirement from the client to change the collation. Is it possible to change the collation of an Azure SQL database after it is created? This tip assumes you already have an Azure SQL database.
How can I change the collation of an existing database?
To change the collation of an existing database, requires ALTER permission on the database. In Object Explorer, connect to an instance of the SQL Server Database Engine, expand that instance, and then expand Databases. If you are creating a new database, right-click Databases and then click New Database.
What does the server collation do in SQL Server?
The server collation acts as the default collation for all system databases that are installed with the instance of SQL Server, and also any newly created user databases. The server collation is specified during SQL Server installation. For more information, see Collation and Unicode Support.
How can I restore my Azure SQL database?
In order to restore the Azure database on to an on-premises server, export the Azure database to a BACPAC. Connect to the Azure SQL instance, right click on the Azure SQL database and click on the option to “Export Data-tier application”.