以下代码可以加在程序包里面,用于修改当前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;
本文出自 “路漫漫其修远兮…” 博客,请务必保留此出处http://baser.blog.51cto.com/4153192/1546061