Sunday, June 10, 2007

Steps to set up oracle database RAC


  1. Verify hardware requirement
    • RAM - min 512MB
    • HD - 4GB
    • Swap - 1GB
    • Temp - 400MB
    • min 2 NIC
    • TCP/IP for public NIC, UDP for interconnect NICs
  2. Verify system requirement
    • User groups: oinstall, dba, nobody
    • User oracle's main group - oinstall, second group - dba
    • Environment variables: ORACLE_BASE, TMP, TMPDIR
    • Customized Kernel and open file limits
    • Storage - OCFS, Raw device or ASM
  3. Install CRS (Cluster Ready Service)
    • Private interconnect interfaces
    • Oracle cluster registry
    • Voting disk
    • Run root.sh for all nodes
  4. Install RAC database instance
    • Install Oracle database software
    • Use VIPCA to configure virtual IPs
  5. Create RAC database
    • Perform preinstall database tasks - CRS running (evmd.bin, ccssd.bin, crsd.bin), Group Services running, set environment variables
    • Create a cluster database: additional step to select installed node




  1. OCA references

  2. OCP References

  3. 1Z0-042 sample questions (1)

  4. Answer - "1Z0-042 sample questions"

  5. 1Z0-043 sample questions (1)

  6. Answer - "1Z0-043 sample questions"

  7. How to query server and client environment in PL/SQL


=>

Saturday, June 9, 2007

Linux User Guide (2)

Managing users:

/etc/passwd stores all user account information, its format is:

username:encrypted password:UID:GID:fullname:home directory:login shell

/etc/shadow stores shadow password.

1. Adding users

· Add an entry to /etc/passwd file;

· Create home directory;

· Set permission to let user own the directory;

· Create shell initialization file in the home directory;

Configure other system-wide file.
$useradd command takes /etc/adduser.conf as default configuration.

2. Deleting users
$userdel
You can temporary disable an account by adding * to the password field in the /etc/passwd.

3. Setting user attributes
$passwd username : change user’s password, only root can change other’s password.
$chfn : change user’s full name.
$chsh: change user’s login shell.

4. Groups
/etc/group stores group and its members information, its format is:
group name:password:GID:other members
In the /etc/passwd, each user was given a default GID, however user may belong to more than one group, his account can be added to /etc/group to participate in that group.
$groups à lists all groups you belong to
$groupadd à add a group
User deletes entry in the /etc/group to delete a group from system.






=>

Tuesday, June 5, 2007

Catalog of design patterns

  • Scope in class level
  1. Creational: Factory Method (121)
  2. Structural: Adapter (157)
  3. Behavioral: Interpreter (274), Template Method (360)
  • Scope in object level
  1. Creational: Abstract Factory (99), Builder (110), Prototype (133), Singleton (144)
  2. Structural: Adapter (157), Bridge (171), Composite (183), Decorator (196), Facade (208), Flyweight (218), Proxy (233)
  3. Behavioral: Chain of Responsibility (251), Command (263), Iterator (289), Mediator (305), Memento (316), Observer (326), State (338), Strategy (349), Visitor (366)






  1. J2EE Patterns

  2. SCJP 310-035 Sample Questions (1)

  3. Answers of "SCJP 310-035 Sample Questions (1)"

  4. SCWCD 310-081 Sample Questions


=>

Monday, June 4, 2007

Configure MSSQL to use more than 2GB RAM

  1. Add /pae in boot.ini
  2. Configure these in MS SQL 2000 (recommeded):
  • awe enable 1
  • max server memory (MB) 30000
  • min server memory (MB) 30000
  • set working set size 1
  • service account has "lock pages in memory" rights
  • memory settings are not dynamic when AWE is involved, stop and start SQL server is required for new setting takes effect.






  1. MSSQL 2005 Knowledge Base 1

  2. MCTS 07-431 Sample Questions (1)


=>

Sunday, June 3, 2007

Dollar Cost Averaging

The idea is simple: spend a fixed dollar amount at regular intervals (e.g., monthly) on a particular investment or portfolio/part of a portfolio, regardless of the share price. Since in general the market goes up, this is widely considered a safe investing strategy over the long term. In fact while Dollar Cost Averaging is a relatively safe investment strategy over the long term, however it also is not the safest investment strategy or the most reliable strategy or the most effective in general.

Each strategy wins at least some of the time, but after a few runs you'll see that DCA is the statistical "dog", losing about two times out of three.


Of course, dollar cost averaging will win if your start date falls right before a dramatic crash (like October 1987) or at the start of an overall 12 month slump (like most of 2000). But unless you can predict these downturns ahead of time, you have no scientific reason to believe that dollar cost averaging will give you an advantage.

So time does matter, start at big jump and continue until you get 30% profit and cut invest in half, sell at 50%, wait for another jump.





  1. All Money Sense

  2. 4 ways to be a millionaire

  3. Google's market share jumped in April

  4. RBS group raises the stakes in ABN Amro bidding

  5. Yahoo CTO is leaving

  6. PSP, XBox, Zen Skins


=>

Linux User Guide (1)

File links:

Hard link: $ln source dest

By using hard link, all links and original file have the same inode.

Using ls command to list link information:

$ls –i test

$ls –l test : second column shows the number of links

Symbolic links: $ln –s source dest

For symbolic link, all links have different inode, user can create a symbolic link to a file that doesn’t exist.

Job Control:

