这段脚本可以直接在PLSQL中查出Oracle服务端字符集的同时,也在Cmd窗口中显示出本地Oracle客户端字符。
以下脚本直接复制到PLSQL的Command窗口中运行即可,如果有更好的脚本请帮忙贴一下。thx.
CL
--Query NLS_LANGUAGE_NLS_TERRITORY.NLS_CHARACTERSET From V$NLS_PARAMETERS
SELECT 'HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG' as Client, t1.value||'_'||t2.VALUE||'.'||t3.VALUE AS Server FROM V$NLS_PARAMETERS t1,V$NLS_PARAMETERS t2,V$NLS_PARAMETERS t3
WHERE t1.PARAMETER='NLS_LANGUAGE'
AND t2.PARAMETER='NLS_TERRITORY'
AND t3.PARAMETER='NLS_CHARACTERSET';
prompt -------------------------------------------------------
Prompt Querying oracle client charset from windows registry:
prompt -------------------------------------------------------
Prompt Oracle client charset has been displayed in cmd window.
$cmd /k Echo Oracle Client Charset & reg query HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 /v NLS_LANG|find "NLS_LANG"