app开发者平台在数字化时代的重要性与发展趋势解析
882
2022-09-08
oracle替换undo表空间
---添加错文件名!
04:28:34 SYS@ntxdb(ntxdb)> alter tablespace UNDOTBS1 add datafile '/u01/app/oracle/oradata/ntxdb/users02.dbf' size 30g autoextend off;
Tablespace altered.
04:30:20 SYS@ntxdb(ntxdb)> alter tablespace UNDOTBS1 add datafile '/u01/app/oracle/oradata/ntxdb/users03.dbf' size 30g autoextend off;
Tablespace altered.
--undo创建错误create tablespace UNDOTBS2 datafile '/u01/app/oracle/oradata/ntxdb/undotbs2_01.dbf' size 5G autoextend off;create pfile='/home/oracle/pfile_0421' from spfile;
--导致替换报错
05:39:11 > alter system set undo_tablespace=undotbs2 scope=both;alter system set undo_tablespace=undotbs2 scope=both*ERROR at line 1:ORA-02097: parameter cannot be modified because specified value is invalidORA-30012: undo tablespace 'UNDOTBS2' does not exist or of wrong type
--删除错误的 undotbs2 05:43:26 > DROP TABLESPACE UNDOTBS2 INCLUDING CONTENTS AND DATAFILES;
Tablespace dropped.
05:43:34 >
--创建正确的 undocreate undo tablespace undotbs2 datafile '/u01/app/oracle/oradata/ntxdb/undotbs2_01.dbf' size 10G ;
--替换alter system set undo_tablespace=undotbs2 scope=both;
--删除drop tablespace undotbs1
--重新替换回来!create undo tablespace undotbs1 datafile '/u01/app/oracle/oradata/ntxdb/undotbs01.dbf' size 30G autoextend off;
alter system set undo_tablespace=undotbs1 scope=both;
drop tablespace undotbs2 including contents and datafiles;
--更新 pfilecreate pfile from spfile;
alter tablespace UNDOTBS1 add datafile '/u01/app/oracle/oradata/ntxdb/undotbs02.dbf' size 30g autoextend off;
alter tablespace UNDOTBS1 add datafile '/u01/app/oracle/oradata/ntxdb/undotbs03.dbf' size 30g autoextend off;
日积月累
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~