script to check possible resize value for a datafile
Sometimes, we will be getting a requirement to resize the datafile to a lower value in order to create some space in the mount point (file system). In that case, how we would know which datafile and to...
View Articlescript to find sql text with sid of a session
####################### TO FIND SQL TEXT FROM SID ####################### select a.sid,a.program,b.sql_text from v$session a, v$sqltext b where a.sql_hash_value = b.hash_value and a.sid=429 order by...
View Articlescript to find redo generated by current sessions
################################################# redo generated by current sessions ################################################# select v$session.sid, username, value redo_size from v$sesstat,...
View Articlescript to check db status in a server
*************************************************** script to check db status in a server *************************************************** #!/bin/csh setenv ORATAB /var/opt/oracle/oratab date...
View Articlescript to check db status in rac env
*************************************************** script to check db status in rac env *************************************************** #!/bin/csh setenv ORATAB /var/opt/oracle/oratab date foreach...
View Articlescript to get row count of all tables in a schema
*************************************************** script to get row count of all tables in a schema *************************************************** #!/bin/csh sqlplus -s <<EOF...
View Articlescript to check tablespace free space for all db’s in server
*************************************************** script to check tablespace free space for all db’s in server *************************************************** #!/bin/csh setenv ORATAB...
View Articlescript to check INACTIVE sessions with HIGH DISK IO
To check INACTIVE sessions with HIGH DISK IO ============================================= select p.spid,s.username, s.sid,s.status,t.disk_reads, s.last_call_et/3600 last_call_et_Hrs,...
View Articlescript to analyze Disk IO’s
To Analyze the DISK I/o’s ========================== prompt SESSIONS PERFORMING HIGH I/O > 50000 select p.spid, s.sid,s.process cli_process, s.status,t.disk_reads, s.last_call_et/3600...
View ArticleScript to list events in Oracle Database
Friends, many a times we will be setting events traces in our databases for various reasons. The below script will give advantage to know what are all the events turned on in our database Listing All...
View Article