Oracle Point, Oracle Life.

Most Popular Posts

July 6, 2007

High Water Mark

Filed under: OraclePoint — R.Wang @ 3:41 pm

1. Dropping user/schema would cause any system priveleges user has to disappear and the import would not restore them. The import will import data structure, data, constraints,trigger,procedure and so on.

2. How to move table from one tablespace to another one?
Refer to: http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:47812348053
Also in local Oracle Articles.

3. How to Calculate the value of High Water Mark?

SELECT BLOCKS
FROM DBA_SEGMENTS
WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table);

ANALYZE TABLE owner.table ESTIMATE STATISTICS;

SELECT EMPTY_BLOCKS
FROM DBA_TABLES
WHERE OWNER=UPPER(owner) AND TABLE_NAME = UPPER(table);

Thus, the tables’ HWM = (query result 1) - (query result 2) - 1
NOTE: You can also use the DBMS_SPACE package and calculate the
HWM =TOTAL_BLOCKS - UNUSED_BLOCKS - 1.

4. Truncate table
A truncate moves the High Water Mark of the table back to zero. No row-level locks are taken, no redo or rollback is generated. All extents bar the initial are de-allocated from the table

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Popularity: 2% [?]

Tags:none

Autocommit in Oralce JDBC

Filed under: OraclePoint — R.Wang @ 3:37 pm

With introduction of Oracle Application Server, the previous oralce application, mainly oracle forms and reports, is required to immigrate to web platform. That means, Oracle JDBC, impletementing through OC4J, plays more important role in the onward application.
An problem recently experienced is that a long-writting procedure with DML statement could not be submitted without explicit commit statement. The solution for this kind of problem is always to add explicit commit definitely.

Investgating this issue, some points are listed for note.

  1. Autocommit option is default in oracle JDBC
  2. Autocommit option is required to be disabled if the select
    statement follows by FOR UPDATE; Otherwise, an error ora-01002:
    fetch out of sequence will arise.
  3. By default, the DML statement in connection with Oracle JDBC will
    be committed right after the successful execution.
  4. In order to improve the performance, especially on the long
    transaction, the autocommit option is disabled and smart commit
    strategy or batch executing is required.
  5. As autocommit is disabled, explicit or implict commit for batch
    executing will be placed carefully.

An useful article is listed as http://www.javaperformancetuning.com/tips/jdbctransaction.shtml for “JDBC transaction performance”.

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Popularity: 2% [?]

Tags:none

Page: 1 | ... | 50 | 51 | 52 | 53
 

Windows Live Translator:

Google