Saturday, August 23, 2008

Some helpful DOS commands that you might still need today


138 DOS Prompt Commands

1 ANSI.SYS -- Defines functions that change display graphics, control cursor movement, and reassign keys.
2 APPEND -- Causes MS-DOS to look in other directories when editing a file or running a command.
3 ARP -- Displays, adds, and removes arp information from network devices
4 ASSIGN -- Assign a drive letter to an alternate letter
5 ASSOC -- View the file associations
6 AT -- Schedule a time to execute commands or programs.
7 ATMADM -- Lists connections and addresses seen by Windows ATM call manager.
8 ATTRIB -- Display and change file attributes.
9 BATCH -- NRecovery console command that executes a series of commands in a file.
10 BOOTCFG -- Recovery console command that allows a user to view, modify, and rebuild the boot.ini
11 BREAK -- Enable / disable CTRL + C feature.
12 CACLS -- View and modify file ACL's.
13 CALL -- Calls a batch file from another batch file.
14 CD -- Changes directories.
15 CHCP -- Supplement the International keyboard and character set information.
16 CHDIR -- Changes directories.
17 CHKDSK -- Check the hard disk drive running FAT for errors.
18 CHKNTFS -- Check the hard disk drive running NTFS for errors.
19 CHOICE -- Specify a listing of multiple options within a batch file.
20 CLS -- Clears the screen.
21 CMD -- Opens the command interpreter.
22 COLOR -- Easily change the foreground and background color of the MS-DOS window.
23 COMP -- Compares files.
24 COMPACT -- Compresses and uncompress files.
25 CONTROL -- Open control panel icons from the MS-DOS prompt.
26 CONVERT Convert FAT to NTFS.
27 COPY -- Copy one or more files to an alternate location.
28 CTTY -- Change the computers input/output devices.
29 DATE -- View or change the systems date.
30 DEBUG -- Debug utility to create assembly programs to modify hardware settings.
31 DEFRAG -- Re-arrange the hard disk drive to help with loading programs.
32 DEL -- Deletes one or more files.
33 DELETE -- Recovery console command that deletes a file.
34 DELTREE -- Deletes one or more files and/or directories.
35 DIR -- List the contents of one or more directory.
36 DISABLE -- Recovery console command that disables Windows system services or drivers.
37 DISKCOMP -- Compare a disk with another disk.
38 DISKCOPY -- Copy the contents of one disk and place them on another disk.
39 DOSKEY -- Command to view and execute commands that have been run in the past.
40 DOSSHELL -- A GUI to help with early MS-DOS users.
41 DRIVPARM -- Enables overwrite of original device drivers.
42 ECHO -- Displays messages and enables and disables echo.
43 EDIT -- View and edit files.
44 EDLIN -- View and edit files.
45 EMM386 -- Load extended Memory Manager.
46 ENABLE -- Recovery console command to enable a disable service or driver.
47 ENDLOCAL -- Stops the localization of the environment changes
enabled by the setlocal command.
48 ERASE -- Erase files from computer.
49 EXPAND -- Expand a Microsoft Windows file back to it's original format.
50 EXIT -- Exit from the command interpreter.
51 EXTRACT -- Extract files from the Microsoft Windows cabinets.
52 FASTHELP -- Displays a listing of MS-DOS commands and information about them
53 FC -- Compare files.
54 FDISK -- Utility used to create partitions on the hard disk drive.
55 FIND -- Search for text within a file.
56 FINDSTR -- Searches for a string of text within a file.
57 FIXBOOT -- Writes a new boot sector.
59 FIXMBR -- Writes a new boot record to a disk drive.
60 FOR -- Boolean used in batch files.
61 FORMAT -- Command to erase and prepare a disk drive.
62 FTP -- Command to connect and operate on a FTP server.
63 FTYPE -- Displays or modifies file types used in file extension
associations.
64 GOTO -- Moves a batch file to a specific label or location.
65 GRAFTABL -- Show extended characters in graphics mode.
66 HELP -- Display a listing of commands and brief explanation.
67 IF -- Allows for batch files to perform conditional processing.
68 IFSHLP.SYS -- 32-bit file manager.
69 IPCONFIG -- Network command to view network adapter settings and assigned values.
70 KEYB -- Change layout of keyboard.
71 LABEL -- Change the label of a disk drive.
72 LH -- Load a device driver in to high memory.
73 LISTSVC -- Recovery console command that displays the services and drivers.
74 LOADFIX -- Load a program above the first 64k.
75 LOADHIGH -- Load a device driver in to high memory.
76 LOCK -- Lock the hard disk drive.
77 LOGON -- Recovery console command to list installations and enable administrator login.
78 MAP -- Displays the device name of a drive.
79 MD -- Command to create a new directory.
80 MEM -- Display memory on system.
81 MKDIR -- Command to create a new directory.
82 MODE -- Modify the port or display settings.
83 MORE -- Display one page at a time.
84 MOVE -- Move one or more files from one directory to another DIRECTORY
85 MSAV -- Early Microsoft Virus scanner.
86 MSD -- Diagnostics utility.
87 MSCDEX -- Utility used to load and provide access to the CD-ROM.
88 NBTSTAT -- Displays protocol statistics and current TCP/IP connections using NBT
89 NET -- Update, fix, or view the network or network settings
90 NETSH -- Configure dynamic and static network information from MS-DOS.
91 NETSTAT -- Display the TCP/IP network protocol statistics and information.
92 NLSFUNC -- Load country specific information.
93 NSLOOKUP -- Look up an IP address of a domain or host on a network.
94 PATH -- View and modify the computers path location
95 PATHPING -- View and locate locations of network latency
96 PAUSE -- command used in batch files to stop the processing of a command.
97 PING -- Test / send information to another network computer or network device .
98 POPD -- Changes to the directory or network path stored by the pushd command.
99 POWER -- Conserve power with computer portables.
100 PRINT -- Prints data to a printer port.
101 PROMPT -- View and change the MS-DOS prompt.
102 PUSHD -- Stores a directory or network path in memory so it can be returned to at any time.
103 QBASIC -- Open the QBasic.
104 RD -- Removes an empty directory.
105 REN -- Renames a file or directory.
106 RENAME -- Renames a file or directory.
107 RMDIR -- Removes an empty directory.
108 ROUTE -- View and configure windows network route tables.
109 RUNAS -- Enables a user to execute a program on another
computer.
110 SCANDISK -- Run the scandisk utility.
111 SCANREG -- Scan registry and recover registry from errors.
112 SET -- Change one variable or string to another.
113 SETLOCAL -- Enables local environments to be changed without affecting anything else.
114 SHARE -- Installs support for file sharing and locking capabilities.
115 SETVER -- Change MS-DOS version to trick older MS-DOS programs.
116 SHIFT -- Changes the position of replaceable parameters in a batch program.
117 SHUTDOWN -- Shutdown the computer from the MS-DOS prompt.
118 SMARTDRV -- Create a disk cache in conventional memory or extended memory.
119 SORT -- Sorts the input and displays the output to the screen.
120 START -- Start a separate window in Windows from the MS-DOS prompt.
121 SUBST -- Substitute a folder on your computer for another drive letter.
122 SWITCHES -- Remove add functions from MS-DOS.
123 SYS -- Transfer system files to disk drive.
124 TELNET -- Telnet to another computer / device from the prompt.
125 TIME -- View or modify the system time.
126 TITLE -- Change the title of their MS-DOS window.
127 TRACERT -- Visually view a network packets route across a network.
128 TREE -- View a visual tree of the hard disk drive.
129 TYPE -- Display the contents of a file.
130 UNDELETE -- Undelete a file that has been deleted.
131 UNFORMAT -- Unformat a hard disk drive.
132 UNLOCK -- Unlock a disk drive.
133 VER -- Display the version information.
134 VERIFY -- Enables or disables the feature to determine if files have been written properly.
135 VOL -- Displays the volume information about the designated drive.
136 XCOPY -- Copy multiple files, directories, and/or drives from one location to another.
137 TRUENAME -- When placed before a file, will display the whole directory in which it exists
138 TASKKILL -- It allows you to kill those unneeded or locked up applications

