多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > 互聯網 > oracle public redo thread and private redo thread

oracle public redo thread and private redo thread

來源:程序員人生   發布時間:2014-09-05 01:23:54 閱讀次數:3640次

復習之前的學習內容,對public redo thread 和 private redo thread 的用處還是比較模糊,網上搜集的資料非常有限,看來有些好東西不跳墻是不行的。

廢話少說,知識點記錄下來:

在rac環境下,每個實例都有自己的redo log,這套redo log稱為redo thread。這套概念同樣適用于單實例數據庫。

redo thread有兩種,private 和 public ,在默認情況下,我們使用的是public thread。但是如果我們在創建redol log時明確指定了thread參數,那么該redo為private redo。

實驗如下:


單實例:

SQL> l 1* select thread#,status,enabled from v$thread SQL> / THREAD# STATUS ENABLED ---------- ------ -------- 1 OPEN PUBLIC SQL> select group#,thread#,status from v$log; GROUP# THREAD# STATUS ---------- ---------- ---------------- 4 1 INACTIVE 5 1 CURRENT SQL> col member for a60 SQL> select group#,member from v$logfile; GROUP# MEMBER ---------- ------------------------------------------------------------ 4 /home/app/oraten/oradata/oraten/redo04.log 5 /home/app/oraten/oradata/oraten/redo05.log SQL> alter database add logfile thread 2 group 6 '/home/app/oraten/oradata/oraten/redo06.log' size 100M; Database altered. SQL> alter database add logfile thread 2 group 7 '/home/app/oraten/oradata/oraten/redo07.log' size 100M; Database altered. SQL> select thread#,status,enabled from v$thread; THREAD# STATUS ENABLED ---------- ------ -------- 1 OPEN PUBLIC 2 CLOSED DISABLED SQL> alter database enable thread 2; Database altered. SQL> select thread#,status,enabled from v$thread; THREAD# STATUS ENABLED ---------- ------ -------- 1 OPEN PUBLIC 2 CLOSED PRIVATE SQL> show parameter thread NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ parallel_threads_per_cpu integer 2 thread integer 1 SQL> alter system set thread=2 scope=spfile; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 281018368 bytes Fixed Size 2095672 bytes Variable Size 222299592 bytes Database Buffers 50331648 bytes Redo Buffers 6291456 bytes Database mounted. Database opened. SQL> select thread#,status,enabled from v$thread; THREAD# STATUS ENABLED ---------- ------ -------- 1 CLOSED PUBLIC 2 OPEN PRIVATE SQL> select group#,thread#,status from v$log; GROUP# THREAD# STATUS ---------- ---------- ---------------- 4 1 INACTIVE 5 1 CURRENT 6 2 CURRENT 7 2 UNUSED SQL>

Rac環境下:


