Wednesday, January 25, 2017

Rman Duplicate database from Active database

From 11g above, you can use rman to duplicate database from an active database instead of from a backup.
Two big disadvantages of the ACTIVE database duplication method are:
·         Negative performance impact on the source database. This impact applies to the whole duplication time.
·         High network traffic on the connection between the source and target databases.
Test envorinment:
     SID: testprd
     SID: testrman

Monday, December 5, 2016

Oracle 10/11 install on Centos 7


If you get error
“Error in invoking target 'collector' of makefile '/orasw/app/oracle/product/10.2.0/sysman/lib/'” at 83% can be ignored (Metalink 957982.1)


If you get the following error:

PRVF-7532 : Package "pdksh" is missing on node "Hostname"
You can install ksh package (yum install ksh)then safely ignore it and  continue.

When getting error “Error in invoking target 'agent nmhs' of makefile '/orasw/app/oracle/product/11.2.0/sysman/lib/'.”
vi $ORACLE_HOME/sysman/lib/
Search for the line
Change it to:
And retry.

RAC: ORA-01410: invalid ROWID

Can try flushing the cache:
alter system flush buffer_cache;

Thursday, August 25, 2016

ORA-03114 and ORA-03137

Oracle Version:
Client sessions disconnected due to error "ORA-03114: Not Connected to Oracle".
In Alert log ORA-03137 is detected: "ORA-03137: TTC protocol internal error : [12333] [8] [57] [48] [] [] [] [] ".

Friday, October 9, 2015

optimizer_index_cost_adj hint

Sometimes you want to use alter session set optimizer_index_cost_adj=<value> to change the parameter, but you can also use hint for the purpose, for example:
select /*+ opt_param('optimizer_index_cost_adj',20) */ col1, col2 . .
And optimizer_mode hint:
select /*+ opt_param('optimizer_mode','first_rows_10') */ col1, col2 . . .  

Monday, September 28, 2015

Session hang because 'gc cr request' and 'cr request retry'

In 11g Rac, during datapump import, session hangs at step of importing indexes or constraints.

If you check v$session_wait for the sid, you may notice  'gc cr request' and 'cr request retry':

SQL> select event from v$session_wait where sid=405;

gc cr request

SQL> select event from v$session_wait where sid=405;

cr request retry

Mostly it's caused by Redo log IO performance or the interconnect performance.

You can try:
1) Improve the interconnect performance.
2) Improve the Redo log I/o performance.
3) Set undersore parameter "_cr_server_log_flush" =false.

Monday, June 15, 2015

SqlDeveloper 4.0 or later freezes

Starting from version 4.0, you may notice SqlDeveloper "freezes" quite regularly; it simply does nothing and does not accept keyboard input or mouse clicks. It remains in that state for 20 or 30 seconds, then continues to work normally. No error message or log entry.

It seems to be a java bug. Updating NVIDIA video driver can improve the performance. The recommended workaround from the Java Bug DB -- set this property by adding a line in sqldeveloper.conf:

AddVMOption -Dsun.awt.nopixfmt=true