Showing posts from January, 2011

Creating Views in Oracle Database Using TOAD

A view logically represents subsets of data from one or more tables. You can restrict a user’s access to data in a table by using views. A view does not have a structure of its own and is stored as a SELECT statement in the database.

Views are of two types, simple and complex:

• Simple view: Retrieves data from only one table and contains no functions or group data. You can perform DML operations through a simple view.
• Complex view: Retrieves data from multiple tables or contains functions or group data. A complex view does not always allow you to perform DML operations.

Creating Simple View

You create a simple view based on only one table. In other words, the SELECT statement of the view retrieves data from only one table. For example:-


Write the SQL script in SQL tab and press F5 to execute.

Verify emp_vu View by using browser schema tab. 

You can creat…

Red Hat Linux 6 High Definition (HD) Wallpapers

RedHat Linux 6 Black HD

RedHat Linux 6 Red HD

Redhat Linux 6 Purple HD

Create Tables in Oracle Database using TOAD

In this tutorial I am sharing how to create a table in Oracle Database using TOAD for Oracle Software. A table is a database object created by users to store data in the form of rows and columns. A table is the basic unit of storage. Table can be created at any time, even while users are accessing the database. A database table consists of column that needs to be defined when creating the table. Table can have up to 1,000 columns. A table must conform to some standard database object-naming conventions. Follow the given below steps to create table in Oracle Database using TOAD software.

Linux Miscellaneous but important commands

To find help on some topic :
[root@SLES /]# man pwd
[root@SLES /]# info pwd

Also you can seek for a particual keyword ( say:  umask) in the man pages by:
[root@SLES /]# man -K umask

To find a file in the /usr directory, use:
[root@SLES /]# find /usr -name “*.doc”

To find files and directories owned by the group students in the /usr directory, use:
[root@SLES /]# find /usr -group students

Assuming a user left the organization and the files owned by his account name must be found and deleted for security reasons, use :
[root@SLES /]# find / -user Shaheer -exec rm  '{}'  ';'

Want to perform some quick mathematical calculations, use:
[root@SLES /]# bc

To set up date and time as 16 Jan 2000 17:35 you should use:
[root@SLES /]# date 0520173503

To synchronize it with the hardware clock, use:
[root@SLES /]# hwclock –-systohc

To check for memory and swap space usage, you can use:
[root@SLES /]# free
[root@SLES /]# top

To check the system load status averages and the uptime:
[root@SLES /]# uptim…

Linux Routing table and Naming related commands

To check the routing table :
[root@apps /]# route 
[root@apps /]# route -n

To add a default route or gateway:
[root@apps /]# route add default gw

To delete a default gateway:
[root@apps /]# route del default

To add a route to a network
[root@apps /]# route add –net netmask dev eth0

To delete a  network from the routing table
root@apps /]# route del –net netmask dev eth0

To add a host route:
[root@apps /]# route add eth0

To delete a host route
[root@apps /]# route del

To trace the path / number of hops to a particular host on the network:
[root@apps /]# traceroute
[root@apps /]# traceroute

To do tracing of the route and ping at the same time, use mtr:
[root@apps /]# mtr

To find a host and/or it's IP on the network use the following commands. These will query your default DNS server of your network:
[root@apps /]# host

Linux Package Management related commands

Following command lists all the currently installed packages and captures only those lines which have the word sendmail in them
[root@badar /]# rpm -qa | grep apache
[root@badar /]# rpm -qa apache*

To check presence of the package 'telnet' in the system, use the following command:
[root@badar /]# rpm -q telnet

Following command lists all the information about the specific installed  package.
[root@badar /]# rpm -qi nfs

Following command lists all the documentation files and their location of a particular installed package.
[root@badar /]# rpm -qd sendmail

Following command lists file locations of all of the files of a particular installed package.
[root@badar /]# rpm -ql sendmail

Following command lists all information of the un-installed package:
[root@badar /]# rpm -qpi telnet-1.1-39.2.i586.rpm

Similarly,you can check the list of files a package contains, before actually installing it:
[root@badar /]# rpm -qpl telnet-1.1-39.2.i586.rpm

Install rpm from (mounted) SLES DVD by using the foll…

Linux Process Management related commands

Following command shows the list of all running processes with their process ids (PID), even owned by other users:

[root@badar /]# ps aux | less

You can also use pstree:

[root@badar /]# pstree

Following command will kill a specific process, say process id 32432:

[root@badar /]# kill 32432
[root@badar /]# kill –s KILL 32432
[root@badar /]# kill –KILL 32432
[root@badar /]# kill –9 32432