Helpful Tips for Oracle and UNIX

Last Updated 02-Jan-06

UNIX Tips

Install Tips

Database Tips

Cron Jobs

Check OS Block_Size

Writing to the alert log

Deleting Files according to dates (example 5 days old)

Pin Objects at Startup

Connect as SYSDBA

Switching ORACLE_HOME and Oracle_SID

Delete DB during Creation

Outer Join - Usage and Efficiency

uname: Finding O/S Version

Start DB Listener boot time

Managing Dates

nslookup: Finding ip address

Setting umask and access

Adding SID to the SQL Prompt (glogin)

ps: Finding ps id for trace or other exec

Setting TWO_TASK

Move tables

Zip or Tar a directory

Listener - Starting, Stopping

Rebuild Indexes

Change DISPLAY

Find an available port

Rebuild Index? There is an alternative

cp: Copying a directory to another location

Restore DB & change DB name

Archiving ON

df -tk: Available space on UNIX

Load Balancing tnsnames.ora

Archiving OFF

du -sk: Size of directory


DBMS_XPLAN

grep: Some useful grep options


Delete duplicate Records

wc: Count files in a directory

 

Shrinking Datafiles

wall: Sending message to all users on UNIX

 

Transportable Tablespaces

rm: Deleting backup files to free space 

 

Orakill Utility

Check memory in CPU

 

Wrap Utility

lpstat: Finding available printers

 

Copy Command

rcp: Setting up system to do remote copy 

 

Authid Current_User vs Authid Definer

vi: Doing a search and replace in vi

 

What is locking table?

tr -d: Stripping control chars from ascii file 

 

Select Randomly from Table

ipcs: Cleaning up memory when a db process is killed 

 

Space needed for Archive Log Files

co/ci: Locking/Unlocking archive files

 

Unlock users

Performing Loop Actions with Files

Orapwd File



Change DB Name and data file paths



Recompile Schema Objects



Create SCOTT Example Schema



Resize TEMP Tablespace