image

How to know the size of oracle database?

Oracle database consist of datafiles,redo log files, control files and temp files. And sum of all these file is the size of the oracle database. i.e   select ( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) + ( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from dba_temp_files ) + ( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) + ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 … continue reading

image

ORA-01033 : file 1 needs media recovery

Possbile Solutions: Basically your system.dbf is corrupted / incomplete.. needs recovery1. kill all connects from OS level2. ps -ef |grep pmonans kill the database service that is running…3. Do you have any RMAN backup or archivelogs?If YES – Recover database with the archivelogsif NO – try to recover using all the redo logs..Commnad: recover database … continue reading

image

exact fetch returns more than requested number of rows

Problem : DECLARE empname VARCHAR2(200); BEGIN select ENAME into empname from emp where dept_id=20; END; / Reason : The above code returns the multiple rows , here the select into statements accepts only one row. i.e A┬áSELECT INTO┬ástatement will throw an error if it returns anything other than 1 row. If it returns 0 rows, … continue reading

Visit Us On FacebookVisit Us On Google PlusVisit Us On Youtube