RAC環境處理undo資料表空間過大的問題

來源:互聯網
上載者:User

RAC環境處理undo資料表空間過大的問題:

  1. SQL> conn /as sysdba  
  2. Connected.  
  3. SQL> select instance_number,instance_name from gv$instance;  
  4.   
  5. INSTANCE_NUMBER INSTANCE_NAME  
  6. --------------- ----------------   
  7.               1 unipsms1  
  8.               2 unipsms2  
  9.   
  10. SQL> select instance_number,instance_name from v$instance;  
  11.   
  12. INSTANCE_NUMBER INSTANCE_NAME  
  13. --------------- ----------------   
  14.               2 unipsms2  
  15.   
  16. SQL> show parameter undo_tablespace  
  17.   
  18. NAME                                 TYPE        VALUE  
  19. ------------------------------------ ----------- ------------------------------   
  20. undo_tablespace                      string      UNDOTBS2  
  21. SQL> select ts#,name from v$tablespace where name = 'UNDOTBS2';  
  22.   
  23.        TS# NAME  
  24. ---------- ------------------------------   
  25.          4 UNDOTBS2  
  26. SQL> select ts#,name,BYTES/1024/1024/1024,CREATE_BYTES/1024/1024/1024 from V$DATAFILE where ts# = 4;  
  27.   
  28.        TS# NAME                                                         BYTES/1024/1024/1024 CREATE_BYTES/1024/1024/1024  
  29. ---------- ------------------------------------------------------------ -------------------- ---------------------------   
  30.          4 +DG01R10/unipsms/datafile/undotbs2.267.746473789                        7887.5791                           4  
  31. SQL> create bigfile undo tablespace UNDOTBS3 datafile '+DG01R10' size 500g autoextend on next 1g maxsize unlimited;  
  32.     
  33. 資料表空間已建立。  
  34. SQL> alter system set undo_tablespace=UNDOTBS3 scope=both sid='unipsms2';  
  35.     
  36. 系統已更改。  
  37. SQL> show parameter undo_tablespace;  
  38.   
  39. NAME                                 TYPE        VALUE  
  40. ------------------------------------ ----------- ------------------------------   
  41. undo_tablespace                      string      UNDOTBS3  
  42. SQL> select SEGMENT_NAME,TABLESPACE_NAME,STATUS from dba_rollback_segs where TABLESPACE_NAME = 'UNDOTBS2' and status = 'ONLINE';  
  43.   
  44. no rows selected  
  45. SQL> select ts#,name from v$tablespace where name = 'UNDOTBS2';  
  46.   
  47.        TS# NAME  
  48. ---------- ------------------------------------------------------------   
  49.          4 UNDOTBS2  
  50.   
  51. SQL> select ts#,name,BYTES/1024/1024/1024,CREATE_BYTES/1024/1024/1024 from V$DATAFILE where ts# = 4;  
  52.   
  53.        TS# NAME                                                         BYTES/1024/1024/1024 CREATE_BYTES/1024/1024/1024  
  54. ---------- ------------------------------------------------------------ -------------------- ---------------------------   
  55.          4 +DG01R10/unipsms/datafile/undotbs2.267.746473789                        7887.5791                           4  
  56.   
  57. SQL> drop tablespace UNDOTBS2 including contents and datafiles;  
  58.   
  59. Tablespace dropped.  
  60.   
  61. SQL> select ts#,name from v$tablespace where name = 'UNDOTBS2';  
  62.   
  63. no rows selected  
  64.   
  65. SQL> select ts#,name,BYTES/1024/1024/1024,CREATE_BYTES/1024/1024/1024 from V$DATAFILE where ts# = 4;  
  66.   
  67. no rows selected  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.