Linux interview questions for DBA
How
do you see how many instances are running?
In
unix, you can use the command line
% ps -ef|grep ora_
% ps -ef|grep ora_
How
do you automate starting and shutting down of databases in Unix?
Automatic
startup can be done with /etc/oratab/ entyr of the linux machine.
Automatic shutdown we can't configure in the entry.
Automatic shutdown we can't configure in the entry.
You
have written a script to take backups. How do you make it run automatically
every week?
corntab
What
is OERR utility?
The
oerr utility (Oracle Error) is provided only with Oracle databases on
UNIX platforms. oerr is not an executable, but instead, a shell
script that retrieves messages from installed message files. Oerr is an Oracle
utility that extracts error messages with suggested actions from the standard
Oracle message files. This utility is very useful as it can extract OS-specific
errors that are not in the generic Error Messages and Codes Manual.
How
do you see Virtual Memory Statistics in Linux?
vmstat
reports information about processes, memory, paging, block IO, traps, and cpu
activity.
How
do you see how much hard disk space is free in Linux?
df
-lh
What
is SAR?
The
sar command writes to standard output the contents of selected cumulative
activity counters in the operating system
What
is SHMMAX?
SHMMAX
is the maximum size of a shared memory segment on a Linux system
Swap
partition must be how much the size of RAM?
Your
swap partition should be at least as big as your RAM size. However it should be
double the size of RAM
What
is DISM in Solaris?
DISM Dynamic Intimate Shared memory which is
used to support oracle in Solaris Envirnoment DISM is only supported from
Solaris 9 and above version. On Solaris 9
systems, dynamic/pageable ISM (DISM) is available. This enables Oracle Database
to share virtual memory resources between processes sharing the segment, and at
the same time, enables memory paging. The operating system does not have to
lock down physical memory for the entire shared memory segment.
How
do you see how many memory segments are acquired by Oracle Instances?
sga
pga
Db_buffer_cache
Log_buffer_cache
What
is VMSTAT?
vmstat
reports information about processes, memory, paging, block IO, traps, and cpu
activity.
How
do you set Kernel Parameters in Red Hat Linux, AIX and Solaris?
There
are two methods to configure the Kernel parameters in RHEL
1. by
using the command "sysctl -w <parameter_name>= <value>
The above
command will change the kernel parameters on the fly but the changes are not
persistent with system reboots. That is why people always choose the second
method to make changes to kernel parameters
2. By
editing the file "/etc/sysctl.conf" file
A.
Edit the file "/etc/sysctl.conf" by adding the parameters along with
values
B.
execute "/sbin/sysctl -p" to make sure that the changes are made
using the values inside the above mentioned file.
The
advantage with the second method is that the changes are persistent with system
reboots.
How
do you remove Memory segments?
To
remove the shared memory segment, you could copy/paste shmid and execute:
$
ipcrm shm 32768
Another
approach to remove shared memory is to use Oracle's sysresv utility.
What
is the difference between Soft Link and Hard Link?
Soft link:-This is a Symbolic
link between files. The actual file or directory must be residing at any
available partitions of the harddisk Soft Link is just a shortcut (in windows
terms) or link created with a new file name at the working directory or at
current working partition of hard disk. Even when you don't require it you can
confidently delete this soft link as it doesn't remove the actual file or
directory. The reason is the actual file or diretcory's inode is different from
the softlink created file's inode in any unix system.
Hard link:-It is the
replica of the actual file or directory which must be residing at any available
partitions. This is a duplicate file copy of it's orginal which can be created
at current working partition.When we remove or delete this hardlink it removes
the original file or directory too.The reson is they share the same inode in
any unix file system.
What
is stored in oratab file?
This
file is used by ORACLE utilities. It is created by root.sh and updated by
the Database Configuration Assistant when creating a database.
A colon, ':', is used as the field terminator. A new line terminates the entry. Lines beginning with a pound sign, '#', are comments.
Entries are of the form:
$ORACLE_SID:$ORACLE_HOME:<N|Y>:
The first and second fields are the system identifier and home directory of the database respectively. The third filed indicates to the dbstart utility that the database should , "Y", or should not, "N", be brought up at system boot time.
Multiple entries with the same $ORACLE_SID are not allowed.
A colon, ':', is used as the field terminator. A new line terminates the entry. Lines beginning with a pound sign, '#', are comments.
Entries are of the form:
$ORACLE_SID:$ORACLE_HOME:<N|Y>:
The first and second fields are the system identifier and home directory of the database respectively. The third filed indicates to the dbstart utility that the database should , "Y", or should not, "N", be brought up at system boot time.
Multiple entries with the same $ORACLE_SID are not allowed.
How
do you see how many processes are running in Unix?
ps
-e|cut -d " " -fname|wc -l
How
do you kill a process in Unix?
Linux
and all other UNIX like oses comes with kill command. The command kill sends
the specified signal (such as kill process) to the specified process or process
group. If no signal is specified, the TERM signal is sent. Kill process
using kill command under Linux/UNIX. kill command works under both Linux and
UNIX/BSD like operating systems.
Can
you change priority of a Process in Unix?
As
system administrator you can use the renice command to change the priority of a
process all processes of a user or all processes belong to a group of users.
The renice command has the form
/etc/renice
priority [ [ -p ] pid ... ] [ [ -g ] pgrp ... ] [ [ -u ] user
Hi There,
ReplyDeleteWhat you’re saying is absolutely correct Linux interview questions for DBA , but this isn’t the exact situation everywhere. Where most smart folk work on a project - why can’t you do this the Boss asks :).
I decided I had better get all the spec's for my dell latitude d600 and post them to see what linixos I can use. I use my laptop for personal and business use for my Ham Radio events, such as skywarn and emergency communications.
But great job man, do keep posted with the new updates.
Cheers,
Radhey