Question

I have been working on databases in a Always On High Availability group which - for reasons that I do not understand - have different default languages for an application's login on the primary and secondary nodes.

The particular situation I have at the moment is this:

  • The language that the application expects is British English. It does not specify the language that it uses when it connects; it uses whatever the default language is for the login. The documentation for the application says that the default language should be British English, presumably because it does not specify a language on connecting.
  • The application connects to the listener, not to either of the nodes directly.
  • The application will often save dates as strings (e.g UPDATE FooTable SET BarColumn = '01\02\2020' WHERE IdColumn = 42). The data will be saved in a date or datetime column.
  • The default language of the login on the database listener is British English.
  • The default language of the login on the primary node is British English.
  • The default language of the login on the secondary node is American English

I am no DBA, and certainly no expert in Always On High Availability. What dangers might there be/have been in using this configuration? Does it matter if the languages on the primary and secondary nodes are swapped?

Was it helpful?

Solution

If the application is setting the language on the session when it logs in, then the default language doesn't matter. If it's not specifically setting the language on the session, then there is risk of date strings being converted incorrectly, and dates being returned in American English format instead of British English.

Unless there is some unstated reason, I recommend simply changing the default language on the login on the secondary to match the primary.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top