Issuu on Google+

Langkah Reorg No. Langkah Start 1 Tambah external storage /buffer 2 alter database backup controlfile to trace; 3 alter database backup controlfile to '/oracle/controlfile_XXX.ctl'; tuning pfile untuk mengganti parameter db_files (500 ke 8192), shared_pool_size=2G, large_pool_size=2G, sga_max_size=10G, 4 java_pool_size=512M ganti parameter MAXDATAFILES di user_dump_dest (/oracle/admin/moneta/udump) hasil langkah nomor 1 dari 200 menjadi 8192 simpan 5 sebagai crdb_moneta_07012009.sql (di /oracle/admin/moneta/scripts) 6 SQL> shutdown immediate SQL> startup nomount pfile=$ORACLE_HOME/dbs/initmoneta.ora SQL> @/oracle/admin/moneta/scripts/crdb_moneta_07012009.sql SQL> recover database; SQL> alter database open; SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '/ora_data03/mon_usg/temp01.dbf' SIZE 23157M REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 65535M; SQL> create spfile from pfile; SQL> shutdown immediate SQL> startup 7 Buat tablespace BUFFER_DATA sebesar 400 GB (datafile size dibuat 4 GB). Script crts_buffer_07012009.sh

End 10:30 11:00 11:02

11:00 11:02 11:04

11:04

11:08

11:08 11:15

11:15

12:00

14:08

11:59

8 Resize TEMP tablespace dari semual satu datafile (24 GB) menjadi 10 datafile masing-masing 2 GB -> 20 GB SQL> select name,bytes from v$tempfile; NAME -------------------------------------------------------------------------------BYTES ---------/ora_data03/mon_usg/temp01.dbf 2.43E+10

SQL> alter database tempfile '/ora_data03/mon_usg/temp01.dbf' resize 2G; Database altered. SQL> alter database tempfile '/ora_data03/mon_usg/temp01.dbf' autoextend off; Database altered. SQL> select name,bytes from v$tempfile; NAME -------------------------------------------------------------------------------BYTES ---------/ora_data03/mon_usg/temp01.dbf 2147483648

SQL> !df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 5111808 5034132 2% 2595 1% / /dev/hd2 7077888 4677844 34% 53306 5% /usr /dev/hd9var 10092544 10026304 1% 615 1% /var /dev/hd3 2097152 1993396 5% 175 1% /tmp /dev/fwdump 393216 392828 1% 4 1% /var/adm/ras/platform /dev/hd1 131072 105236 20% 36 1% /home /proc - - - /proc /dev/hd10opt 7077888 6850424 4% 7558 1% /opt /dev/oraclelv 20971520 11483816 46% 19150 1% /old_oracle /dev/moneta_homelv 20971520 2334952 89% 191130 25% /old_moneta_home /dev/lv_moneta_home 83886080 26715912 69% 425542 7% /moneta_home /dev/lv_moneta_pol01 154402816 147328728 5% 38499 1% /moneta_polled01 /dev/lv_moneta_par01 214958080 190302648 12% 109615 1% /moneta_parsed01 /dev/lv_moneta_tem01 153616384 51443368 67% 39654 1% /moneta_temp01 /dev/lv_oracle 24379392 14066132 43% 19916 1% /oracle /dev/lv_oracle_dat01 681574400 236990844 66% 44 1% /ora_data01 /dev/lv_oracle_dat02 681574400 312891412 55% 45 1% /ora_data02 /dev/lv_oracle_dat03 681574400 271645272 61% 46 1% /ora_data03 /dev/lv_oracle_dat04 681574400 358286884 48% 35 1% /ora_data04 /dev/lv_moneta_col01 1022361600 465125700 55% 586013 1% /moneta_collected01 /dev/moneta_coll01lv 734003200 621769988 16% 83203 1% /buffer SQL> alter tablespace temp add tempfile 2 '/ora_data04/mon_usg/temp02.dbf' size 2G, 3 '/ora_data03/mon_usg/temp03.dbf' size 2G, 4 '/ora_data04/mon_usg/temp04.dbf' size 2G, 5 '/ora_data03/mon_usg/temp05.dbf' size 2G, 6 '/ora_data04/mon_usg/temp06.dbf' size 2G, 7 '/ora_data03/mon_usg/temp07.dbf' size 2G, 8 '/ora_data04/mon_usg/temp08.dbf' size 2G, 9 '/ora_data03/mon_usg/temp09.dbf' size 2G, 10 '/ora_data04/mon_usg/temp10.dbf' size 2G; Tablespace altered. SQL> 12:48:05 SQL> alter tablespace UNDOTBS1 add datafile 12:49:26 2 '/ora_data03/mon_usg/undotbs02.dbf' size 2G, 12:58:05 3 '/ora_data04/mon_usg/undotbs03.dbf' size 2G, 12:58:18 4 '/ora_data03/mon_usg/undotbs04.dbf' size 2G, 12:58:29 5 '/ora_data04/mon_usg/undotbs05.dbf' size 2G, 12:58:39 6 '/ora_data03/mon_usg/undotbs06.dbf' size 2G, 12:58:51 7 '/ora_data04/mon_usg/undotbs07.dbf' size 2G, 12:59:01 8 '/ora_data03/mon_usg/undotbs08.dbf' size 2G, 12:59:13 9 '/ora_data04/mon_usg/undotbs09.dbf' size 2G, 12:59:23 10 '/ora_data03/mon_usg/undotbs10.dbf' size 2G;

12:59

Tablespace altered. Elapsed: 00:03:09.86 13:02:51 SQL>

9 Reorg the tablespace.

13:02

Wednesday, 7 Jan 2009 14:30

Sunday, 11 Jan 2009 17:00


tmp