Commands: ps, ps –aux, fg, bg, CTRL-Z(suspend job), jobs, kill %i (after % is job number)

Using /dev/null to redirect useless output data.

Stop and restart jobs:

CTRL-Z: suspend job;

$fg: restart job in the foreground;

$bg: restart job in the background;

$&: start job as background process.

Booting the system:

1. Make boot device manually

$rdev kernel-name root-device à to make boot partition

$rdev /vmlinuz /dev/hda2

$cp /vmlinuz /dev/fd0

2. Using LILO

Win95 installer will overwrite LILO MBR, before install win95, create boot disk for linux, install win95, then reboot with linux floppy, run /sbin/lilo, reconfigure the system.

Using $sys a: c: /mbr to overwrite LILO.

Shutting down:

$shutdown hh:mm:ss(time) warning-message

$shutdown now

$shutdown –r 20:00 we are shutting down -r means reboot the system after shut down.

$halt

The /etc/inittab file:

System boot, kernel mount the root file system, executes init that takes /etc/inittab as the parameter file, spawns a lot of children processes.

Managing the file system:

1. mounting the file system
$ mount –av

2. /etc/fstab file
File systems support by linux: ext2, ext, minix, xia, umsdos, msdos, proc, iso9660, xenix, sysV, coherent, hpfs
Linux uses ext2 as natural file system, swap partition has a mount point of none.
$ swapon –a
$ mount –t ext2 /dev/hda3 /usr

3. Device Diver name:
hdx: IDE driver sdx: SCSI driver
fdx: floppy driver stx: SCSI tape driver
scdx: SCSI CD-ROM driver

/dev/hda: the whole first IDE driver
/dev/hda1: the first partition in the driver
/dev/hda2: the second partition in the driver

/dev/hda: IDE, master, primary
/dev/hdb: IDE, slave, primary
/dev/hdc: IDE, master, secondary
/dev/hdd: IDE, slave, secondary

Checking the file sytem:
$e2fsck –av /dev/hda2

$efsck $xfsck $fsck
If e2fsck reports it performed repairs on a mounted file system, you must reboot the system immediately.

Using a swap file:

Create a swap file: $dd if=/dev/zero of=/swap bs=1024 count=8208 : create one 8M swap file

$mkswap /swap 8208

$sync

$swapon /swap

Drawback using a swap file:

1. Performance will not be as good as swap partition whose blocks are contiguous, I/O requests are made directly to the device;

2. System has more chance to corrupt for large swap file.

Good point:

1. User can use swap file for the actions that need more swap space, and after that delete it.


Saturday, June 2, 2007

PSP, XBox, Zen Skins










Friday, June 1, 2007

Sun Certified Web Component Developer 310-081 Sample Questions

1. Which of the following methods is used to extract a session ID from a manually rewritten URL?

A. getParameter(String name)

B. getSessionID()

C. getPathInfo()

D. getID()


2. Which of the following is a legal exception-type description?

A. javax.servlet.ServletException

B. ServletException

C. javax.servlet.http.UnavailableException

D. UnavailableException


3. Which of the following options best defines the full signature name for the servlet method associated with a POST request? (Choose all that apply.)

A. protected void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException

B. public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException

C. public void doPost(ServletRequest req, ServletResponse res) throws IOException, ServletException

D. private void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException


4. Which of the following statements is true?

A. The listener tag is used to define all context and session listeners.

B. The listener interface name must be defined within the deployment descriptor.

C. The HttpSessionActivationListener must be defined within the originating server only.


5. When using FORM authentication, your form writes to which of the following URLs?

A. /servlet

B. j_security

C. j_security_source

D. j_security_check


6. A taglib directive must define which of the following attributes?

A. value

B. prefix

C. uri

D. uri and location

E. uri and prefix


7. Which of the following commands would best create a WAR file for a web application whose context is defined as /webapps/stocks?

A. jar -tvf stockApp.war /webapps/stocks

B. jar -cvf stockApp.war /webapps/stocks

C. war -cvf stockApp.war /webapps/stocks

D. jar -cvf stockApp.war /webapps/

E. Both war -cvf stockApp.war /webapps/stocks and jar -cvf stockApp.war /webapps/


8. Consider the following HTML page code:

<html><body>

<a href="/servlet/HelloServlet">POST</a>

</body></html>

Which method of HelloServlet will be invoked when the hyperlink displayed by the above page is clicked? (Select one)

a doGet

b doPost

c doForm

d doHref

e serviceGet


9. What is the term for determining whether a user has access to a particular resource? (Select one)

a Authorization

b Authentication

c Confidentiality

d Secrecy


10. Which of the following variables is not available for use in EL expressions?

a param

b cookie

c header

d pageContext

e contextScope



=>





  1. J2EE Patterns

  2. SCJP 310-035 Sample Questions (1)

  3. Answers of "SCJP 310-035 Sample Questions (1)"

  4. Catalog of design patterns


=>

Network Articles

  1. CISCO

=>

Unix Articles



  1. Linux User Guide (1)

  2. Linux User Guide (2)



=>


Comics And Humor



  1. Boss

  2. Quotes


=>

Boss wants to blog


Yahoo CTO is leaving

 
Aged at 45, Mr. Nazem, 45, CTO of Yahoo, will follow a turbulent year at Yahoo that included a companywide revamping.
 
 
 
 
 

Quotes

Hope is tomorrow's veneer over today's disappointment.
 
 

Latest Posts