The Oracle database administrator knows the pid of an Oracle resource-intensive process. Now we want to gather some informations on the SQL Statement (SQL_ID, username, program, terminal…) before running an explain plan. SELECT ‘USERNAME : ‘ || s.username || CHR (10) || ‘SCHEMA : ‘ || s.schemaname || CHR (10) || ‘OSUSER : ‘ || […]
Catégorie : Unix
I/O Bottlenecks
Our Oracle databases in Montreal are sometimes experiencing performance problems and the Oracle DBA wants to know if there are I/O Bottlenecks. If working with a zone (a virtual operating system abstraction), first you will have to find the disk: $ zpool status pool: rpool state: ONLINE scan: none requested config: NAME STATE READ […]
CPU Issues
The DBAs want to know if there are performance issues with cpu in an Oracle database for example: First: $ ps -e -o pcpu,pid,user,tty,args | sort -n -k 1 -r | head %CPU PID USER TT COMMAND 55.3 934757 oracle ? oracleGdefgP (LOCAL=NO) 10.1 935480 oracle ? oracleGdefgP (LOCAL=NO) 0.1 935247 oracle ? oracleGdefgP (LOCAL=NO) […]
Disk Space Full
When a disk is out os space, the database hungs or is unreachable and the Oracle DBA wants to find where are the large files to move or delete them. For example: $ df –h –> show 100% used — Find first 15 large files: $ cd « My file system full » $ find . -ls […]
Find Replace
I want to do a simple find replace of a string in one line for all the files in a Unix directory Useful when the Oracle DBA has to update a lots of SQL or shell scripts. Example of a find replace: ~/sql directory has thousands of SQL files and I’d like to find out […]