多租户架构,之前还在做运维的时期接触也不多。遇到多租户问题,第一反应是有些发虚的。
但实际很多问题很简单,也容易解决。本文就是一个例子。
问题:RAC节点2打开所有PDB时,报错ORA-30013。
SQL> alter pluggable database all open;
alter pluggable database all open
*
ERROR at line 1:
ORA-30013: undo tablespace 'UNDOTBS2' is currently in use
查看oerr对错误的描述:
SQL> !oerr ora 30013
30013, 00000, "undo tablespace '%s' is currently in use"
// *Cause: the specified undo tablespace is currently used by another
// instance.
// *Action: Wait for the undo tablespace to become available or
// change to another name and reissue the statement.
去RAC节点1查询,居然节点1的undo是undotbs2,修正为undotbs1即可。
SQL> alter session set container=pdb1;
Session altered.
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
SQL> alter system set undo_tablespace='UNDOTBS1' sid='jydb1';
System altered.
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
temp_undo_enabled boolean FALSE
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
再去RAC节点2打开PDB成功。
应该是之前修改undo时,由于马虎没指定sid。是一个低级错误,也属于非常容易解决的简单问题。
多租户架构下,除加了一些特定的命令,尤其是进入到某个PDB中,其实操作跟以前还是没啥区别的,很多经验也完全可复用。
标签:30013,undo,alter,tablespace,SQL,报错,PDB From: https://www.cnblogs.com/jyzhao/p/17392141.html