[oracle@node1 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora.easy.db application 0/0 0/1 ONLINE ONLINE node1 ora....y1.inst application 0/5 0/0 ONLINE ONLINE node1 ora....y2.inst application 0/5 0/0 ONLINE ONLINE node2 ora....SM1.asm application 0/5 0/0 ONLINE ONLINE node1 ora....E1.lsnr application 0/5 0/0 ONLINE ONLINE node1 ora.node1.gsd application 0/5 0/0 ONLINE ONLINE node1 ora.node1.ons application 0/3 0/0 ONLINE ONLINE node1 ora.node1.vip application 0/0 0/0 ONLINE ONLINE node1 ora....SM2.asm application 0/5 0/0 ONLINE ONLINE node2 ora....E2.lsnr application 0/5 0/0 ONLINE ONLINE node2 ora.node2.gsd application 0/5 0/0 ONLINE ONLINE node2 ora.node2.ons application 0/3 0/0 ONLINE ONLINE node2 ora.node2.vip application 0/0 0/0 ONLINE ONLINE node2 [oracle@node1 ~]$ [oracle@node1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Aug 30 17:47:08 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> desc v$thread Name Null? Type ----------------------------------------- -------- ---------------------------- THREAD# NUMBER STATUS VARCHAR2(6) ENABLED VARCHAR2(8) GROUPS NUMBER INSTANCE VARCHAR2(80) OPEN_TIME DATE CURRENT_GROUP# NUMBER SEQUENCE# NUMBER CHECKPOINT_CHANGE# NUMBER CHECKPOINT_TIME DATE ENABLE_CHANGE# NUMBER ENABLE_TIME DATE DISABLE_CHANGE# NUMBER DISABLE_TIME DATE LAST_REDO_SEQUENCE# NUMBER LAST_REDO_BLOCK NUMBER LAST_REDO_CHANGE# NUMBER LAST_REDO_TIME DATE SQL> select thread#,status,enabled from v$thread; THREAD# STATUS ENABLED ---------- ------ -------- 1 OPEN PUBLIC 2 OPEN PUBLIC SQL> show parameter thread NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ parallel_threads_per_cpu integer 2 thread integer 1 SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options [oracle@node1 ~]$ ssh oracle@node2 Last login: Mon Aug 25 13:09:51 2014 from node3 [oracle@node2 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Aug 30 17:48:27 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> show parameter thread NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ parallel_threads_per_cpu integer 2 thread integer 2 SQL> alter system set thread=1 scope=spfile sid='easy2'; System altered. SQL> alter system set thread=2 scope=spfile sid='easy1'; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options [oracle@node2 ~]$ exit logout Connection to node2 closed. [oracle@node1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Aug 30 17:55:54 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 205520896 bytes Fixed Size 2095088 bytes Variable Size 121636880 bytes Database Buffers 75497472 bytes Redo Buffers 6291456 bytes Database mounted. Database opened. SQL> show parameter thread NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ parallel_threads_per_cpu integer 2 thread integer 2 SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options [oracle@node1 ~]$ ssh oracle@node2 Last login: Sat Aug 30 17:54:14 2014 from node1 [oracle@node2 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Aug 30 17:57:00 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 205520896 bytes Fixed Size 2095088 bytes Variable Size 100665360 bytes Database Buffers 96468992 bytes Redo Buffers 6291456 bytes Database mounted. Database opened. SQL> show parameter thread NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ parallel_threads_per_cpu integer 2 thread integer 1 SQL> desc gv$log Name Null? Type ----------------------------------------- -------- ---------------------------- INST_ID NUMBER GROUP# NUMBER THREAD# NUMBER SEQUENCE# NUMBER BYTES NUMBER MEMBERS NUMBER ARCHIVED VARCHAR2(3) STATUS VARCHAR2(16) FIRST_CHANGE# NUMBER FIRST_TIME DATE SQL> select inst_id,group#,thread# from gv$log; INST_ID GROUP# THREAD# ---------- ---------- ---------- 1 1 1 1 2 1 1 3 2 1 4 2 2 1 1 2 2 1 2 3 2 2 4 2 8 rows selected. SQL> show parameter thread NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ parallel_threads_per_cpu integer 2 thread integer 1 SQL> select thread#,status,enabled from v$thread 2 ; THREAD# STATUS ENABLED ---------- ------ -------- 1 OPEN PUBLIC 2 OPEN PUBLIC SQL> alter database add logfile thread 3 group 5 '+DG4' size 50M; Database altered. SQL> alter database add logfile member '+DG4' to group 5; Database altered. SQL> alter database add logfile thread 3 group 6 '+DG4' size 50M; Database altered. SQL> alter database add logfile member '+DG4' to group 6; Database altered. SQL> alter database enable thread 3; Database altered. SQL> select thread#,status,enabled from v$thread; THREAD# STATUS ENABLED ---------- ------ -------- 1 OPEN PUBLIC 2 OPEN PUBLIC 3 CLOSED PRIVATE

結論:如果我們使用add logifle 語句時,指定的thread大于instancde_number,就會產生private thread(個人猜測),只有private thread的作用,目前尚未發現有特別的用處



生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 欧美一级视频免费 | 亚洲性图在线 | 国产国语一级a毛片高清视频 | 在线视频精品视频 | 亚洲日韩欧美综合 | 亚洲一区二区影院 | 国产精品久久久久久久午夜片 | 亚洲hd | 337p日本欧洲亚洲大胆艺术图666 | 亚洲国产综合网 | 欧美ucjizz免费播放器 | 一本大道香蕉久在线不卡视频 | 欧美一级毛片欧美大尺度一级毛片 | 综合色在线观看 | 国产精品99久久久久久人 | www.亚洲视频.com | 中文字幕第八页 | 日本大胆一区免费视频 | 手机在线观看视频 | 麻豆片免费观看在线看 | 欧美一级欧美一级在线播放 | 亚洲视频在线观看免费 | 欧美久久亚洲精品 | 久久亚洲精品人成综合网 | 久久一区不卡中文字幕 | 免费在线亚洲视频 | 欧美三级欧美一级 | 97碰碰碰免费公开在线视频 | 国产玖玖在线 | 丁香综合五月 | 美国毛片免费看 | 欧美一区二区三区不卡免费观看 | 好吊妞视频在线观看 | 免费网站在线观看国产v片 免费网站在线看 | 日本一区二区免费在线观看 | 亚洲精品自拍区在线观看 | 性短视频在线观看免费不卡流畅 | 娇小老少配xxxxx性视频 | 亚洲国产日韩欧美 | 亚洲欧美日韩另类精品一区二区三区 | 91丨九色丨首页在线观看 |