發布時間: 2017-06-16 13:48:20
#(1)在主庫上操作,先備份一個pfile SQL> create pfile='/oracle/pfile_4.ora' from spfile; File created. #(2)開始在線調整sga、pga SQL> alter system set sga_max_size=8192M scope=spfile; System altered. SQL> ALTER system SET sga_target=3072M scope=spfile; System altered. SQL> #(3)將調整過的保存到啟動參數里面 SQL> create pfile from spfile; File created. SQL> #(4)查看主庫的sga、pga配置,調整已經生效了 SQL> show parameter sga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 8G sga_target big integer 3G SQL> show parameter pga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ pga_aggregate_target big integer 4940M SQL> SQL> #(5)這里其實也不用shutdown、startup已經生效了,不過為了驗證下,所以我這里做了這個操作 SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 8551575552 bytes Fixed Size 2270360 bytes Variable Size 8120175464 bytes Database Buffers 419430400 bytes Redo Buffers 9699328 bytes Database mounted. Database opened. SQL> SQL> SQL> #(6)再次查看主庫的sga、pga配置,重啟后,仍然生效 SQL> show parameter sga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 8G sga_target big integer 3G SQL> show parameter pga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ pga_aggregate_target big integer 4940M SQL> |
# (1)在備庫上操作,先備份參數文件 SQL> create pfile='/oracle/pfile_4.ora' from spfile; File created. SQL> #(2)開始在線調整 SQL> alter system set sga_max_size=8192M scope=spfile; System altered. SQL> ALTER system SET sga_target=2048M scope=spfile; System altered. SQL> #(3)將修改保存到啟動參數文件 SQL> create pfile from spfile; File created. SQL> #(4)重啟備庫,驗證配置,其實在線生效也不用做shutdown、startup,這里只是驗證下 SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> SQL> SQL> startup ORACLE instance started. Total System Global Area 8551575552 bytes Fixed Size 2270360 bytes Variable Size 7247760232 bytes Database Buffers 1291845632 bytes Redo Buffers 9699328 bytes Database mounted. Database opened. SQL> # (5)開啟備庫日志應用 SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered. SQL> #(6)查看備庫的sga、pga配置已經生效 SQL> show parameter sga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ lock_sga boolean FALSE pre_page_sga boolean FALSE sga_max_size big integer 8G sga_target big integer 2G SQL> show parameter gpa SQL> show parameter pga NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ pga_aggregate_target big integer 4940M SQL> |
#(1)在主庫創建臨時表 SQL> create table z_tim(id number); Table created. SQL> insert into z_tim values(1); 1 row created. SQL> commit; Commit complete. SQL> #(2)切換日志 SQL> alter system switch logfile; System altered. SQL> |
# 在備庫上查詢這個臨時表,看到數據存在 SQL> select * from z_tim; ID ---------- 1 SQL> |
SQL> select sequence#,applied from v$archived_log order by sequence# asc; ………. SEQUENCE# APPLIED ---------- --------- 934 YES 935 YES 936 YES 937 YES 938 IN-MEMORY 918 rows selected. SQL> |
上一篇: 親測有效:高速下載360云盤文件方法
下一篇: Linux系統新手學習的11點建議