發(fā)布時(shí)間: 2017-06-16 13:48:20
#(1)在主庫上操作,先備份一個(gè)pfile SQL> create pfile='/oracle/pfile_4.ora' from spfile; File created. #(2)開始在線調(diào)整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)將調(diào)整過的保存到啟動(dòng)參數(shù)里面 SQL> create pfile from spfile; File created. SQL> #(4)查看主庫的sga、pga配置,調(diào)整已經(jīng)生效了 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)這里其實(shí)也不用shutdown、startup已經(jīng)生效了,不過為了驗(yàn)證下,所以我這里做了這個(gè)操作 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)在備庫上操作,先備份參數(shù)文件 SQL> create pfile='/oracle/pfile_4.ora' from spfile; File created. SQL> #(2)開始在線調(diào)整 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)將修改保存到啟動(dòng)參數(shù)文件 SQL> create pfile from spfile; File created. SQL> #(4)重啟備庫,驗(yàn)證配置,其實(shí)在線生效也不用做shutdown、startup,這里只是驗(yàn)證下 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)開啟備庫日志應(yīng)用 SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered. SQL> #(6)查看備庫的sga、pga配置已經(jīng)生效 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)在主庫創(chuàng)建臨時(shí)表 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> |
# 在備庫上查詢這個(gè)臨時(shí)表,看到數(shù)據(jù)存在 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> |
上一篇: 如何利用Docker生成SSL證書