After reading my post SQL SERVER – Puzzle – Playing with DateTime with Customer Data, one of my blog readers asked me “How to find out the current language setting of the session?”
With the help of the system variable and system view, we will be able to easily find out the language of the server
As per Books On-Line, the system function @@LANGID returns the local language identifier (ID) of the lang that is currently being used. The system view SYS.SYSLANGUAGES contains information about all the languages that are supported in the current instance of SQL Server.
We can make use of these to find out the language of the session
SELECT NAME,ALIAS FROM SYS.SYSLANGUAGES WHERE LANGID= (SELECT @@LANGID)
The result is
Let us change the language into GERMAN
SET LANGUAGE 'GERMAN'
After executing the above statement, wow execute the same SELECT statement
SELECT NAME, ALIAS FROM SYS.SYSLANGUAGES WHERE LANGID= (SELECT @@LANGID)
The result is
Let me know if you know any other methods.
If you have SQL Server Performance issues, you can consider to hire me to help you to improve your SQL Server Performance. Here is the link to my most popular service: Comprehensive Database Performance Health Check. If you want to learn about SQL Server Performance tuning, you can hire me to deliver a workshop for you SQL Server Performance Tuning Practical Workshop.
Reference: Pinal Dave (https://blog.sqlauthority.com)