Archive

Author Archive

Unix/Linux commands Quick reference

June 24th, 2009 admin No comments

Quick Reference: Unix Commands and options

The following format is used for commands:
Italic indicates a variable that you supply
Bold indicates exactly what you type
[ ] Square brackets indicate that the thing which they surround is optionally typed. The square brackets themselves are not to be typed.

To display a command description from the Unix Manual and can be used to get more information on each command. Type following on shell prompt to see the manual:
man command
Example: man ls to find more about the command ls

If you are not sure of the exact command name, you can use man with the -k option to help you find the command you need. To see one line summaries of each reference page that contains the keyword you specify, enter: man -k keyword Read more…

Post to Twitter Post to Digg
  • Share/Bookmark

Unix commands Quick reference

June 24th, 2009 admin No comments

Special commands and characters:

Converting DOS commands to UNIX commands

There are a few command line questions that are asked very often. These questions, with answers that should be typed at your shell prompt are printed below:

DOS                 UNIX
dir ............... ls
cls ............... clear
del ............... rm
copy .............. cp
move / rename ..... mv
type .............. cat
cd ................ cd
more < file ....... more file
md ................ mkdir
rd ................ rmdir
win ............... startx
(Note:  Unlike DOS, commands and their arguments MUST be separated by a space. 
For example, "cd/" doesn't work, but "cd /" does.)

Redirection

< Routes input to command from file
> Routes output from command to file
>> Appends output to existing file
| Routes output between commands

Read more…

Post to Twitter Post to Digg
  • Share/Bookmark
Categories: Linux/Unix/Solaris, Shell scripting Tags:

PL/SQL quick reference

June 24th, 2009 admin 1 comment

Oracle PL/SQL Quick Reference

 

PL/SQL Block Structure

DECLARE --Optional   --Variables, Cursors, User-defined exceptions BEGIN --Mandatory   --SQL statements   --PL/SQL statements EXCEPTION --Optional   --Actions to perform when errors occur END; --Mandatory Read more...
Post to Twitter Post to Digg
  • Share/Bookmark

Oracle SQL Quick reference

June 24th, 2009 admin 2 comments

Oracle SQL Quick Reference

SELECT Query Statement

SELECT [DISTINCT] {*, column [alias],…}

FROM table

WHERE condition(s)]

ORDER BY {column, exp, alias} [ASC|DESC]]

NOTE:

Avoid using DISTINCT with large table as it first does sorting of all the rows and then eliminates duplicate rows, so need a full table scan and thus it’s very slow.

ORDER BY is the last clause to get executed and thus could see all the column aliases; You can sort by a columns that is not in SELECT list; Default sorting order is Ascending (ASC)

Read more…

Post to Twitter Post to Digg
  • Share/Bookmark

Oracle SQL tuning tips

June 24th, 2009 admin 2 comments

Oracle SQL Tuning Tips

consideration when writing an SQL statement is that it returns a correct result. The second is that it be the most efficient for a given situation.  You can use many different SQL statements to achieve the same result. It is often the case that only one statement will be the most efficient choice in a given situation.

Remember that processing SQL is a sequence of Parse (syntax check and object resolution), Execution (required reads and writes), and Fetch (row results retrieved, listed, sorted, and returned). SQL “tuning” consists, quite simply, of reducing one or more of them.

Note: generally Parse is the greatest time and resource hog. Parse overhead can be minimized by the use of Procedures, Functions, Packages, Views, etc.

Inadequate performance can have a significant cost impact on your business. A poor performing system and application can result in customer dissatisfaction, reduced productivity, and high costs. It is absolutely critical that the system’s performance is operating at its peak levels.

Following are some general tips that often increase SQL statement efficiency. Being general they may not apply to a particular scenario. Read more…

Post to Twitter Post to Digg
  • Share/Bookmark