oracle 经验总结

1.oracle 在使用AL32UFT8的使用,需要系统支持多字符集,这时NLS_LENGTH_SEMANTICS需要设置成char。具体的做法来自于ORACLE官方网站。

To convert an existing schema and its associated data from byte semantics and a single-byte character set to character semantics and a multibyte character set, such as UTF-8, you need only follow these steps: [The following steps have been corrected since the magazine was printed.]

 

  1. Export the schema.
  2. Issue an ALTER SYSTEM SET NLS_LENGTH_SEMANTICS=CHAR SCOPE=BOTH command on the target database.
  3. Stop and restart the instance so that the parameter change takes effect.
  4. Drop the original schema.
  5. Recreate the original schema and its tables (you can use import's show=Y option to get the CREATE TABLE statements). Columns in the recreated tables will use character semantics, because that's now the default.
  6. Import the schema into the target database using the IGNORE=Y import option.

此外:

  1.数据库服务器字符集select * from nls_database_parameters,其来源于props$,是表示数据库的字符集。
  
  2.客户端字符集环境select * from nls_instance_parameters,其来源于v$parameter,
  
  3.表示客户端的字符集的设置,可能是参数文件,环境变量或者是注册表
  
  会话字符集环境 select * from nls_session_parameters,其来源于v$nls_parameters,表示会话自己的设置,可能是会话的环境变量或者是alter session完成,如果会话没有特殊的设置,将与nls_instance_parameters一致。
  
  客户端的字符集要求与服务器一致,才能正确显示数据库的非Ascii字符。如果多个设置存在的时候,alter session>环境变量>注册表>参数文件
  
  字符集要求一致,但是语言设置却可以不同,语言设置建议用英文。如字符集是zhs16gbk,则nls_lang可以是American_America.zhs16gbk。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值