折雨的天空

新浪微薄腾讯微薄

最新碎语:最近霉到了住。哎。。。

您的位置:折雨的天空 >其他技术> oracle18c在Linux下PDB库默认字符集调整

oracle18c在Linux下PDB库默认字符集调整

主要是原来的是gbk的,放到utf8下面,各种长度不够

以下是调整过程:


//查看Pdb
show pdbs;
//删除pdb
drop pluggable database testpdb including datafiles;
//创建pdb
create pluggable database testpdb admin user testpdb identified by testpdb file_name_convert=('/opt/oracle/oradata/ORCLCDB/pdbseed/','/oracle/oradata/testpdb/');
//打开数据库
alter pluggable database testpdb open;
//确认字符集
alter session set container=testpdb;
select userenv('language') from dual;
//修改字符集
alter pluggable database testpdb close immediate instances=all;
alter pluggable database testpdb open read write restricted;
alter database character set internal_use zhs16gbk;
alter pluggable database testpdb close immediate;

--启动pdb确认
alter pluggable database testpdb open instances=all;
alter session set container=testpdb;
select userenv('language') from dual;  <<<<<<<<<<此时字符集已经修改

//切换到cdb
alter session set container=CDB$ROOT;
alter pluggable database all save state;

---

转载请注明本文标题和链接:《oracle18c在Linux下PDB库默认字符集调整

分享到:

发表评论

路人甲 表情
看不清楚?点图切换