当前位置:网站首页>oracle修改数据库字符集
oracle修改数据库字符集
2022-07-02 06:32:00 【Axi-ZYTao】
1、修改数据库字符集,如果登录的客户端与服务器不在同一服务器,则建议两边字符集保持一致。
查看客户端字符集:
select * from v$nls_parameters
NLS_LANGUAGE #字体
NLS_TERRITORY #地区
NLS_CHARACTERSET #字符集
环境变量nls_lang便是由这三部分组成格式:字体 地区.字符集
比如:
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
查看服务器字符集:
select sys_context('userenv', 'language') from dual
2、修改客户端字符集
修改注册表,win+R,输入regedit,进入注册表;找到以下路径HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE\KEY_OraDb11g_home2
(注意:KEY_OraDb11g_home2与自己要修改的数据库对应)
找到NLS_LANG,
右键,修改数值数据,修改为客户端/服务器对应的字符集(用第一步方法查询);保存,关闭。
3、改服务器端字符集
进入oracle的sqlplus窗口,登录dba;
conn 用户名 as sysdba
依次输入以下指令:
shutdown immediate; #停止database
startup mount; #重开database
alter system enable restricted session;
alter system set job_queue_processes=0;
alter system set aq_tm_processes=0;
alter database open;
alter database character set utf8;
alter database character set internal_use utf8; #强制转换编码格式,有可能会导致数据库中的中文变成乱码
shutdown immediate;
>startup; #重启oracle
————————————————————————————————————
参考:
https://blog.csdn.net/laukicn/article/details/60962052
https://blog.csdn.net/chenwang2018/article/details/75051482
边栏推荐
- libusb的使用
- Service de groupe minecraft
- Kubesphere virtualization KSV installation experience
- Zipkin is easy to use
- C language custom types - structure, bit segment (anonymous structure, self reference of structure, memory alignment of structure)
- Pclpy projection filter -- projection of point cloud to cylinder
- C nail development: obtain all employee address books and send work notices
- 查看was发布的应用程序的端口
- commands out of sync. did you run multiple statements at once
- Oracle修改表空间名称以及数据文件
猜你喜欢
Detailed explanation of NIN network
Avoid breaking changes caused by modifying constructor input parameters
Driving test Baodian and its spokesperson Huang Bo appeared together to call for safe and civilized travel
cmd窗口中中文呈现乱码解决方法
Minecraft群组服开服
IP protocol and IP address
Tcp/ip - transport layer
Hengyuan cloud_ Can aiphacode replace programmers?
Honeypot attack and defense drill landing application scheme
整理秒杀系统的面试必备!!!
随机推荐
Oracle 相关统计
C Baidu map, Gaode map, Google map (GPS) longitude and latitude conversion
Qt的拖动事件
Qt的右键菜单
Sentinel reports failed to fetch metric connection timeout and connection rejection
Dip1000 implicitly tagged with fields
Qt的connect函数和disconnect函数
C#钉钉开发:取得所有员工通讯录和发送工作通知
寻找链表中值域最小的节点并移到链表的最前面
Openshift deployment application
Avoid breaking changes caused by modifying constructor input parameters
Getting started with k8s: building MySQL with Helm
OpenShift 部署应用
C# 高德地图 根据经纬度获取地址
Select sort and insert sort
Qunhui NAS configuring iSCSI storage
Driving test Baodian and its spokesperson Huang Bo appeared together to call for safe and civilized travel
将一串数字顺序后移
Synchronize files using unison
QT qtimer class