Thursday, July 16, 2009

sqlplus tip

1. DEFINE_EDITOR=vi  - define the vi editor
2. EDIT - edit the sql statement in current buffer with using vi editor
3. save file <filename> - save the sql statement in current buffer to a file
4. get file <filename> - load the sql statement from file to current buffer
5. / - execute the sql statement in current buffer

Wednesday, July 15, 2009

Some tools

Ganglia - a tools to monitor the system performance

http://ganglia.info/

Hudson - A tools to perform the build and automation functional test

http://hudson.com/

nmon - a tools to monitor the Linux performance

http://blog.csdn.net/chinalinuxzend/archive/2009/06/03/4238526.aspx

Selenium - a tool to do the web automation test

http://seleniumhq.org/

Thursday, July 09, 2009

Some sql tips

sequence and streams

CREATE SEQUENCE some_sequence
  START WITH -1
  INCREMENT BY -100

Convert the delimited string to list

select (column_value).getstringval()
from xmltable('"a","b","c"');

Monday, June 29, 2009

Recreate capture process

select * from dba_queue_tables

BEGIN

  dbms_capture_adm.drop_capture(capture_name          => 'RSA_STREAMS_CAPTURE',
                                drop_unused_rule_sets => TRUE);

END;


BEGIN
  dbms_streams_adm.add_schema_rules(queue_name         => 'RSA_STREAMS_CAPTURE_Q',
                                    streams_type       => 'CAPTURE',
                                    streams_name       => 'RSA_STREAMS_CAPTURE',
                                    schema_name        => 'RSA_REP',
                                    include_dml        => TRUE,
                                    include_ddl        => FALSE,
                                    include_tagged_lcr => TRUE,
                                    inclusion_rule     => TRUE);

END;


list Opatch on non-default folder

/opatch lsinventory -invPtrloc /export/home/qeuser/AuthMgr/db/oraInst.loc

Friday, June 26, 2009

Using RMAN to deregister the missing archived log files

rman

connect target sys/<>
crosscheck archivelog all
delete expired archivelog all

Thursday, April 16, 2009

My first GAE java application

Here is the site http://test-java.appspot.com/

I developed it with using GWT and JPA which are two very popular technology.

Google provides a Eclipse PlugIn for GAE, that allows to debug the web application include both server and client side.

Tuesday, February 17, 2009

Debug java application

export _JAVA_OPTIONS="-Dlax.debug.level=3 -Dlax.debug.all=true"
export LAX_DEBUG=true

Sunday, January 25, 2009

The issue with using 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE'

There are some issues with recover control files in RESETLOGS mode after executing 'ALTER DATABASE BACKUP CONTROLFILE TO TRACE',


According to instruction, we need to register log files with using the following comamnd



ALTER DATABASE REGISTER LOGFILE ''


But sometimes the following error occurred

ORA-00604: error occurred at recursive SQL level" error on "ALTER DATABASE REGISTER LOGFILE '/<path>/1_234_636797930.dbf'"

And the work around is using the following command instead

ALTER DATABASE REGISTER PHYSICAL LOGFILE