Helpful Tips for Oracle and UNIX

Last Updated 25-Jan-12

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 - Extract Date Information

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 or Coalesce Indexes

Change DISPLAY

Find an available port

Collect Statistics (stats)

cp: Copying a directory to another location

Change Ownership Of Oracle Software On Unix

Enable/Disable Archiving

df -tk: Available space on UNIX

OS Authentication

ORA-00257 - Arch Log Full

du -sk: Size of directory

Deleting Files from Windows

DBMS_XPLAN

grep: Some useful grep options

Load Balancing and Increase SQL*NET Performance

Recompile Schema Objects

wc: Count files in a directory

Change Oracle UID and GIP (Userid and Group ID)

Shrink Datafiles and reduce UNDO - TEMP

wall: Sending message to all users on UNIX

Command History on SQL Plus (rlwrap)

Transportable Tablespaces

rm: Deleting backup files to free space 

Putty Settings

Orakill Utility

Check memory in CPU

SSH Tunnel to DB Server

rap Utility

lpstat: Finding available printers

Automatic Failover to Another Database

Copy Command

rcp: Setting up system to do remote copy 

Speed Up Oracle in your Laptop

Authid Current_User vs Authid Definer

vi: Doing a search and replace in vi

VNC - Install Oracle on Remote Server

What is locking table?

tr -d: Stripping control chars from ascii file 

Quick and Easy cloning of Oracle Software

Generate Randoms Data and Select Randomly from Table

ipcs: Cleaning up memory when a db process is killed 

Backup PUTTY Sessions

Space needed for Archive Log Files

co/ci: Locking/Unlocking archive files

 

Unlock users

Use rlwap to get Command History in SQL*Plus 
dbms_utility.get_time
Performing Loop Actions with Files

Orapwd File

Changing Group ID or User ID in Unix

Change DB Name and data file paths

Run Commands in Background

Get IP Address and Name of DB Server

Examples of the FIND command

Create SCOTT Example Schema

Detect 32-bit or 64-bit OS

Install Oracle Java
Change Hostname and IP Address on Linux
Pivot Table
Add New Disk to VM Environments

What code is executed?


Export Data to Excel


Delete duplicate Records


Managing Redo Log Files and Groups


Working with Sequences


Restrict Access by IP Address


Connect to a DB without TNSNAMES


Flush the Buffer and Shared Pool


Shrink a Table - Reset HWM


Detect Corrupted Block


Grab Execution Time


Make Password Unlimited


Format SQL Results (print_table)


Checking for 2 columns in a NOT IN clause


Change User


Calculate DB Growth


Monitor Long Operations