查看: 778|回复: 0

[Mysql数据库] 12c RAC扩容undo表空间

发表于 2018-1-24 08:00:01

Oracle 12cR1 RAC

  1. col sid for a10
  2. col name for a20
  3. col value for a20
  4. select sid,name,value from v$spparameter where name='undo_tablespace';
  5. SID NAME VALUE
  6. ---------- ------------------------------ --------------------
  7. orcl2 undo_tablespace UNDOTBS2
  8. orcl1 undo_tablespace UNDOTBS1
  9. SYS@orcl1> show parameter create_file
  10. NAME TYPE VALUE
  11. ------------------------------------ ---------------------- ------------------------------
  12. db_create_file_dest string +DATADG
  13. SYS@orcl1>
  14. SYS@orcl1> show parameter undo
  15. NAME TYPE VALUE
  16. ------------------------------------ ---------------------- ------------------------------
  17. temp_undo_enabled boolean FALSE
  18. undo_management string AUTO
  19. undo_retention integer 900
  20. undo_tablespace string UNDOTBS1
  21. --不自动扩展,没有最大值
  22. SYS@orcl1> alter tablespace undotbs1 add datafile size 10m;
  23. SYS@orcl1> alter tablespace undotbs2 add datafile size 20m;
  24. --扩容到30m
  25. SYS@orcl1> alter database datafile '+DATADG/ORCL/DATAFILE/undotbs2.273.964970069' resize 30m;
  26. --自动扩展,最大100M
  27. SYS@orcl1> alter database datafile '+DATADG/ORCL/DATAFILE/undotbs2.273.964970069' autoextend on maxsize 100m;
  28. col file_name for a50
  29. set lines 200
  30. select file_name,bytes/1024/1024 mb,maxbytes/1024/1024 max_mb from dba_data_files where tablespace_name like 'UNDOTBS%';
  31. FILE_NAME MB MAX_MB
  32. ---------------------------------------------------------------------------- ------------- ----------
  33. +DATADG/ORCL/DATAFILE/undotbs1.261.964970069 155 32767.9844
  34. +DATADG/ORCL/DATAFILE/undotbs2.273.964970069 30 100
  35. +DATADG/ORCL/DATAFILE/undotbs1.367.965681119 10 0
  36. +DATADG/ORCL/DATAFILE/undotbs2.369.965681285 20 0
复制代码


回复

使用道具 举报