RMAN深入解析之--内存中的RMAN
RMAN深入解析之--内存中的RMANRMAN会在内存中创建一些缓冲区,然后通过这些缓冲区将数据块写入到备份中。内存的利用与PGA(有时是SGA)的总体大小有关。内存缓冲区
RMAN深入解析之--内存中的RMAN
RMAN会在内存中创建一些缓冲区,然后通过这些缓冲区将数据块 写入到备份中。内存的利用与PGA(有时是SGA)的总体大小有关。
内存缓冲区分为输入缓冲区和输出缓冲区。输入缓冲区(input buffer)填充从备份文件中读取数据块;输出缓冲区(output buffer)则在执行内存对内存的写操作时填充需要备份的数据块,一旦输出缓冲区被填满,输出缓冲区的内容就会被写入到备份位置。
RMAN的内存利用
在磁盘上备份会使用PGA内存空间作为备份缓冲区,PGA内存空间从用于信道进程的内存空间中分配。如果操作系统没有配置本地异步I/O,则可以利用DBWR_IO_SLAVES参数使用I/O丛属来填充内存中的输入缓冲。如果设置DBWR_IO_SLAVES参数为任意的非零值,则RMAN会自动分配4个I/O从属来协调输入缓冲区中数据块加载。为了实现这一功能,RMAN必须利用一个共享内存区域。因此,用于磁盘备份的内存缓冲区会被推入共享池,如果存在大池,则被推入大池。如果没有使用磁带I/O从属,则会在PGA中分配用于磁带输出缓冲区的内存。
查看RMAN备份输入缓冲区的信息:
[oracle@rh6 ~]$ rman target / Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jun 17 18:30:27 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: PROD (DBID=239333010) RMAN> backup database; Starting backup at 17-JUN-14 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=43 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00001 name=/u01/app/oracle/oradata/prod/system01.dbf input datafile file number=00002 name=/u01/app/oracle/oradata/prod/sysaux01.dbf input datafile file number=00005 name=/u01/app/oracle/oradata/prod/example01.dbf input datafile file number=00003 name=/u01/app/oracle/oradata/prod/undotbs01.dbf input datafile file number=00004 name=/u01/app/oracle/oradata/prod/users01.dbf channel ORA_DISK_1: starting piece 1 at 17-JUN-14 channel ORA_DISK_1: finished piece 1 at 17-JUN-14 piece handle=/u01/app/oracle/product/11.2.0/db_1/dbs/04pb386s_1_1 tag=TAG20140617T183051 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:42 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 17-JUN-14 channel ORA_DISK_1: finished piece 1 at 17-JUN-14 piece handle=/u01/app/oracle/product/11.2.0/db_1/dbs/05pb38a3_1_1 tag=TAG20140617T183051 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 17-JUN-14 查看缓冲区信息: sql>select set_count,device_type,type,filename,buffer_size,buffer_count,open_time,close_time 2 from v$backup_async_io 3* order by set_count,type,open_time,close_time SET_COUNT DEVICE_TYP TYPE FILENAME BUFFER_SIZE BUFFER_COUNT OPEN_TIME CLOSE_TIM ---------- ---------- --------- ---------------------------------------- ----------- ------------ --------- --------- 4 DISK AGGREGATE 0 0 17-JUN-14 17-JUN-14 4 DISK INPUT /u01/app/oracle/oradata/prod/example01.d 524288 6 17-JUN-14 17-JUN-14 bf 4 DISK INPUT /u01/app/oracle/oradata/prod/sysaux01.db 524288 6 17-JUN-14 17-JUN-14 f 4 DISK INPUT /u01/app/oracle/oradata/prod/system01.db 524288 6 17-JUN-14 f 4 DISK INPUT /u01/app/oracle/oradata/prod/users01.dbf 524288 6 17-JUN-14 17-JUN-14 4 DISK INPUT /u01/app/oracle/oradata/prod/undotbs01.d 524288 6 17-JUN-14 17-JUN-14 bf 4 DISK OUTPUT /u01/app/oracle/product/11.2.0/db_1/dbs/ 1048576 4 17-JUN-14 04pb386s_1_1 7 rows selected. Elapsed: 00:00:00.02 18:32:19 SYS@ prod>本文出自 “天涯客的blog” 博客,请务必保留此出处
,
Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Oracle View Encryption allows you to encrypt data in the view, thereby enhancing the security of sensitive information. The steps include: 1) creating the master encryption key (MEk); 2) creating an encrypted view, specifying the view and MEk to be encrypted; 3) authorizing users to access the encrypted view. How encrypted views work: When a user querys for an encrypted view, Oracle uses MEk to decrypt data, ensuring that only authorized users can access readable data.

Uninstall method for Oracle installation failure: Close Oracle service, delete Oracle program files and registry keys, uninstall Oracle environment variables, and restart the computer. If the uninstall fails, you can uninstall manually using the Oracle Universal Uninstall Tool.

Deleting all data in Oracle requires the following steps: 1. Establish a connection; 2. Disable foreign key constraints; 3. Delete table data; 4. Submit transactions; 5. Enable foreign key constraints (optional). Be sure to back up the database before execution to prevent data loss.

Oracle Invalid numeric errors may be caused by data type mismatch, numeric overflow, data conversion errors, or data corruption. Troubleshooting steps include checking data types, detecting digital overflows, checking data conversions, checking data corruption, and exploring other possible solutions such as configuring the NLS_NUMERIC_CHARACTERS parameter and enabling data verification logging.

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

Oracle database paging uses ROWNUM pseudo-columns or FETCH statements to implement: ROWNUM pseudo-columns are used to filter results by row numbers and are suitable for complex queries. The FETCH statement is used to get the specified number of first rows and is suitable for simple queries.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.
