Home  >  Article  >  Database  >  查看和修改Oracle服务器端字符集

查看和修改Oracle服务器端字符集

WBOY
WBOYOriginal
2016-06-07 16:56:061237browse

查看和修改Oracle服务器端字符集:方法一:1) 查看服务器端字符集:select * from v$nls_parameters;select * from nls_da

查看和修改Oracle服务器端字符集:

方法一:

1)       查看服务器端字符集:

select * from v$nls_parameters;

select * from nls_database_parameters;

select * from sys.props$;

2) 修改服务器端字符集(用sys用户):

首先执行:update props$ set value$ = 'WE8ISO8859P1' where name ='NLS_CHARACTERSET';

update props$ set value$ = 'china' where name ='NLS_LANGUAGE';

提交(commit),,然后,重新启动数据库;

3)用客户端工具(PL/SQL DEVELOP or PB etc.)查询数据库,若显示乱码,先查询出数据库端的字符集,然后,从注册表中修改NLS_LANG字段的值,可能为AMERICAN_AMERICA.WE8ISO8859P1或者SIMPLIFIED CHINESE_CHINA.ZHS16GBK或者NA等。

方法二:

alter system enable restricted session;

alter database ORCL character set ZHS16GBK;

alter database ORCL national character set ZHS16GBK;

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn