SQL Collation support in BizTalk360 and BizTalk Server (2024)

Key takeaways from the blog

  • About SQL Collation
    • Why is SQL Server case insensitive?
    • How do you check if a column is case sensitive in SQL Server?
    • How do I change case sensitive in SQL Server?
  • Why does BizTalk360 support SQL Collation?
  • BizTalk360 is ready for BizTalk Server 2020!

As per customer feedback, BizTalk360 focus on improving the usability by adding new features and enhancing existing features as per customer requirements. Recently we have received a few support cases from our customer end about SQL Collation. We have analysed the request and improved the support of SQL collation.

We are happy to share you that BizTalk360 has improved its standards by supporting case-sensitive collation. This will soon be available in the upcoming version 9.0 Phase 2. In the previous version of BizTalk360, we were supporting the general collation like Latin1_General_CI_AI for BizTalk360 Database. In this blog, we will see why we started supporting case sensitive SQL collation and what the benefits are of having it.

As you all know BizTalk360 is the one-stop monitoring tool to monitor BizTalk Server. Since BizTalk Server itself, supports case sensitive collation, to make it a consistent tool, it is so important that BizTalk360 also supports case sensitive collation.

Free download this blog as a PDF document for offline read.

About SQL Collation

A collation is a configuration setting that determines how the database engine should treat character data at the server, database, or column level. SQL Server includes a large set of collations for handling the language and regional differences that come with supporting users and applications across the world.

Why is SQL Server case insensitive?

SQL Server is, by default case insensitive; however, it is possible to create a case sensitive SQL Server database and even to make specific table columns case sensitive. The way to determine a database or database object is by checking its “COLLATION” property and look for “CI” or “CS” in the result.

  • CI refers to Case Insensitive
  • CS refers to Case Sensitive

List of collation combination in SQL setup:

  • SQL Server collation
  • SQL Server and Database collation
  • SQL Server, Database and Tables collation
  • SQL Server, Database, Tables and Column collation

SQL has 4 levels of collation: server, database, table and column. If you change the collation of the server, database or table, then we don’t want to change the setting for each column. If needed, we can change the default collations at database/table/column level.

How do you check if a column is case sensitive in SQL Server?

To check if a column is case sensitive or case insensitive, you can execute the below query.

SELECT COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '<Name of the table that contains the column(s) you want to check>' If the output of the field contains ‘CI’, like in ‘Latin1_General_CI_AI’ then the column is case insensitive. If the output of the field contains ‘CS’, like in ‘Latin1_General_CS_AS’ then the column is case sensitive. 

Note: If you change the default collation of a database, each new table you create in that database will use that collation, and if you change the default collation of a table each column you create in that table will use that collation.

How do I change case sensitive in SQL Server?

SQL Server collation can be changed in two ways:

  • Changing the collation during the installation
  • Changing the collation after installation

Changing the collation during the installation: while installing SQL server, you can find the Server Configuration section. Under this section, you can see two sections

  • Service accounts
  • Collation

Note: To have case sensitive collation use the collation which holds CS_AS.

SQL Collation support in BizTalk360 and BizTalk Server (1)

Why does BizTalk360 supports SQL Collation?

BizTalk Server supports all case sensitive and case insensitive SQL Server collations except for binary collations. So, it is important that BizTalk360 should support the same collations.

Collation refers to a set of rules that determine how data is sorted and compared. When BizTalk360 calls any functions or data from BizTalk Server which is of case sensitive collation, then it may lead to an exception.

Let’s consider that the BizTalk databases hold a case sensitive collation and BizTalk360 holds a case insensitive collation. In this case, when BizTalk360 gets integrates with BizTalk Server and tries to read the data, it is necessary to ensure all the procedure and column names should be exactly similar.

SQL Collation support in BizTalk360 and BizTalk Server (3)

From the above picture it is clearly understandable that having a collation-based database, and when trying to fetch the data of an object, it will compare the case sensitiveness and provide the data. In case of uppercase and lowercase mismatch, it will lead to an exception.

Say for example, Invalid column name ‘nAdminHostId’ (or) Invalid object name ‘dbo.b360_ST_Schedules’ (or) Must declare the scalar variable “@expiryDateTime”etc.

