Oracle管理

修改Data Guard主库备份库为异步io

时间:2014/10/25 21:41:34  作者:solgle  来源:www.solgle.com  查看:794  评论:0
内容摘要:前段时间查看Oracle数据库的数据文件是否异步io,发现Rac环境下默认确实是异步io,但是在Data Guard下却发现是ASYNC_OFF异步io的好处这里暂时不多说,下面修改Data Guard主库以及备份库为异步ioC:\Users\user>sqlplus sys/*...
前段时间查看Oracle数据库的数据文件是否异步io,发现Rac环境下默认确实是异步io,但是在Data Guard下却发现是ASYNC_OFF
异步io的好处这里暂时不多说,下面修改Data Guard主库以及备份库为异步io
C:\Users\user>sqlplus sys/********@os_solgle as sysdba;
SQL*Plus: Release 11.2.0.1.0 Production on Sat Oct 25 16:32:44 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
---查看当前参数值
SQL> show parameter filesystemio_options
 
NAME                                 TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
filesystemio_options                 string
none
 
SQL> alter system set filesystemio_options=setall scope=spfile;
 
System altered.
 
SQL> show parameter disk_async_io
SQL> show parameter disk_asynch_io
 
NAME                                 TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
disk_asynch_io                       boolean
TRUE
---重启数据库生效
SQL> startup force;
ORACLE instance started.
 
Total System Global Area 1252663296 bytes
Fixed Size                  2252824 bytes
Variable Size             838864872 bytes
Database Buffers          402653184 bytes
Redo Buffers                8892416 bytes
Database mounted.
Database opened.
SQL>
---查看现在的状态
SQL> set linesize 100
SQL> show parameter filesystemio_options
 
NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ----------
--------------------
filesystemio_options                 string                           SETALL
 
SQL> show parameter disk_asynch_io
 
NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ----------
--------------------
disk_asynch_io                       boolean                          TRUE
SQL>
----查看文件是否异步
SQL> set pagesize 200
SQL> select distinct filetype_name,asynch_io from v$iostat_file order by asynch_io asc;
 
FILETYPE_NAME                ASYNCH_IO
---------------------------- ---------
Archive Log                  ASYNC_OFF
Archive Log Backup           ASYNC_OFF
Control File                 ASYNC_OFF
Data File Backup             ASYNC_OFF
Data File Copy               ASYNC_OFF
Data File Incremental Backup ASYNC_OFF
Data Pump Dump File          ASYNC_OFF
Flashback Log                ASYNC_OFF
Log File                     ASYNC_OFF
Other                        ASYNC_OFF
Data File                    ASYNC_ON
Temp File                    ASYNC_ON
 
12 rows selected.
 
SQL>
 
----以上看出主库倒是改了,但是备份库情况如何呢?
C:\Users\user>sqlplus sys/********@sd_solgle as sysdba;
SQL*Plus: Release 11.2.0.1.0 Production on Sat Oct 25 16:43:22 2014
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> set pagesize 200
SQL> select distinct filetype_name,asynch_io from v$iostat_file order by asynch_io asc;
 
FILETYPE_NAME                ASYNCH_IO
---------------------------- ---------
Archive Log                  ASYNC_OFF
Archive Log Backup           ASYNC_OFF
Control File                 ASYNC_OFF
Data File                    ASYNC_OFF
Data File Backup             ASYNC_OFF
Data File Copy               ASYNC_OFF
Data File Incremental Backup ASYNC_OFF
Data Pump Dump File          ASYNC_OFF
Flashback Log                ASYNC_OFF
Log File                     ASYNC_OFF
Other                        ASYNC_OFF
Temp File                    ASYNC_OFF
 
12 rows selected.
SQL>
----以上可以看出备份库并没有实现异步,继续查看参数
SQL> show parameter filesystemio_options
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- --------------------------
filesystemio_options                 string      none
SQL> show parameter disk_asynch_io
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- --------------------------
disk_asynch_io                       boolean     TRUE
 
----下面进行修改
SQL> alter system set filesystemio_options=setall scope=spfile ;
System altered.
 
---安全起见,先stop standby
SQL> alter database stop logical standby apply;
 
Database altered.
 
SQL> startup force;
ORACLE instance started.
 
Total System Global Area 1039708160 bytes
Fixed Size                  2259800 bytes
Variable Size             696255656 bytes
Database Buffers          335544320 bytes
Redo Buffers                5648384 bytes
Database mounted.
Database opened.
SQL> alter database start logical standby apply immediate;
 
Database altered.
 
SQL> select distinct filetype_name,asynch_io from v$iostat_file order by asynch_
io asc;
 
FILETYPE_NAME                ASYNCH_IO
---------------------------- ---------
Archive Log                  ASYNC_OFF
Archive Log Backup           ASYNC_OFF
Control File                 ASYNC_OFF
Data File Backup             ASYNC_OFF
Data File Copy               ASYNC_OFF
Data File Incremental Backup ASYNC_OFF
Data Pump Dump File          ASYNC_OFF
Flashback Log                ASYNC_OFF
Log File                     ASYNC_OFF
Other                        ASYNC_OFF
Data File                    ASYNC_ON
Temp File                    ASYNC_ON
 
12 rows selected.
 
SQL>
 
---文件异步io设置成功,测试了下数据同步也正常
 
 
标签:修改DataGuard主库备份库为异步io 

出处:solgle
网址:www.solgle.com
相关文章
    相关评论
     img1 img2 img3 img4 img5 img6 img7 img8 img9 img10
    评论者:      验证码:  点击获取验证码
       Copyright © 2013-2028 solgle.com,All rights reserved.[solgle.com] 公安机关备案号:51010802000219
    Email:solgle@solgle.com; weixin:cd1008610000 ICP:蜀ICP备14011070号-1