Some helpful DOS commands that you might still need today

 

138 DOS Prompt Commands

1 ANSI.SYS -- Defines functions that change display graphics, control cursor movement, and reassign keys.
2 APPEND -- Causes MS-DOS to look in other directories when editing a file or running a command.
3 ARP -- Displays, adds, and removes arp information from network devices
4 ASSIGN -- Assign a drive letter to an alternate letter
5 ASSOC -- View the file associations
6 AT -- Schedule a time to execute commands or programs.
7 ATMADM -- Lists connections and addresses seen by Windows ATM call manager.
8 ATTRIB -- Display and change file attributes.
9 BATCH -- NRecovery console command that executes a series of commands in a file.
10 BOOTCFG -- Recovery console command that allows a user to view, modify, and rebuild the boot.ini
11 BREAK -- Enable / disable CTRL + C feature.
12 CACLS -- View and modify file ACL's.
13 CALL -- Calls a batch file from another batch file.
14 CD -- Changes directories.
15 CHCP -- Supplement the International keyboard and character set information.
16 CHDIR -- Changes directories.
17 CHKDSK -- Check the hard disk drive running FAT for errors.
18 CHKNTFS -- Check the hard disk drive running NTFS for errors.
19 CHOICE -- Specify a listing of multiple options within a batch file.
20 CLS -- Clears the screen.
21 CMD -- Opens the command interpreter.
22 COLOR -- Easily change the foreground and background color of the MS-DOS window.
23 COMP -- Compares files.
24 COMPACT -- Compresses and uncompress files.
25 CONTROL -- Open control panel icons from the MS-DOS prompt.
26 CONVERT Convert FAT to NTFS.
27 COPY -- Copy one or more files to an alternate location.
28 CTTY -- Change the computers input/output devices.
29 DATE -- View or change the systems date.
30 DEBUG -- Debug utility to create assembly programs to modify hardware settings.
31 DEFRAG -- Re-arrange the hard disk drive to help with loading programs.
32 DEL -- Deletes one or more files.
33 DELETE -- Recovery console command that deletes a file.
34 DELTREE -- Deletes one or more files and/or directories.
35 DIR -- List the contents of one or more directory.
36 DISABLE -- Recovery console command that disables Windows system services or drivers.
37 DISKCOMP -- Compare a disk with another disk.
38 DISKCOPY -- Copy the contents of one disk and place them on another disk.
39 DOSKEY -- Command to view and execute commands that have been run in the past.
40 DOSSHELL -- A GUI to help with early MS-DOS users.
41 DRIVPARM -- Enables overwrite of original device drivers.
42 ECHO -- Displays messages and enables and disables echo.
43 EDIT -- View and edit files.
44 EDLIN -- View and edit files.
45 EMM386 -- Load extended Memory Manager.
46 ENABLE -- Recovery console command to enable a disable service or driver.
47 ENDLOCAL -- Stops the localization of the environment changes
enabled by the setlocal command.
48 ERASE -- Erase files from computer.
49 EXPAND -- Expand a Microsoft Windows file back to it's original format.
50 EXIT -- Exit from the command interpreter.
51 EXTRACT -- Extract files from the Microsoft Windows cabinets.
52 FASTHELP -- Displays a listing of MS-DOS commands and information about them
53 FC -- Compare files.
54 FDISK -- Utility used to create partitions on the hard disk drive.
55 FIND -- Search for text within a file.
56 FINDSTR -- Searches for a string of text within a file.
57 FIXBOOT -- Writes a new boot sector.
59 FIXMBR -- Writes a new boot record to a disk drive.
60 FOR -- Boolean used in batch files.
61 FORMAT -- Command to erase and prepare a disk drive.
62 FTP -- Command to connect and operate on a FTP server.
63 FTYPE -- Displays or modifies file types used in file extension
associations.
64 GOTO -- Moves a batch file to a specific label or location.
65 GRAFTABL -- Show extended characters in graphics mode.
66 HELP -- Display a listing of commands and brief explanation.
67 IF -- Allows for batch files to perform conditional processing.
68 IFSHLP.SYS -- 32-bit file manager.
69 IPCONFIG -- Network command to view network adapter settings and assigned values.
70 KEYB -- Change layout of keyboard.
71 LABEL -- Change the label of a disk drive.
72 LH -- Load a device driver in to high memory.
73 LISTSVC -- Recovery console command that displays the services and drivers.
74 LOADFIX -- Load a program above the first 64k.
75 LOADHIGH -- Load a device driver in to high memory.
76 LOCK -- Lock the hard disk drive.
77 LOGON -- Recovery console command to list installations and enable administrator login.
78 MAP -- Displays the device name of a drive.
79 MD -- Command to create a new directory.
80 MEM -- Display memory on system.
81 MKDIR -- Command to create a new directory.
82 MODE -- Modify the port or display settings.
83 MORE -- Display one page at a time.
84 MOVE -- Move one or more files from one directory to another DIRECTORY
85 MSAV -- Early Microsoft Virus scanner.
86 MSD -- Diagnostics utility.
87 MSCDEX -- Utility used to load and provide access to the CD-ROM.
88 NBTSTAT -- Displays protocol statistics and current TCP/IP connections using NBT
89 NET -- Update, fix, or view the network or network settings
90 NETSH -- Configure dynamic and static network information from MS-DOS.
91 NETSTAT -- Display the TCP/IP network protocol statistics and information.
92 NLSFUNC -- Load country specific information.
93 NSLOOKUP -- Look up an IP address of a domain or host on a network.
94 PATH -- View and modify the computers path location
95 PATHPING -- View and locate locations of network latency
96 PAUSE -- command used in batch files to stop the processing of a command.
97 PING -- Test / send information to another network computer or network device .
98 POPD -- Changes to the directory or network path stored by the pushd command.
99 POWER -- Conserve power with computer portables.
100 PRINT -- Prints data to a printer port.
101 PROMPT -- View and change the MS-DOS prompt.
102 PUSHD -- Stores a directory or network path in memory so it can be returned to at any time.
103 QBASIC -- Open the QBasic.
104 RD -- Removes an empty directory.
105 REN -- Renames a file or directory.
106 RENAME -- Renames a file or directory.
107 RMDIR -- Removes an empty directory.
108 ROUTE -- View and configure windows network route tables.
109 RUNAS -- Enables a user to execute a program on another
computer.
110 SCANDISK -- Run the scandisk utility.
111 SCANREG -- Scan registry and recover registry from errors.
112 SET -- Change one variable or string to another.
113 SETLOCAL -- Enables local environments to be changed without affecting anything else.
114 SHARE -- Installs support for file sharing and locking capabilities.
115 SETVER -- Change MS-DOS version to trick older MS-DOS programs.
116 SHIFT -- Changes the position of replaceable parameters in a batch program.
117 SHUTDOWN -- Shutdown the computer from the MS-DOS prompt.
118 SMARTDRV -- Create a disk cache in conventional memory or extended memory.
119 SORT -- Sorts the input and displays the output to the screen.
120 START -- Start a separate window in Windows from the MS-DOS prompt.
121 SUBST -- Substitute a folder on your computer for another drive letter.
122 SWITCHES -- Remove add functions from MS-DOS.
123 SYS -- Transfer system files to disk drive.
124 TELNET -- Telnet to another computer / device from the prompt.
125 TIME -- View or modify the system time.
126 TITLE -- Change the title of their MS-DOS window.
127 TRACERT -- Visually view a network packets route across a network.
128 TREE -- View a visual tree of the hard disk drive.
129 TYPE -- Display the contents of a file.
130 UNDELETE -- Undelete a file that has been deleted.
131 UNFORMAT -- Unformat a hard disk drive.
132 UNLOCK -- Unlock a disk drive.
133 VER -- Display the version information.
134 VERIFY -- Enables or disables the feature to determine if files have been written properly.
135 VOL -- Displays the volume information about the designated drive.
136 XCOPY -- Copy multiple files, directories, and/or drives from one location to another.
137 TRUENAME -- When placed before a file, will display the whole directory in which it exists
138 TASKKILL -- It allows you to kill those unneeded or locked up applications

