Daily Archives: January 8, 2010

Oracle create or replace Stored Procedure example basics

An Oracle stored procedure is an Oracle object that you create using PL/SQL. PL/SQL is a procedural language which is used by Oracle developers to process and manipulate data stored in an Oracle database.

The basic form of an Oracle stored procedure is

CREATE OR REPLACE PROCEDURE p_procedure1 IS
BEGIN

null;

END p_procedure1;

Continue reading

How to view all tablespaces and their size in an Oracle database?

Answer:

Yse can use the command:

SELECT tablespace_name, sum((bytes/1024)/1024) “free space in MB” FROM DBA_FREE_SPACE GROUP BY tablespace_name;

This will give you the table space size in MB.

You can also see the size of each of the datafiles of a tablespace using the following command:

select file_name, (bytes/1024)/1024 “free space in MB” from dba_data_files where tablespace_name=’USERDATA’;


What is the function of PMON (process monitor)

Answer: This Oracle core process is responsible for recovering/freeing up resources when a user process fail. It cleans up the cache of the failed user process.

Oracle tablespace concept and increasing size of Oracle tablespace

Oracle Tablespace Concept

In Oracle world you will frequently hear about the word “tablespace”. So what is a table Tablespace?

To put very simply it is the Logical area of Oracle where all your data goes. The Tablespace holds your data for your tables and indexes. It other words the tablespace is a container where your data is kept. A tablespace is a logical concept only, it has no physical existence.

A tablespace is comprised of one or more datafiles. The files are the real operating system files that physically exist in your computer’s disks. Continue reading

How to increase number of extents in an INDEX?

Use

ALTER INDEX schemaz.Ind_IDX1  STORAGE ( MAXEXTENTS UNLIMITED);

or

ALTER INDEX schemaz.Ind_IDX1 STORAGE ( MAXEXTENTS 700);

depending on what you need.



Loading