Most of our customers configure BizTalk360 in the SQL Server instance where BizTalk Server is configured. In such cases, the below-mentioned scenario will add value for supporting collation.

Scenario I: BizTalkMgmtDb (Latin1_General_CS_AS) & BizTalk360 (Latin1_General_CI_AI)

Let us consider the scenario of having a SQL server with case insensitive SQL collation and case sensitive collation for BizTalkMgmtDb.

In this case, the BizTalk360 installation will be successful and BizTalk360 database will be created with case insensitive SQL collation since SQL Server holds a case insensitive SQL collation. But in the BizTalk360 application, you may face some exceptions getting popped up related to “Invalid column name ‘nAdminHostId”, in few sections like BizTalk Server, SQL Server, SQL Server instance, Analytics etc.

Scenario II: SQL Server (Latin1_General_CS_AS) & BizTalk360 Database (Latin1_General_CI_AI)

When creating a database in the SQL Server, by default the database will hold the collation of the SQL Server. In this case, the customer has the CS collation for the SQL server, thus all the BizTalk related databases hold the same case sensitive collation. In this case, when you try to install the BizTalk360 Db in the SQL server which holds Latin1_General_CS_AS collation, the installation will fail!

“ExecuteSqlStrings: Error 0x80040e14: failed to execute SQL string, error: Must declare the scalar variable “@environmentId”., SQL key: CreateTablesWin SQL string: ALTER PROCEDURE . @EnvironmentId uniqueidentifier”

The BizTalk360 database is created with a CI collation and BizTalk360 is installed by pointing the database to the CI collation DB. But, since the database was under the case sensitive collate SQL server, we had the same exception.

Query to create database with a case CI collation

CREATE DATABASE BizTalk360

COLLATE Latin1_General_CI_AI;

GO

In BizTalk360 v9.0 phase 2, the collation issue has been fixed across the application. We have revised the collation issue across each section in the application.

Free download this blog as a PDF document for offline read.

Checklist prepared to test SQL collation in BizTalk360

BizTalk360 supports many features like ESB, BAM, Azure etc. When having case sensitive collation for BizTalk360 Database, it is important that we look into all the sections of BizTalk360 (Operation, Monitoring, Analytics and Settings) to make it work correctly.

SQL Collation support in BizTalk360 and BizTalk Server (4)

Say for example, BizTalk360 manages ESB exception data (EsbExceptionDb), in which it is important that all the column names, object names and procedures are exactly the same. We have nailed the compatibility of the BizTalk360 database with BizTalk Server database, ESB, BAM, Azure etc.

Withitsmodern look and feel,BizTalk360 is ready for BizTalkServer 2020!

BizTalk360 helps you to manage/operate and monitor your BizTalk Server environments and is widely used by 650+ enterprise customers in 40+ countries across the world. Our team hasworked onthev10 releaseformore than one yeartocompletelyrefreshthe user interface.Also,based on the customer’s feedback fromourBizTalk360 feedback portal,several new features were developed.You can get a30 days trial version of BizTalk360and explore the product yourself or arrange for a personal demo of the product.

Conclusion

We always aim to improve the product by filling gaps in customer needs. Considering the same, we have improved the collation support from our release version 9.0 phase 2 on.

It is possible to have a combination of collation. Say, for example, SQL Server with the collation Latin1_General_CS_AS and BizTalk360 with Latin1_General_CI_AI. By achieving this, we have taken BizTalk360 to leading-edge technology in its standards.

SQL Collation support in BizTalk360 and BizTalk Server (2024)

FAQs

SQL Collation support in BizTalk360 and BizTalk Server? ›

Why does BizTalk360 supports SQL Collation? BizTalk Server supports all case sensitive and case insensitive SQL Server collations except for binary collations. So, it is important that BizTalk360 should support the same collations. Collation refers to a set of rules that determine how data is sorted and compared.

Which collation is best in SQL Server? ›

Collation type must be case-insensitive, accent-insensitive, and language neutral for example, 'SQL_Latin1_General_CP437_CI_AI' is a case-insensitive, accent-insensitive, and language neutral collation type.

What does COLLATE SQL_Latin1_General_CP1_CI_AS mean? ›

The collate clause is used for case sensitive and case insensitive searches in the columns of the SQL server. There are two types of collate clause present: SQL_Latin1_General_CP1_CS_AS for case sensitive. SQL_Latin1_General_CP1_CI_AS for case insensitive.

