Oracle Systems DBA Reference

Database, UNIX, etc. @ 15zips

UNIX

TAR / TAR.Z

How to create and extract zip, tar, tar.gz and tar.bz2 files in Linux Data compression has been extremely useful to us over the years. Whether its a zip file containing images to be sent in a mail or a compressed data backup stored on a server, we use data compression to save valuable hard drive […]

Test a Disk for I/O write timing.

time dd if=/dev/zero of=sample.data bs=8192 count=131072 131072+0 records in 131072+0 records out real 0m8.98s user 0m0.10s sys 0m6.79s

Test speed of disks – write a 1GB file and time it.

time mkfile 1024m junk.txt

Check RPMs on Linux

rpm -q full_name or use this script: rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n’ binutils \ compat-libstdc++-33 \ elfutils-libelf \ elfutils-libelf-devel \ gcc \ gcc-c++ \ glibc \ glibc-common \ glibc-devel \ glibc-headers \ ksh \ libaio \ libaio-devel \ libgcc \ libstdc++ \ libstdc++-devel \ make \ sysstat \ unixODBC \ unixODBC-devel

Flushdns on Linux

(As root): # service nscd restart

Find command – examples using mtime

Fractional 24-hour periods are truncated! That means that “find -mtime +1” says to match files modified two or more days ago. find . -mtime +0 # find files modified greater than 24 hours ago find . -mtime 0 # find files modified between now and 1 day ago # (i.e., in the past 24 hours […]

OS Block Size

On my Solaris Machine, SQL> !perl -e ‘$a=(stat “.”)[11]; print $a’ Another example, SQL> !df -g | grep ‘block size’

Remove files from a specific date or with a specific string

ls -al *.arc|grep ‘Sep 29’|awk ‘{print $NF}’

How to administer iptables

# service iptables stop # service iptables start

Setting up chkconfig for autostart on Linux.

Setting up chkconfig on Linux: Create /etc/init.d/apps-ctl (owned by root; 755 permissions) Should contain only these lines: #!/bin/bash # # apps-ctl This scripts runs the Oracle startup. # # chkconfig: 345 99 01 # description: This runs the Oracle startup /dba/development/bin/apps-ctl $1 Register this with chkconfig: /sbin/chkconfig –help /sbin/chkconfig –add apps-ctl /sbin/chkconfig –list

Previous Posts