Set Oracle NLS_LANGUAGE from java in a webapp

我的梦境 提交于 2019-12-04 19:25:24

Can depend on your architecture.

Some places opt to have multiple geographically local web-apps against a single database (ie one in the France, one in the UK, one in Spain).

Or you pull data (eg dates, numbers) in 'computer' format from the database and have the web-app convert it to the end-user's preferences (or possibly based on browser information if you don't have user logins).

Or you have separate connection pools for different 'territories'.

Bear in mind that queries changing territories can affect index usage and sorting.

If you're using connection pooling, it's the best way to make sure that Johnny's results are in American and Johann's results are in German.

You could store the user's preferred NLS value for LANGUAGE, TERRITORY, CHARACTERSET, and SORT, using V$NLS_VALID_VALUES as a data source, assuming you store login/user information.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!