以下代码可以加在程序包里面,用于修改当前session的语言参数。
--设置session语言 PROCEDURE p_Set_Nls_Language(Pi_Nls_Lang IN VARCHAR2 DEFAULT ‘SIMPLIFIED CHINESE‘) IS BEGIN EXECUTE IMMEDIATE ‘ALTER SESSION SET NLS_LANGUAGE=‘ || Chr(39) || Pi_Nls_Lang || Chr(39); EXCEPTION WHEN OTHERS THEN EXECUTE IMMEDIATE ‘ALTER SESSION SET NLS_LANGUAGE=‘ || Chr(39) || ‘SIMPLIFIED CHINESE‘ || Chr(39); END p_Set_Nls_Language;
一般常用‘SIMPLIFIED CHINESE‘ 和‘AMERICAN‘
查询各级NLS参数:
SELECT * FROM nls_database_parameters; SELECT * FROM nls_instance_parameters; SELECT * FROM nls_session_parameters;
时间: 2024-10-08 11:58:43