Create alias in Linux/Unix/Aix Systems

Aliases can help in issuing complex or long commands by creating short aliases for them.

Aliases can be created for the session or persistent ones by adding them to .profile or .bashrc file depending on what flavor of Unix you are using.

Example:

alias l=’l -al’#this will create alias for list command with couple of paramter
alias alert=’cd /u02/diag/rdbms/prod/prod1/trace’ #this creates alias for alert log location for oracle

ADR Commands Oracle

###Start ADR

adrci

###shows errors in log

SHOW PROBLEM

###Shows last 10 entries of alert file

SHOW ALERT -TAIL

###Display all trace files

SHOW TRACEFILE

###Display trace file location related to incident

SHOW TRACEFILE -I 1234

###Shows incidents in 11g above

SHOW INCIDENT

###Show details of particular incident

SHOW INCIDENT -MODE DETAIL -P “INCIDENT_ID=1234″

List of backup details – Oracle Database

To get list of full backup from Oracle database run the script below, which uses the rman_backup_job_details system view, this list all backups in database with archivelog mode on and backup size of at least 1 Terabyte.

SELECT * FROM v$rman_backup_job_details
WHERE input_type = 'DB INCR'
AND output_bytes_display LIKE '%T'
ORDER BY session_key DESC;