Posts

Showing posts from January, 2011

Creating Views in Oracle Database Using TOAD

Image
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:- CREATE OR REPLACE VIEW EMP_VU (EMPNO, EMP_NAME, ANNUAL_SALARY, DEPTNO) AS SELECT e.EMPNO, e.EMP_NAME, e.SALARY*12, e.DEPTNO FROM employee e; Write the SQL script in SQL tab and press F5 to execute. ...

Red Hat Linux 6 High Definition (HD) Wallpapers

Image
RedHat Linux 6 Black HD RedHat Linux 6 Red HD Redhat Linux 6 Purple HD

Create Tables in Oracle Database using TOAD

Image
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 or [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 or [root@SLES /]# top To check the sy...

Linux Routing table and Naming related commands

To check the routing table : [root@apps /]# route  or [root@apps /]# route -n To add a default route or gateway: [root@apps /]# route add default gw  192.168.1.254 To delete a default gateway: [root@apps /]# route del default To add a route to a network [root@apps /]# route add –net 192.168.1.0 netmask 255.255.255.0 dev eth0 To delete a  network from the routing table root@apps /]# route del –net 192.168.1.0 netmask 255.255.255.0 dev eth0 To add a host route: [root@apps /]# route add 192.168.1.1 eth0 To delete a host route [root@apps /]# route del 192.168.1.1 To trace the path / number of hops to a particular host on the network: [root@apps /]# traceroute workstation1.mydomain.com or  [root@apps /]# traceroute www.linux.org To do tracing of the route and ping at the same time, use mtr: [root@apps /]# mtr workstation1.mydomain.com To find a host and/or it's IP on the network use the following commands. These will query your defa...

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 or [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 ...

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 or [root@badar /]# kill –s KILL 32432 or [root@badar /]# kill –KILL 32432 or [root@badar /]# kill –9 32432