2013.01.30

1.

ps -efL可以按线程显示。(linux中)

2.

使用grep 一个文件的时候,如何让它显示文件名呢?可以多grep 一个文件就显示文件名了。

: grep XXX file1 /dev/null

3.

使用如下sql查看standby中的哪些archive可以删除即已经应用到standby中。

select 'arch_' || MAX(RESETLOGS_ID) || '_' || THREAD# || '_' || MAX(SEQUENCE#) || '.arc' as filename from v$archived_log where applied = 'YES' group by thread#;

4. Oracle Supplemental logging

Supplemental logging is also a column in dba_tables.

 

Supplemental logging places additional column data into the redo log file whenever an UPDATE operation is performed. At the least, minimal database-level supplemental logging must be enabled for any Change Data Capture source database:

 

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

Database altered.

 

Why is supplemental logging needed? When a particular column is updated at the source database table for a set of rows, the values in the column or columns are logged by default. When these values are moved to the destination side, to which rows does Oracle apply them, or how does Oracle identify the rows to be updated? Supplemental logging provides the answers to these questions.

 

5. imp中使用commitbuffer提升性能。(使用buffer的时候,要commit=y。要不然就没有意义了。)

Import Commit

 

Definition

The COMMIT option for a database import, if turned on, means the import will commit the data after each array insert, where the size of the array insert is determined by the value of the BUFFER parameter.

 

Setting the COMMIT option off causes the import to commit after each object (ie, table), rather than after each buffer.

 

Requirements

Note that using COMMIT=N requires the presence of a large rollback segment.

 

Configuration

Oracle default value:                 COMMIT=N

Recommended value:                 COMMIT=N

Location:                 IMP command-line parameter

 

References

Metalink Note 93763.1 Tuning Considerations When Import Is Slow

 

 

Import Buffer

 

The default IMPort command for the application being migrated has the BUFFER option set to 3000000 bytes (ie, approx 3MB).

 

Providing the server has sufficient memory, this value can be increased.

 

Impact

A larger BUFFER value will reduce the number of times the import needs to access the dump file, as it reads BUFFER bytes from the dump file each time it is accessed.

 

Configuration

Recommended value:                 BUFFER=30000000 (~30MB)

Location:                 IMP command-line parameter

 

References

Metalink Note 93763.1 Tuning Considerations When Import Is Slow

 

 

posted @ 2013-01-30 17:59  酱油猫  阅读(156)  评论(0编辑  收藏  举报