Tales From A Lazy Fat DBA

Its all about Databases & their performance, troubleshooting & much more …. ¯\_(ツ)_/¯

Posts Tagged ‘Unix’

Alias (Unix)

Posted by FatDBA on July 23, 2012


The alias command allows you to make new shortcuts and synonyms for commonly used commands.

Alias settings resets every time you reboots or switch users in Unix. There are number of ways/methods to permanently save Alias in your machine. Below discussed is one of the most common way to fix alias settings to make them global and always available.

1. Edit your bash profile (If using Bash Shell) and add all alias you want to set.

[root@localhost /]# gedit /etc/bashrc
(Below are excerpts from a live bashrc profile from one of my machine)

# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

alias base=’cd /u01/app/oracle’
alias c=’clear’
alias home=’cd /u01/app/oracle/product/10.2.0/db_1′
alias sql=’sqlplus / as sysdba’
alias sid=”echo $ORACLE_SID”

# By default, we want this to get set.
# Even for non-interactive, non-login shells.

2. Add source /etc/bashrc to your ~/.bashrc profile.

[root@localhost /]# gedit ~/.bashrc

Will look like —

# .bashrc
# User specific aliases and functions

alias rm=’rm -i’
alias cp=’cp -i’
alias mv=’mv -i’
source /etc/bashrc

# Source global definitions


Enjoy The Shortcuts using ‘alias’ — Below is one of alias used to reach directory – ORACLE_BASE using alias named ‘base’.

[root@localhost ~]# base

[root@localhost oracle]# pwd
[root@localhost oracle]#

Posted in Advanced | Tagged: , | 1 Comment »

OS Kernel Parameters Explained (Oracle Installations)

Posted by FatDBA on July 22, 2012

During Manual Oracle Database Installation on Linux/Unix Platforms we need to perform some changes to Kernel Values. Below are the Kernel parameters needed to be change before installation begins:

If you have not used the “oracle-validated” package to perform all prerequisites, you will need to manually perform the following setup tasks.

To check existing Kernel parameters settings use below string to verify:
# cat /proc/sys/kernel/shmmni

To check Semaphores Values:
[oracle@localhost orcl]$ ipcs -ls

—— Semaphore Limits ——–
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 100
semaphore max value = 32767

kernel.shmmax = 2147483648
Meaning: This parameter defines the maximum size in bytes of a single shared memory segment that a Linux process can allocate in its virtual address space.Since the SGA is comprised of shared memory, SHMMAX can potentially limit the size of the SGA. SHMMAX should be slightly larger than the SGA size. If SHMMAX is too small, you can get error messages similar to this one:

ORA-27123: unable to attach to shared memory segment

kernel.shmall = 2097152
Meaning: This parameter sets the total amount of shared memory pages that can be used system wide.

kernel.shmmni = 4096
Meaning: This parameter sets the system wide maximum number of shared memory segments. Oracle recommends SHMMNI to be at least 4096 for Oracle 10g.

# semaphores: semmsl, semmns, semopm, semmni
kernel.sem=250 32000 100 128

semmsl: This parameter defines the maximum number of semaphores per semaphore set.
semmns: This parameter defines the total number of semaphores (not semaphore sets) for the entire Linux system.
semopm: This parameter defines the maximum number of semaphore operations that can be performed per semop(2) system call (semaphore call).
semmni: This parameter defines the maximum number of semaphore sets for the entire Linux system.

Posted in Advanced | Tagged: | 1 Comment »

%d bloggers like this: