Vous êtes sur la page 1sur 1

How to check used size of the tablespace: --------------------------------------------SQL> select tablespace_name, 'Mb'||' '||round(sum(bytes/1024/1024)) "Used_Size" from dba_data_files group

by tablespace_name; Check free/available size of the tablespace: -------------------------------------------SQL> Select tablespace_name, 'Mb'||' '||round(sum(bytes/1024/1024)) "Free_Size" from dba_free_space group by tablespace_name; \Finding free and use temporary table space in Oracle: ---------------------------------------------------SQL> SELECT tablespace_name, SUM (bytes_used), SUM (bytes_free) FROM v$temp_spac e_header GROUP BY tablespace_name; Get all the conneted users from Oracle: -----------------------------------Select machine,username,sid || ',' || serial# "ID", status,last_call_et "Last Ac tivity" from v$session \ 4 where username is not null \ 5 order by status desc,last_call_et desc; We will get last user activity in time: --------------------------------------------Select username,floor(last_call_et / 60) "Minutes",status from v$session where u sername is not null order by last_call_et; Are cursor being used (check gethitratio): ---------------------------------------------SQL> select gethitratio from v$librarycache where namespace = 'SQL AREA'; Findout which statements users are running: ------------------------------------------SQL> select sql_text, users_executing, executions, loads from v$sqlarea; Reloads should be less than 1% of pins: (in librarycache) ---------------------------------------------select sum(pins) "Executions", sum(reloads) "Cache Misses", sum(reloads)/sum(pin s) from v$librarycache; If values is grater than 1%, then increase the value of SHARED_POOL_SIZE. The tw o main reasons of geeting this % more than 1 is: 1> Though required by successive reexecution, shared parsed areas have been aged out because of lack of space. 2> Shared parsed areas are invalidated.

Vous aimerez peut-être aussi