Eclipse SMS scares Pune

Source-Deccan Chronicle (www.deccan.com)

Pune, Aug. 22:

A police van took rounds with blaring microphones on Thursday night asking people in many localities to go to sleep and ignore the rumours that they could be dead next day morning if kept awake. Thousands of people living particularly in slum colonies in various parts of the city and far flung villages, refrained from retiring to bed, alarmed by an SMS in circulation which spoke of adverse planetary positions subsequent to the August 16 partial eclipse of the moon, spelling doom for those who slept at night.

Confirming the bizarre happening, police said, their control room received a series of calls from panicky residents on Thursday night seeking to know whether people had been dying since the eclipse in their sleep as mentioned in the SMS doing rounds. The fear stricken families sat outside their dwellings with children telling them not to doze off till morning. In addition to the eclipse effect, other natural calamities like earthquakes too figured in the rumour claiming death of hundreds of people.

When the scale of panic triggered by the rumour mill appeared high, the authorities decided to deploy mobile vans fitted with public address system to visit the concerned localities to dispel fears. The night duty workers at many factories in the Pimpri-Chichwad industrial belt avoided going home after their shift hours and remained awake sitting in the work premises, reports said.

The police had a tough time reassuring the people that no untoward incidents had taken place since the eclipse in the entire region. Another irony is that this should happen in Pune, which is regarded as the seat of education and an IT hub.

Wednesday, August 6, 2008

SMS Shayeri

SMS Shayari 1:
Ek Larki Ko Dekha To Aisa Laga
Doosri Larki Ko Dekha To Vaisa Laga
Jab Dono Ne Joote Maarey...To Ek Jaisa Laga!!!

SMS Shayri 2:
Bewafa Tum Ho To Wafadaar Hum Bhi Nahi,
Besharam Tum Ho To Sharamdaar Hum Bhi Nahi,
Pyaar Ke Is Mode Par Aake Kehte Ho Shadishuda Ho
To Kya Hua Darling...Kunware Hum Bhi Nahin!

SMS Shayari 3:
Zamane ke dar se teri tasweer toilet mein chupa rakhi hai!SMS Shayari 1:
Ek Larki Ko Dekha To Aisa Laga
Doosri Larki Ko Dekha To Vaisa Laga
Jab Dono Ne Joote Maarey...To Ek Jaisa Laga!!!

SMS Shayri 2:
Bewafa Tum Ho To Wafadaar Hum Bhi Nahi,
Besharam Tum Ho To Sharamdaar Hum Bhi Nahi,
Pyaar Ke Is Mode Par Aake Kehte Ho Shadishuda Ho
To Kya Hua Darling...Kunware Hum Bhi Nahin!

SMS Shayari 3:
Zamane ke dar se teri tasweer toilet mein chupa rakhi hai!
dedar ho tera bar bar isliye julab ki goli kha rakhi hai

SMS Shayri 4:
Shaam hote hii ye Dil udaas hota hai
Toote khwaboo ke siwa kuch na pass hota hai
Tumahri yaad aise waqt bohat aati hai
Bandar jab koi aas-paas hota hai..

SMS Shayari 5:
When i open my eyes every morning i pray to God
that everyone should have a friend like you....
Why should only i suffer!!!

 
dedar ho tera bar bar isliye julab ki goli kha rakhi hai

SMS Shayri 4:
Shaam hote hii ye Dil udaas hota hai
Toote khwaboo ke siwa kuch na pass hota hai
Tumahri yaad aise waqt bohat aati hai
Bandar jab koi aas-paas hota hai..

SMS Shayari 5:
When i open my eyes every morning i pray to God
that everyone should have a friend like you....
Why should only i suffer!!!

 

Girls are incomplete without Boys

WOMAN has MAN in it .
SHE has HE in it.
Mrs. has Mr. in it.
LADY has LAD in it.
MISTERESS has MISTER in it.
MADAM has ADAM in it.
HOSTESS has HOST in it.
FEMALE has MALE in it
...................and so on the list is never ending

SO NO need to be proud ....Girls
YOU are always incomplete without Boys....

The Login Password Problem....

A new employee calls the Help Desk to complain that there's something wrong with her password.

"The problem is that whenever I type the password, it just shows stars," she says.

"Those asterisks are to protect you," the Help Desk technician explains, "so if someone were standing behind you, they wouldn't be able to read your password."

"Yeah," she says, "but they show up even when there is no one standing behi
 
nd me!"
 
 

Malayalis - Question se Answer tak

ITS JUST FOR FUN… TAKE IT EASY…..


Name the wonly part of the werld where Malayalis don't werk hard?
Kerala.

Why is industrial productivity so low in Kerala?
Because 86% of the shift time is spent on lifting, folding and re-tying the lungi.

Why did the Malayali buy an air-ticket?
To go to Thoobai, to meet his ungle in the Gelff.

Why do Malayali's go to the Gelff?
To yearn menney.

What did the Malayali do when the plane caught fire?
He zimbly jembd out of the vindow.

What is a Malayali management graduate called?
Yem Bee Yay.

Why did his wife divorce him?
Because he was louwing another woman.

Who found out that?
His andy.

What does a Malayali do when he goes to America?
He changes his name from Karunakaran to Kevin Curren.

What does a Malayali use to commute to office everyday?
An Oto.

Who is a Malayali's famous yeactor end yaectress?
Moghan lal, Mammooti, Geedha, Revadhi, Zilgsmidha end Ambiga.

Why is Kerala the most highly literate state in India?
Its easily giving Degree to get rid of the peapals from Kerala.

Why are Arab countries looking only for Keralites?
They are ready to do yennything for menney.

SPECIAL ANNOUNCEMENT:You should at least send this post to:
10 Malayalis and you will receive cokknut oil, 20 Malayalis and you will receive bennena chips, 40 Malayalis you will receive appams,

Send this to 100 Malayalis and you will get free land near the rice
field behind the lungi factory with additional incentive of a whole month's supply of cokknut oil and bennena chips free

=================Courtesy: Shashank Mishra=========================

Job Interview: Candidate's Funny Answer

New job interview, funny Questions and Answers

Thursday, January 05, 2006

When a Mechanical Engineer didn't get Job

Mechanical Engineering method to commit sucide

Tuesday, August 5, 2008

Compression in Oracle

Compress to Impress
By Arup Nanda Oracle ACE

Use Oracle Advanced Compression to conserve resources and improve performance.

John the DBA at Acme Bank is looking at charts and spreadsheets from the company's capacity planning group. Amid all the fancy-looking graphics and numbers, the message is clear—the bank's database size is going to grow incredibly in the near future. There are many reasons—the natural growth of the business, moving existing applications from desktop systems to the enterprise domain, the constant development of new applications, legal requirements to retain data longer, and so on. The data volume is going to grow exponentially, and the processing capacity (CPU, network, and I/O bandwidth) will also grow, but not at the same pace. This poses major challenges for database operations:

1. Storage costs skyrocket. To contain the costs, management has suggested using cheaper (and slower) disks, which will negatively affect performance.

2. More data also means more backup space is required. To contain these costs, one option is to reduce the number of backups to disk, which is not ideal, because it will increase the restore time.

3. More backed-up data means the backup window will be much larger, affecting—and likely conflicting with—other backups.

4. The increase in data volume also means an increase in I/O through components such as host bus adapter (HBA) cards and network-attached storage (NAS) heads, negatively affecting performance.

5. More data in the database means that a larger system global area (SGA) is needed, and a larger SGA means more memory. If more memory is not available, a smaller proportion of the data will be cached, reducing performance.

To address these challenges, the DBAs at Acme have proposed the usual solutions: adding disk space, memory, network capacity, and I/O bandwidth. But, with the financial belt-tightening, these solutions are not going to get approved by management. Jill, the DBA manager, hopes John can find an alternative solution to sustain the current level of performance, if not improve it, while using the same amount of disk space, memory, and I/O—or even less.

