zoukankan      html  css  js  c++  java
  • 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 invalid
    ORA-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 >

    --创建正确的 undo
    create 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 including contents and datafiles;

    --重新替换回来!
    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;

    --更新 pfile
    create 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;

  • 相关阅读:
    c语言中的增量与减量········不要太聪明
    存储器··············RAM,SRAM,EEPROM 等等
    对于 sizeof(char)的一些零碎······
    C语言中float,double等类型,在内存中的结构
    同步异步存储器
    Linux的帧缓冲设备(Framebuffer)简介
    嵌入式 c 中结构体经常碰到_I、 __O 、__IO是什么意思?
    新型的按键扫描程序
    数据结构
    jQuery(八)选择器与选择方法
  • 原文地址:https://www.cnblogs.com/ss-33/p/12748345.html
Copyright © 2011-2022 走看看