合 Oracle重命名表空间
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | SYS@ora11g> select * from v$tablespace; TS# NAME INC BIG FLA ENC ---------- ------------------------------ --- --- --- --- 0 SYSTEM YES NO YES 1 SYSAUX YES NO YES 2 UNDOTBS1 YES NO YES 4 USERS01 YES NO YES 3 TEMP NO NO YES 6 EXAMPLE YES NO YES SYS@ora11g> alter tablespace users01 rename to users02; Tablespace altered. SYS@ora11g> select * from v$tablespace; TS# NAME INC BIG FLA ENC ---------- ------------------------------ --- --- --- --- 0 SYSTEM YES NO YES 1 SYSAUX YES NO YES 2 UNDOTBS1 YES NO YES 4 USERS02 YES NO YES SYS@ora11g> alter tablespace SYSTEM rename to system01; alter tablespace SYSTEM rename to system01 * ERROR at line 1: ORA-00712: cannot rename system tablespace SYS@ora11g> alter tablespace SYSAUX rename to system01; alter tablespace SYSAUX rename to system01 * ERROR at line 1: ORA-13502: Cannot rename SYSAUX tablespace SYS@ora11g> alter tablespace UNDOTBS1 rename to UNDO01; Tablespace altered. SYS@ora11g> alter tablespace TEMP rename to TEMP2; Tablespace altered. SYS@ora11g> select * from v$tablespace; TS# NAME INC BIG FLA ENC ---------- ------------------------------ --- --- --- --- 0 SYSTEM YES NO YES 1 SYSAUX YES NO YES 2 UNDO01 YES NO YES 4 USERS02 YES NO YES 3 TEMP2 NO NO YES 6 EXAMPLE YES NO YES SYS@ora11g> show parameter undo NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ undo_management string AUTO undo_retention integer 900 undo_tablespace string UNDOTBS1 SYS@ora11g> startup force ORACLE instance started. Total System Global Area 6413680640 bytes Fixed Size 2265224 bytes Variable Size 1191186296 bytes Database Buffers 5200936960 bytes Redo Buffers 19292160 bytes Database mounted. Database opened. SYS@ora11g> show parameter undo NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ undo_management string AUTO undo_retention integer 900 undo_tablespace string UNDO01 |