Solution: Compression

Even though the problems are many, the root cause can be summed up easily: exponential growth in data volumes. More data requires more disk space, which, in turn, means higher costs for database and backup storage and more I/O. If there were a way to store the current data volume more efficiently on disk, all the other issues would disappear. The question is how to reduce the space consumption without deleting data.

Oracle Advanced Compression, a new option in Oracle Database 11g Enterprise Edition, is the answer to Acme's data growth problem.

Compression is not new in Oracle Database. Oracle8i Database introduced compression in indexes, by eliminating duplicates from index leaves. Oracle9i Database Release 2 added a new table compression feature that eliminated the storage of repeated values in tables. It supported bulk load operations, and it was very powerful in data warehouse environments. The Oracle Advanced Compression option in Oracle Database 11g Enterprise Edition has richer and far more-powerful features, however, suitable even for transaction-intensive online transaction processing (OLTP) databases.

Compression Steps and Disk Space

The steps to enable compression are very simple. To demonstrate, John creates two tables for account holder information—one compressed (ACCOUNTS_COMP) and one "regular" (ACCOUNTS_REG). John creates the ACCOUNTS_COMP compressed table by using the script shown in Listing 1. Note the "compress for all operations" line in the listing, which creates the table as compressed for all data manipulation language (DML) operations—therefore enabling compression for OLTP tables. (The other compression option is "compress for direct_load operations," which enables compression only for direct path loads, such as INSERT /*+ APPEND */ or SQL*Loader with the direct path option.)

Code Listing 1: Creating the ACCOUNTS table

create table accounts_comp ( 		acc_no					number				not null, 		first_name				varchar2(30)			not null, 		last_name				varchar2(30)			not null, 		acc_type				varchar2(15), 		acc_open_dt				date, 		acc_mgr_id				number, 		city					varchar2(30), 		street_name				varchar2(30) ) compress for all operations / 

John creates the ACCOUNTS_REG table by using the script in Listing 1, except that he changes the table name to ACCOUNTS_REG and omits the "compress for all operations" clause. Then he uses the ins_acc.sql script to simulate an ACME application and insert records into both tables.

INS_ACC.SQL Script for loading sample data into ACCOUNTS tables

/* Instruction: This script will load data into both the  ACCOUNTS_REG and ACCOUNTS_COMP tables. At runtime, it will  ask the user for the value of the ®_or_comp variable.  Enter REG or COMP to load data into the regular (ACCOUNTS_REG)  or compressed (ACCOUNTS_COMP) table, respectively. */  begin    for l_acc_no in 1..1000000 loop    insert into accounts_®_or_comp    values    (       l_acc_no,       -- First Name       decode (          floor(dbms_random.value(1,21)),          1, 'Alan',          2, 'Alan',          3, 'Barbara',          4, 'Barbara',          5, 'Charles',          6, 'David',          7, 'Ellen',          8, 'Ellen',          9, 'Ellen',          10, 'Frank',          11, 'Frank',          12, 'Frank',          13, 'George',          14, 'George',          15, 'George',          16, 'Hillary',          17, 'Iris',          18, 'Iris',          19, 'Josh',          20, 'Josh',              'XXX'       ),       -- Last Name       decode (                   floor(dbms_random.value(1,5)),             1,'Smith',                         dbms_random.string ('A',dbms_random.value(4,30))       ),         -- Account Type       decode (                   floor(dbms_random.value (1,5)),               1,'S',2,'C',3,'M',4,'D','X'       ),         -- Folio ID       case                        when dbms_random.value (1,100) < 51 then null       else                         l_acc_no + floor(dbms_random.value(1,100))       end,        -- Sub Acc Type       case                        when dbms_random.value (1,100) < 76 then null       else            decode (floor(dbms_random.value (1,6)),              1,'S',2,'C',3,'C',4,'C',5,'C',null)       end,        -- Acc Opening Date        sysdate - dbms_random.value(1,500),       -- Account Manager ID       decode (                   floor(dbms_random.value (1,11)),                         1,1,2,1,3,1,4,1,5,2,6,3,7,4,8,5,9,5,10,5,0       )    );     end loop;    commit; end; / 

After the inserts, John checks the number of blocks on each table:

select segment_name, blocks from user_segments where segment_name like 'ACCOUNTS_%';  SEGMENT_NAME      BLOCKS ---------         ---- ACCOUNTS_COMP     4096 ACCOUNTS_REG      11264 

The space savings in the ACCOUNTS_COMP table are clear. Both tables have the same number of identical records, but the ACCOUNTS_COMP compressed table has only 4,096 blocks, a space savings of about 64 percent compared to the 11,264 blocks in the ACCOUNTS_REG table. Of course, notes John, the space savings will vary, depending on the nature of the data.

John also tests whether the compression ratio is the same for later manipulations of the table. He runs the ins_acc.sql script once again on both the tables and rechecks the number of blocks:

select segment_name, blocks from user_segments where segment_name like 'ACCOUNTS_%';  SEGMENT_NAME      BLOCKS --------          ---- ACCOUNTS_COMP     8192 ACCOUNTS_REG      22528 

The compression ratio is still around 64 percent (1-(8192/22528)).

I/O and Memory

To demonstrate other savings from Oracle Advanced Compression, John creates a test query against the example tables; he also collects the statistics and the optimizer plan, by issuing the SET AUTOT command, and notes the execution time. Before he runs each test query, he flushes the buffer pool so that the table will be read from the database rather than from the SGA.

First he issues the test query against the regular table, as shown in Listing 2; Listing 3 shows the output. Then he issues the test query in Listing 2 against the compressed table, by replacing ACCOUNT_REG with ACCOUNT_COMP in the FROM clause; Listing 4 shows that output.

Code Listing 2: Test query

set serveroutput on size unlimited alter system flush buffer_cache / col value noprint new_value start_cpu select value from v$sesstat s, v$statname n where sid = (select sid from v$mystat where rownum < 2) and s.statistic# = n.statistic# and n.name in ('CPU used by this session') / col value noprint new_value start_reads select value from v$sesstat s, v$statname n where sid = (select sid from v$mystat where rownum < 2) and s.statistic# = n.statistic# and n.name in ('session logical reads') / set autot on explain stat set timing on select acc_mgr_id, acc_type, 		 avg((sysdate-acc_open_dt)) from accounts_reg   group by acc_mgr_id, acc_type order by acc_mgr_id, acc_type / set autot off select value - &start_cpu cpu_consumed from v$sesstat s, v$statname n where sid = (select sid from v$mystat where rownum < 2) and s.statistic# = n.statistic# and n.name in ('CPU used by this session') / select value - &start_reads logical_reads from v$sesstat s, v$statname n where sid = (select sid from v$mystat where rownum < 2) and s.statistic# = n.statistic# and n.name in ('session logical reads') / 

Code Listing 3: Statistics for regular table

... Elapsed: 00:00:05.33 ...  ---------------------------------------------------------------------------------------- | Id  | Operation		| Name		| Rows	| Bytes	| Cost (%CPU)| Time	| ---------------------------------------------------------------------------------------- |   0 | SELECT STATEMENT	|		|    15	|   285 |  3095   (3)| 00:00:38	| |   1 |  SORT GROUP BY		|		|    15	|   285 |  3095   (3)| 00:00:38	| |   2 |   TABLE ACCESS FULL	| ACCOUNTS_REG	|  1000K|   18M |  3035   (1)| 00:00:37	| ----------------------------------------------------------------------------------------   Statistics --------------------------------       ...       11121  consistent gets       11118  physical reads       ...   CPU_CONSUMED ---------                 354   LOGICAL_READS ---------              11212 

Code Listing 4: Statistics for compressed table