How to check SQL Server collation? ›

Expand Databases, expand the database and then expand Tables. Expand the table that contains the column and then expand Columns. Right-click the column and select Properties. If the collation property is empty, the column is not a character data type.

Is SQL_Latin1_General_CP1_CI_AS case sensitive? ›

Database collation

For example, the default server-level collation in SQL Server for the "English (United States)" machine locale is SQL_Latin1_General_CP1_CI_AS , which is a case-insensitive, accent-sensitive collation.

What database collation should I use? ›

If you are unsure which character set or collation to use, the MySQL default utf8mb4 character set and its default utf8mb4_0900_ai_ci collation are usually good choices. They support all Unicode characters and provide case-insensitive and accent-insensitive comparisons.

What are the different types of collation in SQL Server? ›

SQL Server instance level collation

The default collation for system databases and user databases is a SQL Server instance collation. It is set during the SQL Server start-up and consists of three parts: master, tempdb, and model. It supports all collations except Unicode-only collations.

Can I change SQL Server collation after installation? ›

Set the server collation in Azure SQL Managed Instance

Server-level collation in Azure SQL Managed Instance can be specified when the instance is created and cannot be changed later. You can set server-level collation via Azure portal or PowerShell and Resource Manager template while you are creating the instance.

What is the difference between SQL_Latin1_General_CP1_CI_AS and Latin1_General_CI_AS? ›

Latin1_General_CI_AS is a Windows collation and can use an index when comparing unicode and non unicode data, where SQL_Latin1_General_CP1_CI_AS is a SQL collation and cannot do this.

What is collation what collation will you pick while installing SQL Server? ›

Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data. Collations that are used with character data types, such as char and varchar, dictate the code page and corresponding characters that can be represented for that data type.

How to add collation in SQL Server? ›

A list of collations supported by the installed version of SQL Server can be generated using sys. fn_helpcollations() (a system DMV). SQL Server allows collations to be configured at different levels of the database engine, but, by default, every level will inherit the collation settings from the parent level.

How do you specify collation in SQL query? ›

You can specify collations for each character string column using the COLLATE clause of the CREATE TABLE or ALTER TABLE statement. You can also specify a collation when you create a table using SQL Server Management Studio. If you do not specify a collation, the column is assigned the default collation of the database.

What is a collation name in SQL? ›

A collation name starts with the name of the character set with which it is associated, generally followed by one or more suffixes indicating other collation characteristics. For example, utf8mb4_0900_ai_ci and latin1_swedish_ci are collations for the utf8mb4 and latin1 character sets, respectively.

How to change SQL Server collation? ›

How to configure SQL server collation
  1. Show the database properties.
  2. Check the server collation value.
  3. Check the SQL collation value using an SQL query.
  4. Check the SQL collation values for all databases.
  5. Launch the Services manager from the search bar.
  6. Stop the SQL Server service to change the collation value.

What is collation in SQL Server with an example? ›

Collations in SQL Server provide sorting rules, case, and accent sensitivity properties to data. A collation defines bit patterns that represent each character in metadata of database. SQL Server supports storing objects that have different collations in database.

How to change all column collation in SQL Server? ›

You can change the collation of any new objects that are created in a user database by using the COLLATE clause of the ALTER DATABASE statement. This statement does not change the collation of the columns in any existing user-defined tables. These can be changed by using the COLLATE clause of ALTER TABLE.

What is the difference between collation Latin1_General_CI_AS and SQL_Latin1_General_CP1_CI_AS? ›

Latin1_General_CI_AS is a Windows collation and can use an index when comparing unicode and non unicode data, where SQL_Latin1_General_CP1_CI_AS is a SQL collation and cannot do this.

What is the standard collation in SQL Server? ›

Default server-level collation is SQL_Latin1_General_CP1_CI_AS.

Does collation matter in SQL? ›

Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data. Collations that are used with character data types, such as char and varchar, dictate the code page and corresponding characters that can be represented for that data type.

What is the most efficient join in SQL? ›

Use inner join, instead of outer join if possible. The outer join should only be used if it is necessary. Using outer join limits the database optimization options which typically results in slower SQL execution. DISTINCT and UNION should be used only if it is necessary.

Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 5698

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.