centos8 oracle 19c 问题集中处理
1 数据库启动提示 ORA-00205: error in identifying control file, check alert log for more info
2 查找 pfile 文件夹位置
3 shutdown immediate 关闭数据库 如果关闭不了 用SHUTDOWN ABORT
4 startup pfile=/opt/oracle/admin/ORCLCDB/pfile/init.ora.1820221869 open;
先找到cd $ORACLE_HOME/dbs
将lk文件改名(我的是测试环境)
然后将所有oracle进程杀掉
ps -elf | grep oracle | awk '{print $4}' | xargs kill -9
重启oracle服务测试
还是不好使?
create spfile from pfile='/opt/oracle/admin/ORCLCDB/pfile/init.ora.1820221869'; 先关闭数据库在执行, init.ora.1820221869 是我本地的文件,并不是自己随便起的名字。
startup 启动数据库
show con_name 查看当前连接
alter pluggable database ORCLPDB1 open; 打开ORCLPDB1容器
alter session set container=ORCLPDB1;将当前会话切换到ORCLPDB1
数据库字符集更改为gbk
SQL> shutdown immediate;
SQL> startup mount
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL> alter database open;
ERROR at line 1:
ORA-12712: new character set must be a superset of old character set
提示我们的字符集:新字符集必须为旧字符集的超集,这时我们可以跳过超集的检查做更改:
SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
原文链接:https://blog.csdn.net/qq_22472921/article/details/82020646
SQL> shutdown immediate;
SQL> startup
alter pluggable database ORCLPDB1 open; 打开ORCLPDB1容器
alter session set container=ORCLPDB1;将当前会话切换到ORCLPDB1
SQL> select * from v$nls_parameters;
再次查看字符集