... Elapsed: 00:00:04.24 ... ----------------------------------------------------------------------------------------- | Id  | Operation		| Name		| Rows	| Bytes	| Cost (%CPU) | Time	 | ----------------------------------------------------------------------------------------- |   0 | SELECT STATEMENT	|		|    15	|   285	|  1170   (7) | 00:00:15 | |   1 |  SORT GROUP BY		|		|    15	|   285	|  1170   (7) | 00:00:15 | |   2 |   TABLE ACCESS FULL	| ACCOUNTS_COMP	|  1000K|    18M|  1109   (2) | 00:00:14 | -----------------------------------------------------------------------------------------   Statistics -------------------------------- ...        4031  consistent gets        4025  physical reads ...   CPU_CONSUMED ---------                 304  LOGICAL_READS ---------               4122 

The execution time was 5.33 seconds for the regular table but 4.24 seconds for the compressed table—a 20 percent improvement in execution time. The number of logical reads done explains the improvement: 11,212 in the regular table, as opposed to 4,122 for the compressed table. This resulted in some savings in CPU_CONSUMED (354 for the regular table, to 304 for the compressed table), and although this CPU savings is not substantial (in fact, the documentation states that in some cases, the CPU consumption might be higher), John observes that the savings in I/O are large enough to create a drop in the response time. This performance gain will be more pronounced in large, full-table scans, typically found in Acme's reporting and batch-oriented applications.

Because each block in the compressed table now packs more rows, a smaller SGA can handle the same amount of data. Conversely, the existing memory will accommodate more blocks, reducing the probability that a trip to the disk will be necessary, which further improves I/O and subsequently enables better response time.

John looks at his tests and concludes that space savings are not the only advantage of compression. It also improves memory and I/O efficiencies, resulting in better query performance in many cases. For table scans, there can also be some CPU savings from reduced I/O.

Types of Compression

Oracle Advanced Compression offers more than one type of compression, which is important, because Acme needs to use compression for different types of data processing, data formats, and system usage. John looks at the different types of compression available and how they might address Acme's different needs.

OLTP table compression. With OLTP table compression, the compression occurs at the block level. Data is not compressed as it is inserted; rather, an internal algorithm is used to decide when a block has enough uncompressed data and is ready for compression. When a block is ready, the compression algorithm takes a value from a record and creates a reference to that value in a "symbol table" toward the header of the block. Then the algorithm tries to find an identical value in that block, and for each one it finds, it replaces that value with the symbol from the symbol table. This way the data inside the block is compressed anywhere it occurs—not just in specific columns or rows. Each block is independently compressed with its own symbol table, so the compression is usually faster than it is for non-Oracle algorithms, which normally use a global symbol table. This independent compression at the block level is adaptive to new or modified data—blocks can be compressed and recompressed to update the symbol tables as necessary. A global symbol table, however, is much more difficult to update without locking, meaning that those algorithms are not adaptive to changes in the data, which can reduce compression ratios over time.

Oracle Advanced Compression does not occur the moment data is inserted or changed. Rather, data comes in as is (uncompressed) and when a specific internally defined threshold is reached, the compression algorithm kicks in for all data in the block, in batch mode. So all transactions on a block do not experience the CPU overhead of compression—only the transaction that triggers compression experiences a compression-related wait, which is minimal. This batch algorithm keeps the CPU overhead for DML operations very low, thereby making Oracle Advanced Compression suitable for OLTP systems.

Compression of unstructured data. Acme also stores a lot of nonstructured data, such as XML documents, signatures (as GIF files), and statements (as PDF documents). Due to several regulations governing the bank—Sarbanes-Oxley, the Gramm-Leach-Bliley Act, and so on, Acme must preserve this unstructured data in the database, which takes sizable chunks of storage.

