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

Wednesday, December 03, 2008

Linux renew ip command

The -r flag explicitly
releases the current lease, and once the lease has been released, the
client exits. For example, open terminal and type the command:

$ sudo dhclient -r

Now obtain fresh IP:

$ sudo dhclient


There is no need to restart network service. Above command should
work with any Linux distro such as RHEL, Fedora, CentOS, Ubuntu and
others. On a related note you can also try out the following commands:

# ifdown eth0

# ifup eth0

# /etc/init.d/network restart


OR

# /etc/init.d/networking restart

Tuesday, September 09, 2008

Some tech books read recently


  • Troubleshooting Oracle Performance

Very comprehensive.


  • Effective Java Second Edition


Provide some simple and nice programming tips


  • Scrum and XP from the Trenches

Introductory book

  • Ask Tom 2007

Too many contents

Thursday, August 28, 2008

The web security tools

netcat - a featured networking utility which reads and writes data across
network connections, using the TCP/IP protocol.

http://netcat.sourceforge.net/

nmap - a free and open source (license) utility for network exploration or
security auditing

http://nmap.org/

paros - a web proxy
for people who need to evaluate the security of their web
applications


http://www.parosproxy.org/index.shtml

Wednesday, July 30, 2008

Develop the web application running on google app engine


My Example

http://yyang-hhong.appspot.com/


Required libraries

1. simplejson
setup.py install
2. prototype javascript library



Sunday, July 27, 2008

How to view PDF file in windows mobile

Most of PDF files are non-tagged files which text cannot be wrapped automatically, but you can use Adobe Acrobat to convert them to tagged file, and here is the instruction.

Guide to Creating Accessible PDF Files with Adobe Acrobat 5


Friday, July 18, 2008

Setup the automation test in windows with using CYGWIN

Some required libraries:

1. openssh
http://www.netadmintools.com/art516.html
2. apache httpd
3. sendmail - ssmtp, mutt
4. cron
5. cygrunsrv
6. vim

Tips:
1. For launching the ANT windows version, use dos2unix to convert the file $ANT_HOME/bin/ant

2. use ' od -c more ' to check if the file contains invisible characters

3. use tr to remove the invalid character, such as DOS escape character

echo `p4 counter $BRANCH_COUNTER_NAME` > $UNIX_TEMP_HOME/output-$BRANCH_COUNTER_NAME
DAS_COUNTER=`tr -d '\r' < $UNIX_TEMP_HOME/output-$BRANCH_COUNTER_NAME` 4. start and stop Apache httpd /usr/sbin/httpd.exe kill -TEAM 'cat /var/run/httpd.pid' 5. install cron and view logs cron-config /usr/bin/cronevents.exe 6. solve the cron error like 'can't switch user context' change the owner for all of files used by cron 7. ssh client can not access the windows network drive, but Cygwin can. the reason is because sshd service is running as LOCAL SYSTEM ACCOUNT.


8. cron job cannot access the existing windows network drive, but you can mount it at the beginning of the cron scripts, for instance

net use l: //test_machine/folder /user:test_user test_password

9. Cygwin Doesn't Register All Environment Variables When Using SSH, and here is a solution

http://smithii.com/node/44

Some good tools for Windows Mobile

I think the best reader for Windows Mobile is IE since it can display the html content with one column layout so user don’t have to move the content horizontally.

I have tried a couple of other reader such as Adobe reader, Text Reader, but unfortunately both
of them don’t support one column layout very well.


And there are a couple of tools that could convert the documents to html doc.



PDF2HTML - convert PDF to html

CHMUNPACKER - convert CHM to html

posting blog with using scribeFire

cool firefox addon!

Monday, April 17, 2006

Danny jumped to M$

Now M$ got three of best borland's chief architect .

Thursday, April 06, 2006

A interest query

we have a table items which miss some price for some weeks

































































WeekItemPrice
118
21null
31null
417
126
223
32null
132
23null
334
432
53null


we want to have a query to replace the missed price with last available price

SELECT i_item,
i_week,
i_price,
SUM(i_price) over(PARTITION BY new_price) new_price2
FROM (

SELECT i.item AS i_item,
i.week AS i_week,
i.price AS i_price,
SUM(i.price) over(ORDER BY i.item, i.week) new_price
FROM items i)
ORDER BY 1,
2

Monday, January 23, 2006

adopts dbms_rls to restrict the table access

oracle provides a powerful feature that allows developer to audit the table access with user_customized function, here is the sample

create or replace function GEORGEY_SECURITY_FUNCTION return boolean is
Result boolean;
begin
raise_application_error(-20101, 'illegal access');

return(Result);
end GEORGEY_SECURITY_FUNCTION;

BEGIN

dbms_rls.add_policy(object_schema => 'GEORGEY',
object_name => 'PEOPLE',
policy_name => 'GEORGEY_POLICY',
function_schema => 'GEORGEY',
policy_function => 'GEORGEY_SECURITY_FUNCTION',
statement_types => 'SELECT,UPDATE,INSERT,DELETE',
update_check => TRUE,
enable => TRUE,
static_policy => FALSE);

END;