Archives

You are currently viewing archive for October 2009
Category: Linux tips
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
How to Log SQL on JBoss - betweenGo

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<!-- param name="Threshold" value="INFO"/ -->
<param name="Threshold" value="DEBUG"/>

<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
</layout>

<!-- Hajime's change -->
<category name="org.jboss.ejb.plugins.cmp.jdbc">
<priority value="DEBUG"/>
</category>

<category name="org.hibernate.SQL">
<priority value="DEBUG"/>
</category>
</appender>
Category: MS tips
Posted by: hajime osako
SQL Log Rescue - Undo for SQL Server

or

DBCC LOG
SELECT top 10 * FROM ::fn_dblog(DEFAULT, DEFAULT);

transaction log

10/28: Oracle > Memo

Category: Oracle
Posted by: hajime osako
Data Dictionary:

V$SHARED_SERVER_MONITOR
V$DISPATCHER
V$SHARED_SERVER
v$CIRCUIT



Category: MS tips
Posted by: hajime osako
How to delay loading of specific services

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[Service name]

10/23: LoadOrder

Category: MS tips
Posted by: hajime osako
LoadOrder

This applet shows you the order that a Windows NT or Windows 2000 system loads device drivers. Note that on Windows 2000 plug-and-play drivers may actually load in a different order than the one calculated, because plug-and-play drivers are loaded on demand during device detection and enumeration.
Category: MS tips
Posted by: hajime osako
Category: Z. links
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako

10/21: Eclipse > MAT

Category: Web dev
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako

10/20: LInux > man

Category: Linux tips
Posted by: hajime osako
MAN PAGES - HOW TO READ MAN PAGES

man -M MANDIR # filename
man -M /usr/openwin/man mkfontdir

Category: Linux tips
Posted by: hajime osako
How to find PID listening particular Port on Linux/Solaris 10 Online Apps DBA: One Stop Shop for Apps DBA%u2019s

1. lsof doesnt work from non-global zone in solaris 10
2. Use -z option with lsof to list open files & processes with in non-global zone like lsof -z
Category: MS tips
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako
Adding Swap Space

mkswap /dev/hdb2
swapon /dev/hdb2
then modify /etc/fstab

To check:
cat /proc/swaps or free or swapon -s
Category: Linux tips
Posted by: hajime osako
Category: Web dev
Posted by: hajime osako
Date and Time handling in Python - Python Code Snippet

print time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
Category: MS tips
Posted by: hajime osako
Category: Oracle
Posted by: hajime osako
DBAsupport.com : Oracle 9i Central : Oracle Time Zone

select DBTIMEZONE from dual;
ALTER database SET TIME_ZONE = 'UTC';

select SESSIONTIMEZONE from dual;
alter session set TIME_ZONE='-03:00';
Category: Web dev
Posted by: hajime osako
MimeUtility (Java EE 6 - DRAFT)

There are a set of methods to encode and decode MIME headers as per RFC 2047. Note that, in general, these methods are not needed when using methods such as setSubject and setRecipients; JavaMail will automatically encode and decode data when using these "higher level" methods. The methods below are only needed when maniuplating raw MIME headers using setHeader and getHeader methods. A brief description on handling such headers is given below:

RFC 822 mail headers must contain only US-ASCII characters. Headers that contain non US-ASCII characters must be encoded so that they contain only US-ASCII characters. Basically, this process involves using either BASE64 or QP to encode certain characters. RFC 2047 describes this in detail.