Oracle Advanced Compression is not only for relational data. In Oracle Database 11g, other datatypes can also be compressed, sometimes with slight syntax variants. For instance, Oracle SecureFiles (the next-generation large objects [LOBs] introduced in Oracle Database 11g) has two ways to reduce storage: compression and deduplication. (For more information on Oracle SecureFiles compression, John bookmarks the "SecureFiles: The New LOBs" article on Oracle Technology Network [OTN]. He creates an Oracle SecureFiles test example in which the CONTRACTS_SEC table is altered to include a compressed LOB column—ORIG_FILE:

alter table contracts_sec modify lob  (orig_file) (compress high) 

And if Oracle SecureFiles data repeats in the ORIG_FILE column of the CONTRACTS_SEC table, deduplication will remove the duplicates and store only the pointers to them, eliminating duplicate storage. Thus, if four copies of the same document are stored in the ORIG_FILE column, the file will be stored only once after deduplication, providing a 75 percent reduction in space used.

John confirms the syntax to enable deduplication in the ORIG_FILE column:

alter table contracts_sec modify lob (orig_file) (deduplicate) 

Backup compression. An Oracle Database instance can be backed up in two ways: by using Oracle Data Pump—the logical backup—and Oracle Recovery Manager (Oracle RMAN)—the physical backup. Oracle Advanced Compression comes in handy in both cases. In Oracle RMAN, a new compression algorithm—ZLIB—compresses the data more efficiently (as shown in the "RMAN" article on OTN). In Oracle Data Pump, the dump file can be compressed.

John tests the syntax to create a compressed dump file from the accounts_reg table, using the compression=all clause:

expdp <User>/<Pass> directory=<DirName> tables=accounts_reg dumpfile=reg.dmp compression=all 

This creates a 41MB compressed dump file named reg.dmp. John runs the same expdp command without the compression clause, which produces a 90MB file. So, Oracle Advanced Compression compressed the dump file by more than 50 percent, quite a savings on any scale. When John imports the compressed dump file back into the table, the Oracle Data Pump import reads the compressed file and decompresses it inline, during the import.

Network compression. John continues to explore the benefits of compression. Acme uses Oracle Data Guard as its disaster recovery solution. During a network outage or when a standby server is down for planned or unplanned maintenance, the standby database can fall behind the primary. Oracle Data Guard automatically ships the missing redo data for sync up—a process known as "gap resolution." In Oracle Database 11g, you can compress the redo stream for gap resolution with Oracle Advanced Compression by putting a special clause into the archive destination for the standby database. The archive destination is set in the initialization parameter file:

log_archive_dest_2 = 'service=acmedr  lgwr async  valid_for=(online_logfiles,primary_role)  db_unique_name=acmedr compression=enable' 

John notes the compression=enable clause, which causes the redo stream to be compressed during gap resolution, making the synchronization process faster, which, in turn, reduces the risk to Acme's high-availability environment.

Summing It Up

A reduction in the space used in the database directly translates to reduced space requirements for backups, so Acme does not need to buy additional backup disks. Because fewer blocks are being backed up, the backup finishes faster and the backup window allocated now will also be sufficient for the future.

Next Steps

READ more about
Oracle Advanced Compression
Oracle Advanced Compression white paper

Acme also has a staging database as a copy of the production database. The storage requirements for the staging database as well as other database copies such as QA and development drop too. In short, with Oracle Advanced Compression, there is no need for any additional hardware—disks, I/O capacity, memory, tape, or network bandwidth—when Acme's database grows. John gathers the metrics collected and heads for Jill's office to give her the good news.

Conclusion

The last few years have seen enhancements that were mere imaginings earlier, such as 16-core CPUs and 720GB hard drives. The trend is clearly "up"; we will see more processing power and higher disk capacity in the future, but one thing that hasn't changed much—and isn't likely to change—is disk throughput.

This article showed how a forward-thinking John started looking at how to address exponential data growth and ended up addressing both that growth and the limitations of disk throughput by using Oracle Advanced Compression. He has effectively stored more data in less space, accomplishing more data transfer with the same throughput. Not only does it save Acme storage space, but it increases performance as well.

Monday, March 24, 2008

Software Sholay


Gabbar sends Kalia and his other two colleagues to Ramgad for collecting the 'loot-maar' software which he ordered.
They reach Ramgad and start shouting, "Abey oh Thakur. Baahar nikal. Kahan hai woh loot-maar software joh hamne order kiya tha."
Dhaniya, an old man comes out with a floppy in his hand.
Kalia: Kya laye ho dhaniya.
Dhaniya: Financial accounting software hai sarkar.
Kalia: Suwar ke bachche. Yeh bekar software hamare liye banaya aur woh loot-mar software kya apni beti ke baratiyon ke liye zip file mein chupa rakha hai,
haraam zada.
Thakur comes out of his house seething with anger.
Thakur: Chillao mat Kalia. Jaakar Gabbar se keh do ki Thakur software waloh ne paagal kutton ke liye software banana band kar diya hai.
Kalia: Bahut garmi dikha rahe ho Thakur. Koi naye programmers hire kiye hain kya?
Thakur: Nazar utha kar dekh Kalia tere sar par power builder chal raha hai.
Kalia lifts his head.He sees Viru (Dharmendra) working on a PC on one water tank and Jay (Amitabh) on another water tank, punching the keys of a laptop.
Kalia starts laughing and says, "Haa haa...ye log programming karenge Thakur. Haa haa.. inko to DOS commands bhi nahin aate. Suno Ramgad ke vasiyon, Thakur ne hijdon ki software company banayi hai.
Veeru: Chup chap chala ja Kaalia, hum log consultants hain, kuch bhi kar sakte hai.
Jay hits some commands on his keyboard.
Jay: Jao Kalia, Gabbar se kahna ki uska server down ho gaya.
Kalia: Jaata hoon Thakur. Agar Gabbar ko pata chala ki Thakur software services walon ne uska loot-maar software nahin banaya to woh purey network mein virus daal dega.

At Gabbar's den
Gabbar: Kitney bugs they?
Kalia: Do sarkaar.
Gabbar: Woh do! Aur tum teen! Phir bhi fix nahin kar sake? Kya soch ke aaye the? Gabbar bahut khus hoga. Naya assignment dega, kyoon? Iski saja milegi. Barobar milegi! (Snatches an X terminal from Sambha) Kitne sessions hain is machine mein?
Sambha: Chhay Sarkaar.
Gabbar: Session chhay aur programmer teen. Bahut na insaafi hai. (Logout... logout.. logout...)
Haan..ab theek hai...ab tera kya hoga Kalia?
Kalia: Sarkaar, maine aapka code likha tha sarkar?
Gabbar: To ab documentation likh! (Logout....)

Sunday, March 23, 2008

Funny Movie Names

Munna Bhi MCSE
Kal MSN Ho Na Ho
Love in mIRC
Tere Nick
ID Mil Gaya
Chat tu Kero
Ek Programmer Thi
Yeh Hack Horaha Hai
Hum Pyar PC Se Kar Baithe
Network Ke Us Paar
Meri Disc Tumhare Paas Hai
Aao Chat Kare
C++ Wale Job Le Jayenge
Programmer No.1
Mera Naam Developer
Hum Apke Memory Mein Rahate Hein
Do Processor, Baarah Terminal
Tera Code Chal Gaya
Har Din Jo Mail Karega
Debugging Koi Khel Nahi
Jish Desh Mein Bill Gates Rehatha Hai
Raju Ban Gaya MCSE ..!
Client Ek Numbari, C ++Programmer Dus Numbari
Login Karo Sajana
Naukar PC Ka
1942 -- A Bug Story
Kaho Na Virus Hai
Crash Se Crash Tak
Haan Meine Bhi Debug Kiya Hai
Shaheed Hacker Singh
Password De Ke Dekho
Terminal Apna , Login Parayi
Mr. Network Lal
Terminal Sajaake Rakhna
Hackers Ka Raja, Debuggers Ki Rani
Kyonki Mein Debug Nahin Kartha
Phir Theri Java-script Yaad Aayi
Hang To Hona Hi Tha !!!!!!!!!!!!

Nice Quotes

If you throw Mud on other's you'll loose the Ground.
If you are an idiot, better keep your mouth shut because once you open it you clear all doubts.
Getting married is not the only thing. There are many other ways to break your head. - Baqtiar.
Bachelors should be heavily taxed. It is not fair that some men should be happier than others. - Oscar Wilde
Error, no keyboard. Press F1 to continue.
Ever noticed how fast Windows runs? Neither did I.
Ever stop to think, and forget to start again?
Everyone has a photographic memory. Some don't have film.
Experience is something you don't get until just after you need it.
Experience is what you get when you don't get what you want.
A mobile phone is the only thing about which a man can proudly say, "Mine is smaller than yours!"
Work fascinates me. I could sit and watch it for hours.
Every time I think about exercise, I lie down till the thought goes away.
Sometimes I think I understand everything, then I regain consciousness.
I don't suffer from insanity. I enjoy every minute of it.

Marriage is the triumph of imagination over intelligence. Second marriage is the triumph of hope over experience.
 
Then there was a man who said, "I never knew what real happiness was until I got married. And then it was too late."

DHOLAK KE GEET

 
samdhan kho gaayi maan charminar ki sadak pay samdhan kho gaayi maan. Idhar dekhi udhar dekhi charminar ki galiyaan ,Hai samdhan mil gaayi maan joday waalay ki dukaan pay samdhan mil gaayi maan.

Bhai hamaray ho gaye bhabi kay deewanay allah,Bhabi ko hamaray saree bhi saajay, Bhai hamaray ho gaye pallo kay deewanay allah , Bhabi ko hamaray joda bhi saajay , Bhai hamaray ho gaye kangan kay deewanay allah

Banay posay kyaa kya waroon maan, Heeray wari moti bhi waari ,banay posay than mun waaroon maa.

banay teray jaybon ku heeray lagay,Ashrafiyaan luta they aaya bana, Banay teray baazuku baawa khaday ,susray ku nachatay aaya bana.

Dailaan mein pinaaye haar kyaa qushnuma bana kay, maali nay laya gehna malan nay layi haar,amma nay pinaaye haar kyaa qushnuma bana kay. Raat ka jaaganwa mora dushala pinaya maa, thussi laya jhumkay laya kangan ko tarsaaya maa.

Paayal baajay do pairiya mein chananana ray , unchi maadi buland darwaaza raani phirti Bhai kulcha Patel ki, chananana ray , Kulcha Bhai yeh Bhabi kay liye hai !

Samdan ki sheqi pe matthi pado mein sharam say margai munni kay bawa , Samdan ka kala chashma mein jal gayi allah , sheqi mein aako chashma utari dikh ko gaya seedhi aankhi ka phulla ,samdan kay kaalay balaan mein jal gayi allah , sheqi mein aako choti jo jhatki gir ko gaya wo kalay balon ka chutlaa ...

Kali Murgi Kho gaye na, suno maheloowalo meri kali murgi kho gaye na- saas pooche bahu begum kase mein pakae, dal chanwal ambadee ki bhaje kali murgi kho gaye na...I don't remember next lines but when her husband says, dulan begum kase mein ka pakae,she says " murgi ka salan, ghee ki parate kali murgi mel gaye na...

mere ghar main rahko..baatan amman bava ke kartain / yaan ka kha ko vaan ka garain..nain bole to sunte nain

munh par makeup thoop ko..jati umar ke pichhe mut bhago / gai so jawani phir nain aati..nain bole tu sunte nain

balon main chutla jode tu..banta hai dil ka jooda / laikin balan cut karvarain..nain bole tu sunte nain

unke balan kat hone tak..mere sir main ginti ke..hain so balan jhad ko jarain..nain bole tu sunte nain

charbi chhat ko duble padh gain..yek hafte se tahel ko aain chalte chalte dhaklian kha rain...nain bole tu sunte nain

jab puchha samdhi se main..kya samdhan ummid se hain / sharma ko bas itna bole..nain bole tu sunte nain

Tuesday, March 4, 2008


10 golden rules to become rich!
Once you decide to put your money to work to build long-term wealth, you have to decide, not whether to take risk, but what kind of risk you wish to take. Here are 10 investing rules that can make you rich:


1. There's no escaping risk

Once you decide to put your money to work to build long-term wealth, you have to decide, not whether to take risk, but what kind of risk you wish to take.

Yes, money in a savings account is dollar-safe, but those safe dollars are apt to be substantially eroded by inflation, a risk that almost guarantees you will fail to reach your wealth goals.

And yes, money in the stock market is very risky over the short-term, but, if well-diversified, should provide remarkable growth with a high degree of consistency over the long term.

2. Buy right and hold tight

The most critical decision you face is arriving at the proper allocation of assets in your investment portfolio -- stocks for growth of capital and growth of income, bonds for conservation of capital and current income.

Once you get your balance right, then just hold tight, no matter how high a greedy stock market flies, nor how low a frightened market plunges. Change the allocation only as your investment profile changes. Begin by considering a 50/50 stock/bond-cash balance, then raise the stock allocation if:

You have many years remaining to accumulate wealth.
The amount of capital you have at stake is modest.
You don't have much need for current income from your investments.
You have the courage to ride out the stock market booms and busts with reasonable equanimity.
As these factors are reversed, reduce the 50 per cent stock allocation accordingly.


3. Time is your friend, impulse your enemy

Think long term, and don't allow transitory changes in stock prices to alter your investment program. There is a lot of noise in the daily volatility of the stock market, which too often is 'a tale told by an idiot, full of sound and fury, signifying nothing'.

Stocks may remain overvalued, or undervalued, for years. Realize that one of the greatest sins of investing is to be captured by the siren song of the market, luring you into buying stocks when they are soaring and selling when they are plunging.

Impulse is your enemy. Why? Because market timing is impossible. Even if you turn out to be right when you sold stocks just before a decline (a rare occurrence!), where on earth would you ever get the insight that tells you the right time to get back in? One correct decision is tough enough. Two correct decisions are nigh on impossible.

Time is your friend. If, over the next 25 years, stocks produce a 10% return and a savings account produces a 5% return, $10,000 would grow to $108,000 in stocks vs. $34,000 in savings. (After 3% inflation, $54,000 vs $16,000). Give yourself all the time you can.

4. Realistic expectations: the bagel and the doughnut

These two different kinds of baked goods symbolize the two distinctively different elements of stock market returns.

It is hardly farfetched to consider that investment return -- dividend yields and earnings growth -- is the bagel of the stock market, for the investment return on stocks reflects their underlying character: nutritious, crusty and hard-boiled.

By the same token, speculative return -- wrought by any change in the price that investors are willing to pay for each dollar of earnings -- is the spongy doughnut of the market, reflecting changing public opinion about stock valuations, from the soft sweetness of optimism to the acid sourness of pessimism.

The substantive bagel-like economics of investing are almost inevitably productive, but the flaky, doughnut-like emotions of investors are anything but steady -- sometimes productive, sometimes counterproductive.

In the long run, it is investment return that rules the day. In the past 40 years, the speculative return on US stocks has been zero, with the annual investment return of 11.2% precisely equal to the stock market's total return of 11.2% per year.

But in the first 20 of those years, investors were sour on the economy's prospects, and a tumbling price-earnings ratio provided a speculative return of minus 4.6% per year, reducing the nutritious annual investment return of 12.1% to a market return of just 7.5%. From 1981 to 2001, however, the outlook sweetened, and a soaring P/E ratio produced a sugary 5% speculative boost to the investment return of 10.3%.

Result: The market return leaped to 15.3% -- double the return of the prior two decades.

The lesson: Enjoy the bagel's healthy nutrients, and don't count on the doughnut's sweetness to enhance them.

5. Why look for the needle in the haystack? Buy the haystack!

Experience confirms that buying the right stocks, betting on the right investment style, and picking the right money manager -- in each case, in advance -- is like looking for a needle in a haystack.

Investing in equities entails four risks: stock risk, style risk, manager risk, and market risk. The first three of these risks can easily be eliminated, simply by owning the entire stock market -- owning the haystack, as it were -- and holding it forever.

Owning the entire stock market is the ultimate diversifier. If you can't find the needle, buy the haystack.

6. Minimize the croupier's take

The resemblance of the stock market to the casino is not far-fetched. Yes, the stock market is a positive-sum game and the gambling casino is a zero-sum game . . . but only before the costs of playing each game are deducted. After the heavy costs of financial intermediaries (commissions, management fees, taxes, etc.) are deducted, beating the stock market is inevitably a loser's game. Just as, after the croupiers' wide rake descends, beating the casino is inevitably a loser's game. All investors as a group must earn the market's return before costs, and lose to the market after costs, and by the exact amount of those costs.

Your greatest chance of earning the market's return, therefore, is to reduce the croupiers' take to the bare-bones minimum. When you read about stock market returns, realize that the financial markets are not for sale, except at a high price.

The difference is crucial. If the market's return is 10% before costs, and intermediation costs are approximately 2%, then investors earn 8%. Compounded over 50 years, 8% takes $10,000 to $469,000. But at 10%, the final value leaps to $1,170,000 -- nearly three times as much . . . just by eliminating the croupier's take.

7. Beware of fighting the last war

Too many investors -- individuals and institutions alike -- are constantly making investment decisions based on the lessons of the recent, or even the extended, past. They seek technology stocks after they have emerged victorious from the last war; they worry about inflation after it becomes the accepted bogeyman, they buy bonds after the stock market has plunged.

You should not ignore the past, but neither should you assume that a particular cyclical trend will last forever. None does. Just because some investors insist on 'fighting the last war,' you don't need to do so yourself. It doesn't work for very long.

8. Sir Isaac Newton's revenge on Wall Street -- return to the mean

Through all history, investments have been subject to a sort of law of gravity: What goes up must go down, and, oddly enough, what goes down must go up. Not always of course (companies that die rarely live again), and not necessarily in the absolute sense, but relative to the overall market norm.

For example, stock market returns that substantially exceed the investment returns generated by earnings and dividends during one period tend to revert and fall well short of that norm during the next period. Like a pendulum, stock prices swing far above their underlying values, only to swing back to fair value and then far below it.

Another example: From the start of 1997 through March 2000, Nasdaq stocks (+230%) soared past NYSE-listed stocks (+20%), only to come to a screeching halt. During the subsequent year, Nasdaq stocks lost 67% of their value, while NYSE stocks lost just 7%, reverting to the original market value relationship (about one to five) between the so-called 'new economy' and the 'old economy.'

Reversion to the mean is found everywhere in the financial jungle, for the mean is a powerful magnet that, in the long run, finally draws everything back to it.

9. The hedgehog bests the fox

The Greek philosopher Archilochus tells us, 'The fox knows many things, but the hedgehog knows one great thing.' The fox -- artful, sly, and astute -- represents the financial institution that knows many things about complex markets and sophisticated marketing.

The hedgehog -- whose sharp spines give it almost impregnable armour when it curls into a ball -- is the financial institution that knows only one great thing: long-term investment success is based on simplicity.

The wily foxes of the financial world justify their existence by propagating the notion that an investor can survive only with the benefit of their artful knowledge and expertise. Such assistance, alas, does not come cheap, and the costs it entails tend to consume more value-added performance than even the most cunning of foxes can provide.

Result: The annual returns earned for investors by financial intermediaries such as mutual funds have averaged less than 80% of the stock market's annual return.

The hedgehog, on the other hand, knows that the truly great investment strategy succeeds, not because of its complexity or cleverness, but because of its simplicity and low cost. The hedgehog diversifies broadly, buys and holds, and keeps expenses to the bare-bones minimum.

The ultimate hedgehog: The all-market index fund, operated at minimal cost and with minimal portfolio turnover, virtually guarantees nearly 100% of the market's return to the investor.

In the field of investment management, foxes come and go, but hedgehogs are forever.

10. Stay the course: the secret of investing is that there is no secret

When you consider these previous nine rules, realize that they are about neither magic and legerdemain, nor about forecasting the unforecastable, nor about betting at long and ultimately unsurmountable odds, nor about learning some great secret of successful investing.

In fact, there is no great secret, only the majesty of simplicity. These rules are about elementary arithmetic, about fundamental and unarguable principles, and about that most uncommon of all attributes, common sense.

Owning the entire stock market through an index fund -- all the while balancing your portfolio with an appropriate allocation to an all bond market index fund -- with its cost-efficiency, its tax-efficiency, and its assurance of earning for you the market's return, is by definition a winning strategy.

But if only you follow one final rule for successful investing, perhaps the most important principle of all investment wisdom: Stay the course!


How the Sensex is calculated




For the premier Bombay Stock Exchange that pioneered the stock broking activity in India, 128 years of experience seems to be a proud milestone. A lot has changed since 1875 when 318 persons became members of what today is called The Stock Exchange, Mumbai by paying a princely amount of Re 1.


Since then, the country's capital markets have passed through both good and bad periods. The journey in the 20th century has not been an easy one. Till the decade of eighties, there was no scale to measure the ups and downs in the Indian stock market. The Stock Exchange, Mumbai in 1986 came out with a stock index that subsequently became the barometer of the Indian stock market.

Sensex is not only scientifically designed but also based on globally accepted construction and review methodology. First compiled in 1986, Sensex is a basket of 30 constituent stocks representing a sample of large, liquid and representative companies.

The base year of Sensex is 1978-79 and the base value is 100. The index is widely reported in both domestic and international markets through print as well as electronic media.

The Index was initially calculated based on the "Full Market Capitalization" methodology but was shifted to the free-float methodology with effect from September 1, 2003. The "Free-float Market Capitalization" methodology of index construction is regarded as an industry best practice globally. All major index providers like MSCI, FTSE, STOXX, S&P and Dow Jones use the Free-float methodology. (See below: Explanation with an example)

Due to is wide acceptance amongst the Indian investors; Sensex is regarded to be the pulse of the Indian stock market. As the oldest index in the country, it provides the time series data over a fairly long period of time (From 1979 onwards). Small wonder, the Sensex has over the years become one of the most prominent brands in the country.

The growth of equity markets in India has been phenomenal in the decade gone by. Right from early nineties the stock market witnessed heightened activity in terms of various bull and bear runs. The Sensex captured all these events in the most judicial manner. One can identify the booms and busts of the Indian stock market through Sensex.

Sensex Calculation Methodology

Sensex is calculated using the "Free-float Market Capitalization" methodology. As per this methodology, the level of index at any point of time reflects the Free-float market value of 30 component stocks relative to a base period. The market capitalization of a company is determined by multiplying the price of its stock by the number of shares issued by the company. This market capitalization is further multiplied by the free-float factor to determine the free-float market capitalization.

The base period of Sensex is 1978-79 and the base value is 100 index points. This is often indicated by the notation 1978-79=100. The calculation of Sensex involves dividing the Free-float market capitalization of 30 companies in the Index by a number called the Index Divisor.

The Divisor is the only link to the original base period value of the Sensex. It keeps the Index comparable over time and is the adjustment point for all Index adjustments arising out of corporate actions, replacement of scrips etc. During market hours, prices of the index scrips, at which latest trades are executed, are used by the trading system to calculate Sensex every 15 seconds and disseminated in real time.

Dollex-30

BSE also calculates a dollar-linked version of Sensex and historical values of this index are available since its inception.

Understanding Free-float Methodology

Free-float Methodology refers to an index construction methodology that takes into consideration only the free-float market capitalisation of a company for the purpose of index calculation and assigning weight to stocks in Index. Free-float market capitalization is defined as that proportion of total shares issued by the company that are readily available for trading in the market.

It generally excludes promoters' holding, government holding, strategic holding and other locked-in shares that will not come to the market for trading in the normal course. In other words, the market capitalization of each company in a Free-float index is reduced to the extent of its readily available shares in the market.

In India, BSE pioneered the concept of Free-float by launching BSE TECk in July 2001 and Bankex in June 2003. While BSE TECk Index is a TMT benchmark, Bankex is positioned as a benchmark for the banking sector stocks. Sensex becomes the third index in India to be based on the globally accepted Free-float Methodology.


--------------------------------------------------------------------------------

Example
Suppose the Index consists of only 2 stocks: Stock A and Stock B.

Suppose company A has 1,000 shares in total, of which 200 are held by the promoters, so that only 800 shares are available for trading to the general public. These 800 shares are the so-called 'free-floating' shares.

Similarly, company B has 2,000 shares in total, of which 1,000 are held by the promoters and the rest 1,000 are free-floating.

Now suppose the current market price of stock A is Rs 120. Thus, the 'total' market capitalisation of company A is Rs 120,000 (1,000 x 120), but its free-float market capitalisation is Rs 96,000 (800 x 120).

Similarly, suppose the current market price of stock B is Rs 200. The total market capitalisation of company B will thus be Rs 400,000 (2,000 x 200), but its free-float market cap is only Rs 200,000 (1,000 x 200).

So as of today the market capitalisation of the index (i.e. stocks A and B) is Rs 520,000 (Rs 120,000 + Rs 400,000); while the free-float market capitalisation of the index is Rs 296,000. (Rs 96,000 + Rs 200,000).

The year 1978-79 is considered the base year of the index with a value set to 100. What this means is that suppose at that time the market capitalisation of the stocks that comprised the index then was, say, 60,000 (remember at that time there may have been some other stocks in the index, not A and B, but that does not matter), then we assume that an index market cap of 60,000 is equal to an index-value of 100.

Thus the value of the index today is = 296,000 x 100/60,000 = 493.33

This is how the Sensex is calculated.

The factor 100/60000 is called index divisor.


--------------------------------------------------------------------------------

The 30 Sensex stocks are:

ACC, Ambuja Cements, Bajaj Auto [Get Quote], BHEL, Bharti Airtel [Get Quote], Cipla, DLF, Grasim Industries [Get Quote], HDFC [Get Quote], HDFC Bank, Hindalco Industries [Get Quote], Hindustan Lever [Get Quote], ICICI Bank [Get Quote], Infosys [Get Quote], ITC, Larsen & Toubro, Mahindra & Mahindra, Maruti Udyog [Get Quote], NTPC, ONGC [Get Quote], Ranbaxy Laboratories [Get Quote], Reliance Communications [Get Quote], Reliance Energy [Get Quote], Reliance Industries [Get Quote], Satyam Computer Services [Get Quote], State Bank of India [Get Quote], Tata Consultancy Services [Get Quote], Tata Motors [Get Quote], Tata Steel [Get Quote], and Wipro [Get Quote].



Friday, February 22, 2008

(no subject)


The Leave Applications; )


·
Infosys, Bangalore : An employee applied for leave as follows:

"Since I have to go to my village to sell my land along with my wife, please sanction me one-week leave."





·
This is from Oracle Bangalore: >From an employee who was performing the "mundan" ceremony of his 10 year old son:

"as I want to shave my son's head, please leave me for two days.."




·
Another gem from CDAC. Leave-letter from an employee who was performing his daughter's wedding:
"as I am marrying my daughter, please grant a week's leave.."




·
From H.A.L. Administration Dept:
"As my mother-in-law has expired and I am only one responsible for it, please grant me 10 days leave."




·
Another employee applied for half day leave as follows:
"Since I've to go to the cremation ground at 10 o-clock and I may not return, please grant me half day casual leave"




·
An incident of a leave letter:
"I am suffering from fever, please declare one-day holiday."




·
A leave letter to the headmaster:
"As I am studying in this school I am suffering from headache. I request you to leave me today"




·
Another leave letter written to the headmaster:
"As my headache is paining, please grant me leave for the day."




·
Covering note:
"I am enclosed herewith..."




·
Another one:
"Dear Sir: with reference to the above, please refer to my below..."




·
Actual letter written for application of leave:
"My wife is suffering from sickness and as I am her only husband at home I may be granted leave".




·
Letter writing:-
"I am well here and hope you are also in the same well."




·
A candidate's job application:
"This has reference to your advertisement calling for a ' Typist and an Accountant - Male or Female'... As I am both(!! )for the past several years and I can handle both with good experience, I am applying for the post.