Tuesday, 29 October 2013

ftp: Internet File Transfer Program

ftp: Internet File Transfer Program

Use the following syntax to connect to transfer files to and from a remote network ftp site:
ftp ftp.example.com
ftp 1.2.3.4
ftp user@ftp.example.com
You must know ftp username and password for user-based password authentication or with anonymous user access use ftp as both username and password. In this example, you are connecting to ftp.freebsd.org with anonymous user access (open the terminal and type the following command):
$ ftp ftp.freebsd.org
Sample session:
Trying 87.51.34.132...
Connected to ftp.freebsd.org.
220 ftp.beastie.tdk.net FTP server (Version 6.00LS) ready.
Name (ftp.freebsd.org:vivek): ftp
331 Guest login ok, send your email address as password.
Password:
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
When you enter your own loginname and password for the ftp.example.com server, it returns the prompt
            ftp>
You need to type all commands in front of the ftp> prompt.

Task: List Current File

Type the ls command at ftp> prompt:
ftp> ls
Sample outputs:
229 Entering Extended Passive Mode (|||60692|)
150 Opening ASCII mode data connection for '/bin/ls'.
total 10
drwxrwxr-x  2 0     5      512 Jul 19  2007 .snap
drwx------  2 0     0     2048 Jul 19  2007 lost+found
drwxr-xr-x  3 1006  1006   512 Sep 21  2009 pub
drwxr-xr-x  3 1006  1006   512 Jun  5  2007 sup
drwxr-xr-x  4 1006  0      512 Sep 18  2009 www
226 Transfer complete.
ftp>
The above will list the names of the files in the current remote directory (the last name is file or dir name).

Task: Change Directory

To change directory on the remote machine use cd command:
ftp> cd dirName
To change to pub directory, enter:
ftp> cd pub
Sample outputs:
250 CWD command successful.

Task: Download / Copy file

To copy one file at a time from the remote ftp server to the local system use get command:
get fileName
get fileName newFileName
In this example, download file resume.pdf in the current remote directory to (or on top of) a file with the same name, resume.pdf, in your current local directory:
ftp> get resume.pdf
Sample outputs:
local: resume.pdf remote: resume.pdf
229 Entering Extended Passive Mode (|||55093|)
150 Opening BINARY mode data connection for 'resume.pdf' (53077 bytes).
100% |*********************************************************************| 53077       12.58 KiB/s    00:00 ETA
226 Transfer complete.
53077 bytes received in 00:04 (12.57 KiB/s)
In this example, copies file data.tar.gz in the current remote directory to (or on top of) a file named backup.tar.gz in your current local directory:
ftp> get data.tar.gz backup.tar.gz

Change Local Directory

To change directory on your local system, enter:
ftp> lcd /path/to/new/dir
ftp> lcd /tmp

Sample outputs:
Local directory now: /tmp
Print local directory:
ftp> lpwd
Sample outputs:
/tmp
The lpwd command prints current download directory for local systems. However, to find out the pathname of the current directory on the remote ftp server, enter:
ftp> pwd
Sample outputs:
Remote directory: /pub/FreeBSD

Task: Download Multiple Files

You need to use mget command as follows to copy multiple files from the remote ftp server to the local system. You may be prompted for a yes/no (Y/N) answer before transferring each file (you can disable prompt by passing the -i option to ftp client). To download all files, enter:
ftp> mget *
To download all perl files (ending with .pl extension), enter:
ftp> mget *.pl

Task: Turn On / Off Interactive Prompting

The ftp command prompt sets interactive prompting; "on" which enables prompting so that you can verify of each step of the multiple commands, "off" allows the commands to act unimpeded:
ftp> prompt on
ftp> mput *.php
ftp> prompt off
ftp> mget *.py

Task: Delete File

To delete a file in the current remote directory use delete command:
ftp> delete fileName
ftp> delete output.jpg

Task: Upload One File

To copy one file at a time from the local systems to the remote ftp server, enter:
ftp> put fileName
In this example, upload logo.jpg, enter:
ftp> put logo.jpg

Task: Upload Multiple Files

To copy multiple files from the local system to the remote ftp server use mput command. Again, you may be prompted for a yes/no (y/n) answer before transferring each file. In this example, upload all files from the current system:
ftp> mput *
ftp> mput *.pl

Task: Create a Directory

To make a new directory, enter:
ftp> mkdir dirName
ftp> mkdir scripts
ftp> cd scripts
ftp> pwd

Task: Delete a Directory

To remove or delete a directory, enter:
ftp> rmdir dirName
ftp> rmdir images
ftp> ls

Task: Set The Mode Of File Transfer

To set the mode of file transfer to ASCII, enter:
ftp> ascii
Please note that ascii is the default and good for text files. To set the mode of file transfer to binary, enter:
ftp> binary
The binary mode is recommended for almost all sort of files including images, zip files and much more. The binary mode provides less chance of a transmission error.

Task: Connect To Another FTP Server

To open a connection with another ftp server, enter:
ftp> open ftp.nixcraft.net.in
The above command opens a new FTP connection with ftp.nixcraft.net.in. You must provide a username and password for a ftp.nixcraft.net.in account. However, a username and password can be skipped for an anonymous FTP connection.

Task: Exit the FTP Session

Type quit or bye, enter:
ftp> quit
OR
ftp> bye

Wednesday, 23 October 2013

UNIX Commands for DBAs

This article contains a brief list of commands that most UNIX DBAs will need on a regular basis. Over time I've been adding more Linux-related entries.
Related articles.

Basic File Navigation

The "pwd" command displays the current directory.
root> pwd
/u01/app/oracle/product/9.2.0.1.0
The "ls" command lists all files and directories in the specified directory. If no location is defined it acts on the current directory.
root> ls
root> ls /u01
root> ls -al
The "-a" flag lists hidden "." files. The "-l" flag lists file details.
The "cd" command is used to change directories.
root> cd /u01/app/oracle
The "touch" command is used to create a new empty file with the default permissions.
root> touch my.log
The "rm" command is used to delete files and directories.
root> rm my.log
root> rm -R /archive
The "-R" flag tells the command to recurse through subdirectories.
The "mv" command is used to move or rename files and directories.
root> mv [from] [to]
root> mv my.log my1.log
root> mv * /archive
root> mv /archive/* .
The "." represents the current directory.
The "cp" command is used to copy files and directories.
root> cp [from] [to]
root> cp my.log my1.log
root> cp * /archive
root> cp /archive/* .
The "mkdir" command is used to create new directories.
root> mkdir archive
The "rmdir" command is used to delete directories.
root> rmdir archive
The "find" command can be used to find the location of specific files.
root> find / -name dbmspool.sql
root> find / -print | grep -i dbmspool.sql
The "/" flag represents the staring directory for the search. Wildcards such as "dbms*" can be used for the filename.
The "which" command can be used to find the location of an executable you are using.
oracle> which sqlplus
The "which" command searches your PATH setting for occurrences of the specified executable.

File Permissions

See Linux Files, Directories and Permissions.
The "umask" command can be used to read or set default file permissions for the current user.
root> umask 022
The umask value is subtracted from the default permissions (666) to give the final permission.
666 : Default permission
022 : - umask value
644 : final permission
The "chmod" command is used to alter file permissions after the file has been created.
root> chmod 777 *.log

Owner      Group      World      Permission
=========  =========  =========  ======================
7 (u+rwx)  7 (g+rwx)  7 (o+rwx)  read + write + execute
6 (u+wx)   6 (g+wx)   6 (o+wx)   write + execute
5 (u+Rx)   5 (g+Rx)   5 (o+Rx)   read + execute
4 (u+r)    4 (g+r)    4 (o+r)    read only
2 (u+w)    2 (g+w)    2 (o+w)    write only
1 (u+x)    1 (g+x)    1 (o+x)    execute only
Character eqivalents can be used in the chmod command.
root> chmod o+rwx *.log
root> chmod g+r   *.log
root> chmod -Rx   *.log
The "chown" command is used to reset the ownership of files after creation.
root> chown -R oinstall.dba *
The "-R" flag causes the command ro recurse through any subdirectories.

OS Users Management

See Linux Groups and Users.
The "useradd" command is used to add OS users.
root> useradd -G oinstall -g dba -d /usr/users/my_user -m -s /bin/ksh my_user
  • The "-G" flag specifies the primary group.
  • The "-g" flag specifies the secondary group.
  • The "-d" flag specifies the default directory.
  • The "-m" flag creates the default directory.
  • The "-s" flag specifies the default shell.
The "usermod" command is used to modify the user settings after a user has been created.
root> usermod -s /bin/csh my_user
The "userdel" command is used to delete existing users.
root> userdel -r my_user
The "-r" flag removes the default directory.
The "passwd" command is used to set, or reset, the users login password.
root> passwd my_user
The "who" command can be used to list all users who have OS connections.
root> who
root> who | head -5
root> who | tail -5
root> who | grep -i ora
root> who | wc -l
  • The "head -5" command restricts the output to the first 5 lines of the who command.
  • The "tail -5" command restricts the output to the last 5 lines of the who command.
  • The "grep -i ora" command restricts the output to lines containing "ora".
  • The "wc -l" command returns the number of lines from "who", and hence the number of connected users.

Process Management

See Linux Process Management (ps, top, renice, kill).
The "ps" command lists current process information.
# ps
# ps -ef | grep -i ora
# ps -ef | grep -i ora | grep -v grep
# ps -ef | grep -i [o]ra
Specific processes can be killed by specifying the process id in the kill command.
# kill 12345
# kill -9 12345
You can kill multiple processes using a single command by combining "kill" with the "ps" and "awk" commands.
# kill -9 `ps -ef | grep ora | awk '{print $2}'`

uname and hostname

The "uname" and "hostname" commands can be used to get information about the host.
root> uname -a
OSF1 oradb01.lynx.co.uk V5.1 2650 alpha

root> uname -a | awk '{ print $2 }'
oradb01.lynx.co.uk

root> hostname
oradb01.lynx.co.uk

Error Lines in Files

You can return the error lines in a file using.
root> cat alert_LIN1.log | grep -i ORA-
The "grep -i ORA-" command limits the output to lines containing "ORA-". The "-i" flag makes the comparison case insensitive. A count of the error lines can be returned using the "wc" command. This normally give a word count, but the "-l" flag alteres it to give a line count.
root> cat alert_LIN1.log | grep -i ORA- | wc -l

Remove Old Files

The find command can be used to supply a list of files to the rm command or the "-delete" command can be used directly.
find /backup/logs/ -name daily_backup* -mtime +21 -exec rm -f {} ;

find /backup/logs/daily_backup* -mtime +5 -exec rm -f {} \;

find /backup/logs/daily_backup* -mtime +5 -delete;

File Exists Check

The Bash shell allows you to check for the presence of a file using the "[ -e filepath ]" comparison. In the following script a backup log is renamed if it is present and files older than 30 days are deleted are deleted.
#!/bin/bash
if [ -e /tmp/backup.log ]; then
  DATE_SUFFIX=`date +"%Y"-"%m"-"%d"`
  mv /tmp/backup.log /tmp/backup-$DATE_SUFFIX.log
fi

# Delete old log files.
find /tmp/backup*.log -mtime +30 -delete;
This is one example of a log rotation, where the most current log doesn't include the date in it's name.

Rotate Log Files

See the previous section for another variant on log rotation.
The following script provides an example of how to manage a log rotation using the Bash shell. The log file includes the date in the file name. Files older than 30 days are deleted.
#!/bin/bash
DATE_SUFFIX=`date +"%Y"-"%m"-"%d"`
LOG_FILE=/tmp/backup-$DATE_SUFFIX.log

# Do something that needs logging.
echo "Send this to log" >> $LOG_FILE 2>&1

# Delete old log files.
find /tmp/backup*.log -mtime +30 -delete;

Perform Action for Every File in a Directory

The following scripts shows two methods for performing an action for each file in a directory.
#!/bin/bash
for FILE in `ls /tmp/`; do
  # Do something with the file name.
  echo $FILE;
done

# Or this.

for FILE in $( ls /tmp/ ); do
  echo $FILE
done

Perform Action for Every Line in a File

The following scripts shows a method for performing an action for each line in a file.
#!/bin/bash
while read LINE; do
  # Do something with the line.
  echo $LINE;
done < /tmp/myfile.txt

alias

An alias is a named shortcut for a longer command using the following format.
alias name='command'
For example, if you require sudo access for a specific command, you might want to include this as an alias so you don't have to remember to type it.
alias myscript='sudo -u oracle /path/to/myscript'

Remove DOS CR/LFs (^M)

Remove DOS style CR/LF characters (^M) from UNIX files using.
sed -e 's/^M$//' filename > tempfile
The newly created tempfile should have the ^M character removed.
Where available, it is probably better to use the dos2unix and unix2dos commands.

Run Commands As Oracle User From Root

The following scripts shows how a number of commands can be run as the "oracle" user the "root" user.
#!/bin/ksh
su - oracle <<EOF
ORACLE_SID=LIN1; export ORACLE_SID
rman catalog=rman/rman@w2k1 target=/ cmdfile=my_cmdfile log=my_logfile append 
EOF
This is often necessary where CRON jobs are run from the root user rather than the oracle user.

Compress Files

See Linux Archive Tools (tar, star, gzip, bzip2, zip, cpio).
In order to save space on the filesystem you may wish to compress files such as archived redo logs. This can be using either the gzip or the compress commands. The gzip command results in a compressed copy of the original file with a ".gz" extension. The gunzip command reverses this process.
gzip myfile
gunzip myfile.gz
The compress command results in a compressed copy of the original file with a ".Z" extension. The uncompress command reverses this process.
compress myfile
uncompress myfile

General Performance

vmstat

Reports virtual memory statistics.
# vmstat 5 3
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 1060608  24372 739080    0    0  1334    63 1018 1571 14 11 66 10  0
 0  0      0 995244  24392 799656    0    0  6302   160 1221 1962 10 10 62 18  0
 0  0      0 992376  24400 799784    0    0     1    28  992 1886  3  2 95  0  0
#
See the vmstat man page.

free

Reports the current memory usage. The "-/+ buffers/cache:" line represents the true used and free memory, ignoring the Linux file system cache.
# free
             total       used       free     shared    buffers     cached
Mem:       8178884    4669760    3509124          0     324056    1717756
-/+ buffers/cache:    2627948    5550936
Swap:     10289148          0   10289148
#

iostat

Reports I/O statistics.
# iostat
Linux 3.2.10-3.fc16.x86_64 (maggie.localdomain)  03/19/2012  _x86_64_(4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.02    0.23    0.51    0.78    0.00   96.46

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               9.23       100.55        62.99    1796672    1125538
dm-0             13.60       100.31        62.99    1792386    1125524
dm-1              0.02         0.08         0.00       1432          0

#

CPU Usage

See Linux Process Management (ps, top, renice, kill).

sar

On Linux systems sar (System Activity Reporter) is probably one of the simplest and most versatile tools for reporting system utilization including CPU, memory, disk and network activity. It automatically collects system activity statistics when installed using the following command.
# yum install sysstat
The sar command syntax takes the following form.
# sar [options] [interval [count]]
The "options" parameters determine what is reported, which will be discussed later. The "interval" parameter indicates the time interval in seconds between samples. The "count" parameter indicates the number of samples that will be taken before the command ends. If "count" is omitted, the sampling will continue indefinitely. If both "interval" and "count" are omitted, the command will report the values from the 10 minute samples taken since the machine was last restarted.
As seen in the sar man page, there are lots of available options, but some starting points you may find interesting include:
  • CPU:
    • Basic CPU: sar [-u] [interval [count]]
    • Load Average: sar -q [interval [count]]
  • Memory:
    • Kernel Paging: sar -B [interval [count]]
    • Unused Memory: sar -r [interval [count]]
    • Swap Space: sar -S [interval [count]]
  • Disk:
    • Average Disk I/O: sar -b [interval [count]]
    • Disk I/O: sar -dp [interval [count]]
  • Network:
    • Network: sar -n DEV [interval [count]]
    • Network Errors: sar -n EDEV [interval [count]]
Here is an example of the output from a CPU report.
# sar -u 1 5
Linux 2.6.32-100.0.19.el5 (ol5-112.localdomain)  06/27/2011

03:10:07 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle
03:10:08 PM     all      0.00      1.01     23.23     75.76      0.00      0.00
03:10:09 PM     all      0.00      1.02     35.71     63.27      0.00      0.00
03:10:10 PM     all      0.98      3.92     35.29     59.80      0.00      0.00
03:10:11 PM     all      0.00      1.03     29.90     69.07      0.00      0.00
03:10:12 PM     all      0.00      2.00     35.00     63.00      0.00      0.00
Average:        all      0.20      1.81     31.85     66.13      0.00      0.00
#

mpstat

Reports processor related statistics.
# mpstat 10 2
Linux 2.6.32-100.0.19.el5 (ol5-112.localdomain)  06/27/2011

01:59:57 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
02:00:07 PM  all    1.21    0.00    0.90    0.20    0.00    0.00    0.00   97.69    980.50
02:00:17 PM  all    0.70    0.00    0.40    0.00    0.00    0.10    0.00   98.79    973.77
Average:     all    0.95    0.00    0.65    0.10    0.00    0.05    0.00   98.24    977.14
#
See the mpstat man page.

top

Displays top tasks.
# top
top - 13:58:17 up 2 min,  1 user,  load average: 2.54, 1.11, 0.41
Tasks: 160 total,   6 running, 154 sleeping,   0 stopped,   0 zombie
Cpu(s): 77.1%us, 22.6%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.3%hi,  0.0%si,  0.0%st
Mem:   2058872k total,   879072k used,  1179800k free,    23580k buffers
Swap:  4095992k total,        0k used,  4095992k free,   620116k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2882 oracle    20   0  610m  64m  56m R 24.9  3.2   0:02.20 oracle
 2927 root      20   0 90328 3832 2604 R 24.6  0.2   0:00.89 Xorg
 2931 oracle    20   0  605m  34m  31m R 11.5  1.7   0:00.35 oracle
 2933 oracle    20   0  605m  34m  30m S  9.8  1.7   0:00.30 oracle
 2888 oracle    20   0  614m  52m  40m S  6.9  2.6   0:00.78 oracle
 2935 oracle    20   0  604m  22m  20m S  6.2  1.1   0:00.19 oracle
 2937 oracle    20   0  604m  19m  17m R  4.6  1.0   0:00.14 oracle
 2688 oracle    -2   0  603m  15m  13m S  4.3  0.8   0:01.08 oracle
 2685 oracle    20   0  603m  15m  13m S  0.7  0.8   0:00.22 oracle
 2939 oracle    20   0  217m 4084 3504 R  0.7  0.2   0:00.02 oracle
 2698 oracle    20   0  604m  18m  16m S  0.3  0.9   0:00.17 oracle
 2702 oracle    20   0  609m  22m  14m S  0.3  1.1   0:00.17 oracle
 2704 oracle    20   0  618m  21m  19m S  0.3  1.1   0:00.21 oracle
 2714 oracle    20   0  603m  20m  18m S  0.3  1.0   0:00.18 oracle
    1 root      20   0 10364  704  588 S  0.0  0.0   0:00.36 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    4 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
    5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    6 root      20   0     0    0    0 S  0.0  0.0   0:00.03 events/0
    7 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cpuset
    8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper
    9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns
#
The PID column can then be matched with the SPID column on the V$PROCESS view to provide more information on the process.
SELECT a.username, 
       a.osuser, 
       a.program, 
       spid, 
       sid, 
       a.serial#
FROM   v$session a,
       v$process b
WHERE  a.paddr = b.addr
AND    spid = '&pid';
See the top man page.

Hide Passwords

You may be required to use passwords in scripts calling Oracle tools, like SQL*Plus, Export/Import and RMAN etc. One method to remove the credentials from the script itself is to create a credentials file to hold them. In this case I'm using "/home/oracle/.scottcred", which contains the following.
scott/tiger
Change the permissions to make sure the file is only visible to the owner.
$ chmod 600 /home/oracle/.scottcred
Now replace references to the credentials with the contents of the file.
$ expdp < /home/oracle/.scottcred schemas=SCOTT directory=DATA_PUMP_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
Alternatively, consider using one of the following:

Automatic Startup Scripts on Linux

This text has been replaced by a separate article here.

CRON

See CRON : Scheduling Tasks on Linux.
There are two methods of editing the crontab file. First you can use the "crontab -l > filename" option to list the contents and pipe this to a file. Once you've editied the file you can then apply it using the "crontab filename".
  • Login as root
  • crontab -l > newcron
  • Edit newcron file.
  • crontab newcron
Alternatively you can use the "crontab -e" option to edit the crontab file directly.
The entries have the following elements.
field          allowed values
-----          --------------
minute         0-59
hour           0-23
day of month   1-31
month          1-12
day of week    0-7 (both 0 and 7 are Sunday)
user           Valid OS user
command        Valid command or script.
The first 5 fields can be specified using the following rules.
*       - All available values or "first-last".
3-4     - A single range representing each possible from the start to the end of the range inclusive.
1,2,5,6 - A specific list of values.
1-3,5-8 - A specific list of ranges.
0-23/2  - Every other value in the specified range.
The following entry runs a cleanup script a 01:00 each Sunday. Any output or errors from the script are piped to /dev/null to prevent a buildup of mails to root.
0 1 * * 0 /u01/app/oracle/dba/weekly_cleanup > /dev/null 2>&1

Cluster Wide CRON Jobs On Tru64

On clustered systems cron is node-specific. If you need a job to fire once per cluster, rather than once per node you need an alternative approach to the standard cron job. One approach is put forward in the HP best practices document (Using cron in a TruCluster Server Cluster), but in my opinion a more elegant solution is proposed by Jason Orendorf of HP Tru64 Unix Enterprise Team (TruCluster Clustercron).
In his solution Jason creates a file called /bin/cronrun with the following contents.
#!/bin/ksh
set -- $(/usr/sbin/cfsmgr -F raw /)
shift 12
[[ "$1" = "$(/bin/hostname -s)" ]] && exit 0
exit 1
This script returns TRUE (0) only on the node which is the CFS serving cluster_root.
All cluster wide jobs should have a crontab entry on each node of the cluster like.
5 * * * /bin/cronrun && /usr/local/bin/myjob
Although the cron jobs fire on all nodes, the "/bin/cronrun &&" part of the entry prevents the script from running on all nodes except the current CFS serving cluster_root.

NFS Mount (Sun)

The following deamons must be running for the share to be seen by a PC.
  • /usr/lib/nfs/nfsd -a
  • /usr/lib/nfs/mountd
  • /opt/SUNWpcnfs/sbin/rpc.pcnfsd
To see a list of the nfs mounted drives already present type.
exportfs
First the mount point must be shared so it can be seen by remote machines.
share -F nfs -o ro /cdrom
Next the share can be mounted on a remote machine by root using.
mkdir /cdrom#1
mount -o ro myhost:/cdrom /cdrom#1

NFS Mount (Tru64)

On the server machine, if NFS is not currently setup do the following.
  • Application Manager -> System Admin -> Configuration -> NFS
  • Select the "Configure system as an NFS server" option.
  • Accept all defaults.
Create mount point directory.
mkdir /u04/backup
Append the following entry to the "/etc/exports" file.
/u04/backup
Make sure the correct permissions are granted on the directory.
chmod -R 777 /u04/backup
On the client machine, if NFS is not currently setup do the following.
  • Application Manager -> System Admin -> Configuration -> NFS
  • Select the "Configure system as an NFS client" option.
  • Accept all defaults.
Create mount point directory.
mkdir /backup
Append an following entry to the "/etc/fstab" file.
nfs-server-name:/u04/backup     /backup         nfs rw,bg,intr 0 0
Finally, mount the fileset.
mount /backup
At this point you can start to use the mount point from your client machine. Thanks to Bryan Mills for his help with Tru64.

Samba/CIFS Mount (Linux)

See Linux Samba Configuration.
Create a directory to use for the mount point.
# mkdir /host
Add the following line to the "/etc/fstab" file.
//192.168.0.4/public /host   cifs rw,credentials=/root/.smbcred,uid=500,guid=500 0 0
Create a file called "/root/.smbcred" with the following contents.
username=myuser
password=mypassword
Change the permissions on the credentials file.
# chmod 600 /root/.smbcred
Mount the share.
# mount /host

PC XStation Configuration

Download the CygWin setup.exe from http://www.cygwin.com.
Install, making sure to select all the X11R6 (or XFree86 in older versions) optional packages.
If you need root access add the following entry into the /etc/securettys file on each server.
<client-name>:0
From the command promot on the PC do the following.
set PATH=PATH;c:cygwinbin;c:cygwinusrX11R6bin
XWin.exe :0 -query <server-name>
The X environment should start in a new window.
Many Linux distributions do not start XDMCP by default. To allow XDMCP access from Cygwin edit the "/etc/X11/gdm/gdm.conf" file. Under the "[xdmcp]" section set "Enable=true".
If you are starting any X applications during the session you will need to set the DISPLAY environment variable. Remember, you are acting as an XStation, not the server itself, so this variable must be set as follows.
DISPLAY=<client-name>:0.0; export DISPLAY

xauth (Magic Cookie)

Access to X servers can get broken when using su and sudo commands. The xauth command provides a solution to this. The process involves the following stages:
  • Check your current display number.
  • Use xauth list to get a list of magic cookies.
  • Switch to the new user.
  • Use xauth add to set the magic cookie for your display number.
An example of this is shown below.
$ echo $DISPLAY
localhost:12.0
$ xauth list
ol6.localdomain/unix:12  MIT-MAGIC-COOKIE-1  be64852468ca3c334720b10bb3c4d3cb
$ sudo su oracle
$ xauth add ol6.localdomain/unix:12  MIT-MAGIC-COOKIE-1  be64852468ca3c334720b10bb3c4d3cb
You will now be able to access the X server, just as you could before the user switch.

Useful Profile Settings

See Linux Groups and Users : Important Files.
The following ".profile" settings rely on the default shell for the user being set to the Korn shell (/bin/ksh).
The backspace key can be configured by adding the following entry.
stty erase "^H"
The command line history can be accessed using the [Esc][k] by adding the following entry.
set -o vi
Auto completion of paths using a double strike of the [Esc] key can be configured by adding the following entry.
set filec

Useful Files

Here are some files that may be of use.
Path Contents
/etc/passwd User settings
/etc/group Group settings for users.
/etc/hosts Hostname lookup information.
/etc/system Kernel parameters for Solaris.
/etc/sysconfigtab Kernel parameters for Tru64.
/etc/sysctl.conf Kernel parameters for Linux.

Step by step Oracle Apps R12.1.3 Rapid Cloning


Step by step Oracle Apps R12.1.3 Rapid Cloning
Prerequisite Steps

1. If your target server holds at least one Oracle Apps R12.1.3 instance, you can skip for any OS patch or software requirement section. As the server is running a Oracle Apps instance, we can assume the server has all the

mandatory OS patch and required software. Else look into the metalink for platform specific requirements.

2. Apply Latest AD patch
Check whether AD patch version is atleast R12.AD.B.3. You can check that using following query.
SELECTpatch_levelFROMfnd_product_installationsWHEREpatch_levelLIKE'R12.AD%'
If it is below that level apply patch 9239089.

3. Apply the latest AutoConfig template patch
Update the Oracle Applications file system with the AutoConfig files by applying the latest AutoConfig Template patch (Patch 9386653 for 12.0.X customers and Patch 8919489 for 12.1.X customers) to all application tier nodes in the Applications instance. You can check whether this patch is already there or not in your system by the following sql.
SELECT * FROMad_applied_patchesWHEREpatch_name = '8919489'

4. Apply the latest Rapid Clone patches
For Release 12.1 apply following patches.
9171651:R12.OAM.B 12.1 RAPIDCLONE CONSOLIDATED FIXES JUL/2010
9833058:R12.OAM.B HOT CLONE FAILS WITH ORA-00201 DURING RECOVERY MANAGER 
12404574:R12.OAM.B ORACLE_HOME REGISTRATION DOES NOT HAPPEN WITH CENTRAL INVENTORY ON LOZ 
12598630:R12.OAM.B R12.1 ONE-OFF FOR S_DB_LISTENER BUG 12362010

5. Run AutoConfig on the application tiers
Follow the steps under section " RunAutoConfig on the Application Tiers " in My Oracle Support Knowledge Document 387859.1 to run AutoConfig on all application tier nodes.

6. Synchronize appsutil on the database tier nodes
Follow the steps under section "Copy AutoConfig to the RDBMS ORACLE_HOME" in My Oracle Support Knowledge Document 387859.1 to copy AutoConfig and Rapid Clone files to each database node via the admkappsutil.pl utility.

7. Run AutoConfig on the database tier
Follow the steps under section "Run AutoConfig on the Database Tier" in My Oracle Support Knowledge Document 387859.1 to run AutoConfig on the database tier nodes.

8. Maintain Snapshot Information
Log in to each application tier node as the APPLMGR user, and run "Maintain Snapshot Information" in AD Administration. To update the snapshot, please select the following options "Update Current View Snapshot" and "Update Complete APPL_TOP".


Cloning Steps

9. Prepare the source system
Execute the following commands to prepare the source system for cloning.

Prepare the source system database tier for cloning
Log on to the source system as the ORACLE user, and run the following commands.

$ cd [RDBMS ORACLE_HOME]/appsutil/scripts/[CONTEXT_NAME]
$ perl adpreclone.pl dbTier b.

Prepare the source system application tier for cloning
Log on to the source system as the APPLMGR user, and run the following commands on each node that contains an APPL_TOP:

$ cd [INST_TOP]/admin/scripts
$ perl adpreclone.pl appsTier

10. Shutdown the source system. Copy full directory "apps" and "db" from source system to target system. Use the following command for copy.
$ cp -RH


11. Configure the target system
Run the following commands to configure the target system. You will be prompted for specific target system values such as SID, paths, and ports.

a.Configure the target system database server
Log on to the target system as the ORACLE user and enter the following commands.

$ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbTierb.Configure the target system application tier server nodes

Log on to the target system as the APPLMGR user and enter the following commands:
$ cd [COMMON_TOP]/clone/bin
$ perl adcfgclone.pl appsTier



Regards
Goraknath Shivram Rathod

Oracle Application Interview Quetions


           All Application & Database
Oracle Application DBA Interview Questions for R12 and 11i

Oracle Application DBA Interview Questions for R12 and 11i

1Q)What is your day to day activity as an Apps DBA?
Ans:
As an Apps DBA we monitor the system for different alerts (Entreprise Manager or third party tools used for configuring the Alerts) Tablespace Issues, CPU consuption
Database blocking sessions..etc
Regular maintanance activies like cloning,patching,custom code migrations (provided by developers)
Working with user isses.

2Q)How often Do you patch?
Ans: Usually for non-production the patching request comes aroung weekly 4-6 and the same patches will be applied to Production in the outage or maintanance window.
Production has weekly maintance window (Eg Sat 6PM to 9PM) where all the changes (patches) will applied on production.

3Q)How often Do you clone?
Ans: Cloning happens biweekly or monthly depending on the organization requierement.

4Q)What change control/management or CCB?
Ans: Every organization has change control process, Change control process is no change goes into production witout proir testing on non-production instance.
Eg: If a user encouters an issue in production instance and the fix for the issue is known, Still the fix should not be applied directly on production, as it is not tested.
The same fix need to be first applied on a non-prod instance where the similar issue is happening and test the issue and instance stability.
Once user is happy with the results the change or fix will be implemented to production with the approval from Change control Board, CCB is a managemant team who reviews all the changes being deployed to production,
Depending on the need and criticality and testing results they approve the change movement to production instance.

5Q)How much time does it take to upgrade, clone ?
Ans: Clone usually takes around 48hrs to copy and configure and upgrade depends on the database size and module involved.
upgrade from 11.5.9 to 11.5.10.2 will take around 3-4 days and 11i to R12 upgrade will take around 4-5 days.

6Q)What is the meaning QA,CRP,SIT,DEV,UAT,PRE-PROD,PROD Instance?
QA - Tesing Instance
CRP - Conference Room Pilot
SIT - System Integration Testing
DEV - Developement
UAT- User Acceptence Testing
STAGE - Pre-production Instance
Prod - Production/actuall instance where the business is running

7Q)What do we have in FND_NODES?
Ans:
FND_NODES table contains  information about node_names and services enabled on a node.
In multinode instance if you want to know which node is running what services, You can query the fnd_nodes and get that information.

8Q)when do we run FND_CONC_CLONE.SETUP_CLEAN ?
Ans:
FND_NODES table contains node information, If you have cloned test instance from production still the node information of production will be present after clone in the test instance.
we use FND_CONC_CLONE.SETUP_CLEAN to cleanup FND_NODES table in the target to clear source node information as part of cloning.
Below syntax to execute:
SQL> sho user
USER is "APPS"
SQL> EXEC FND_CONC_CLONE.SETUP_CLEAN;
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.

This will delete all the entries in the fnd_nodes table, to populate it with target system node information, Run autoconfig on DB node and Applications node.

9Q)How verify the sysadmin password from command line?
Ans:
This utility can be used to verify the GUEST/ORACLE password
SQL>select fnd_web_sec.validate_login('SYSADMIN','<sysadmin_password>')from dual;
If it returns Y then sysadmin password is correct
If it returns N then sysadmin password that we are using
Eg:
SQL> select fnd_web_sec.validate_login('SYSADMIN','SYSADMIN123') from dual;
FND_WEB_SEC.VALIDATE_LOGIN('SYSADMIN','SYSADMIN123')
--------------------------------------------------------------------------------
N
SQL> select fnd_web_sec.validate_login('SYSADMIN','SYSADMIN') from dual;
FND_WEB_SEC.VALIDATE_LOGIN('SYSADMIN','SYSADMIN')
--------------------------------------------------------------------------------
Y

10Q)List out few Apps related tables ?
Ans:
CONCURRENT REQUEST/PROGRAM/MANAGERS
-------------------
FND_CONCURRENT_QUEUES
FND_CONCURRENT_PROGRAMS
FND_CONCURRENT_REQUESTS
FND_CONCURRENT_PROCESSES
FND_CONCURRENT_QUEUE_SIZE

FND/AOL Tables
--------------
FND_APPL_TOPS
FND_LOGINS
FND_USER
FND_DM_NODES
FND_TNS_ALIASES
FND_NODES
FND_RESPONSIBILITY
FND_DATABASES
FND_UNSUCCESSFUL_LOGINS
FND_LANGUAGES
FND_APPLICATION
FND_PROFILE_OPTION_VALUES

AD/Patches
-------------
AD_APPLIED_PATCHES
AD_PATCH_DRIVERS
AD_BUGS
AD_INSTALL_PROCESSES
AD_SESSIONS
AD_APPL_TOPS

11Q) How To find the latest application version
select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE updated,ROW_SOURCE_COMMENTS "how it is done",BASE_RELEASE_FLAG "Base version" FROM AD_RELEASES where END_DATE_ACTIVE IS NULL

12Q) How to find out if any patch except localisation patch is applied or not, if applied, that what all drivers it contain and time of it's application
select A.APPLIED_PATCH_ID, A.PATCH_NAME, A.PATCH_TYPE, B.PATCH_DRVIER_ID, B.DRIVER_FILE_NAME, B.ORIG_PATCH_NAME, B.CREATION_DATE, B.PLATFORM, B.SOURCE_CODE, B.CREATIONG_DATE, B.FILE_SIZE, B.MERGED_DRIVER_FLAG, B.MERGE_DATE from AD_APPLIED_PATCHES A, AD_PATCH_DRIVERS B where A.APPLIED_PATCH_ID = B.APPLIED_PATCH_ID and A.PATCH_NAME = ''

13Q) How to know that if the patch is applied successfully, applied on both node or not, start time of patch application and end time of patch application, patch top location , session id ... patch run id */
select D.PATCH_NAME, B.APPLICATIONS_SYSTEM_NAME, B.INSTANCE_NAME, B.NAME, C.DRIVER_FILE_NAME, A.PATCH_DRIVER_ID, A.PATCH_RUN_ID, A.SESSION_ID, A.PATCH_TOP, A.START_DATE, A.END_DATE, A.SUCCESS_FLAG, A.FAILURE_COMMENTS from AD_PATCH_RUNS A, AD_APPL_TOPS B, AD_PATCH_DRVIERS C, AD_APPLIED_PATCHES D where A.APPL_TOP_ID = B.APPL_TOP_ID AND A.PATCH_DRIVER_ID = C.PATCH_DRIVER_ID and C.APPLIED_PATCH_ID = D.APPLIED_PATCH_ID and A.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = '')) ORDER BY 3;

14Q) Howto find the base application version
select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES where BASE_RELEASE_FLAG = 'Y'

15Q) How To find all available application version
select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, END_DATE_ACTIVE "when lasted", CASE WHEN BASE_RELEASE_FLAG = 'Y' Then 'BASE VERSION' ELSE 'Upgrade' END "BASE/UPGRADE", ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES

16Q) How To get file version of any application file which is changed through patch application
select A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME, max(B.VERSION) from AD_FILES A, AD_FILE_VERSIONS B where A.FILE_ID = B.FILE_ID and B.FILE_ID = 86291 group by A.FILE_ID, A.APP_SHORT_NAME, A.SUBDIR, A.FILENAME

17Q) How To get information related to how many time driver file is applied for bugs
select * from AD_PATCH_RUN_BUGS where BUG_ID in (select BUG_ID from AD_BUGS where BUG_NUMBER = ''

18Q) How To find latest patchset level for module installed
select APP_SHORT_NAME, max(PATCH_LEVEL) from AD_PATCH_DRIVER_MINIPKS GROUP BY APP_SHORT_NAME

19Q) How To find what is being done by the patch
select A.BUG_NUMBER "Patch Number", B. PATCh_RUN_BUG_ID "Run Id",D.APP_SHORT_NAME appl_top, D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B, AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F where A.BUG_ID = B.BUG_ID and B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACTION_ID = C.COMMON_ACTION_ID and D.FILE_ID = F.FILE_ID and A.BUG_NUMBER = '' and B.PATCH_RUN_BUG_ID = ' < > ' and C.EXECUTED_FLAG = 'Y' GROUP BY A.BUG_NUMBER, B.PATCH_RUN_BUG_ID, D. APP_SHORT_NAME, D>SUBDIR, D.FILENAME, E.ACTION_CODE

20Q) How To find Merged patch Information from database in Oracle Applications
select bug_number from ad_bugs where bug_id in ( select bug_id from ad_comprising_patches where patch_driver_id =(select patch_driver_id from ad_patch_drivers where applied_patch_id =&n) );

21Q) How toto know, what all has been done during application of PATCH
Select J.PATCh_NAME, H.APPLICATIONS_SYSTEM_NAME Instance_Name, H.NAME, I.DRIVER_FILE_NAME, D.APP_SHORT_NAME appl_top,D.SUBDIR, D.FILENAME, max(F.VERSION) latest, E.ACTION_CODE action from AD_BUGS A, AD_PATCH_RUN_BUGS B,AD_PATCH_RUN_BUG_ACTIONS C, AD_FILES D, AD_PATCH_COMMON_ACTIONS E, AD_FILE_VERSIONS F, AD_PATCH_RUNS G,
AD_APPL_TOPS H, AD_PATCH_DRIVERS I, AD_APPLIED_PATCHES J where A.BUG_ID = B.BUG_ID and
B.PATCH_RUN_BUG_ID = C.PATCH_RUN_BUG_ID and C.FILE_ID = D.FILE_ID and E.COMMON_ACTION_ID = C.COMMON_ACTION_ID
and D.FILE_ID = F.FILE_ID and G.APPL_TOP_ID = H.APPL_TOP_ID and G.PATCH_DRIVER_ID = I.PATCH_DRIVER_ID and
I.APPLIED_PATCH_ID = J.APPLIED_PATCH_ID and B.PATCH_RUN_ID = G.PATCH_RUN_ID and C.EXECUTED_FLAG = 'Y' and
G.PATCH_DRIVER_ID in (select PATCH_DRIVER_ID from AD_PATCH_DRIVERS where APPLIED_PATCH_ID
in (select APPLIED_PATCH_ID from AD_APPLIED_PATCHES where PATCH_NAME = 'merged'))
GROUP BY J.PATCH_NAME, H.APPLICATIONS_SYSTEM_NAME, H.NAME, I.DRIVER_FILE_NAME, D.APP_SHORT_NAME, D.SUBDIR,
D.FILENAME, E.ACTION_CODE

22Q) How to find out Patch level of mini Pack
Select product_version,patch_level from FND_PROUDCT_INSTALLATIONS where patch_level like '%&shortname%';
Replace short name by name of Oracle Apps Minipack for which you want to find out Patch level . ex.
AD - for Applications DBA
GL - for General Ledger
PO - Purchase Order

23Q)List out Profile Options Useful for Oracle Apps DBA?
Here is the list of few profile options which Apps DBA use frequently.
**It is not necessary that you as Apps DBA must know all profile options**
Applications Help Web Agent
Applications Servlet Agent
Applications Web Agent
Concurrent: Active Request Limit
Concurrent: Hold Requests
Concurrent: Multiple Time Zones
Concurrent: Report Access Level
Concurrent: Report Copies
Concurrent: Request priority
Database Instance
Enable Security Group
FND: Debug Log Filename
FND: Debug Log Level
Forms Runtime Parameters
Gateway User ID
ICX: Discoverer Launcher
ICX: Forms Launcher
ICX: Report Launcher
ICX: Limit Connect
ICX: Limit time
ICX: Session Timeout
MO Operating Unit
Node Trust Level
RRA: Delete Temporary Files
RRA: Enabled
RRA: Service Prefix
RRA: Maximum Transfer Size
Self Service Personal Home Page Mode
Sign-On: Audit Level
Signon Password Failure Limit
Signon Password Hard to Guess
Signon Password Length
Signon Password No Reuse
Site Name
Socket Listener Port
TCF: Host
TCF: Port
TWO TASK
Viewer: Text


24Q)I am applying a patch , can I open another session and run adadmin ?
Ans:
Yes, unless you are running a process where workers are involved

25Q)I am applying a patch , can I open another session in another node and run adpatch?
Ans:
No

11i apps QA PART 1
 1. How to determine Oracle Apps 11i Version ?
Ans : select RELEASE_NAME from fnd_product_groups;
You should see output like
RELEASE_NAME-----------------------11.5.10.2
2. How to find Database version ?
Ans :
SQL> select * from v$version;
The command returns the release information, such as the following:Oracle9i Enterprise Edition Release 9.2.0.7.0 - ProductionPL/SQL Release 9.2.0.7.0 - ProductionCORE 9.2.0.7.0 ProductionTNS for 32-bit Windows: Version 9.2.0.7.0 - ProductionNLSRTL Version 9.2.0.7.0 - Production
3. How to find opatch Version ?
Ans : opatch is utility to apply database patch , In order to find opatch version execute"$ORACLE_HOME/OPatch/opatch version"
4. How to find out invalid objects in the database
Ans : select count(*) from dba_objects where status ='INVALID'
5. How you will see hidden files in linux/solaris?
Ans : ls -la
6. How to find that the database is 64-bit/32-bit?
Ans : $RDBMS_ORACLE_HOME/bin/file oracle
7. What is top command?
Ans : top is a operating system command, it will display top 10 processes which are taking high cpu and memory. 8. What is a patch?Ans : A patch can be a solution for a bug/it can be a new feature.

9. What are the different types of patches?
Ans : oneoff, mini packs, family packs, maintanance packs, rollup pathches, colsolidated patches.
8. What is a oneoff patch?
Ans : An oneoff patch is a small patch of (20-90K size) without any pre-req’s
9. What is a mini pack ?
Ans : A mini pack is one which will upgrade any product patchset level to next level like AD.H to AD.I
10. What is Family pack ?
Ans : A Family pack is one which will upgade the patchset level of all the products in that family to perticular patchsetlevel.
11. What is Maintanance pack ?
Ans : A maintanance pack will upgrade applications from one version to another like 11.5.8 to 11.5.9
12. What is a Rollup patch?
Ans : A rollup patch is one which will deliver bug fixes identified after the release of any major application versions like 11.5.8/11.5.9
13. What is consilidated patch?
Ans: Consolidated patches will come into pictures after upgrades from one version of applications to anoter, all post upgrade patches will a consolidated and given as consolidated patch.
14. How u will find whether a patch is applied/not?
Ans : Query ad_bugs.

15. What is the other table where u can query what are the patches applied?
Ans : Ad_applied_patches
16. What is the difference between ad_bugs and ad_applied_patches?
Ans: A patch can deliver solution for more than one bug, so ad_applied_patches may not give u the perfect information as in case of ad_bugs.
17. How u apply a patch?
Ans : adpatch

18. What inputs you need to apply a patch other than driver name and etc?
Ans : apps and system passwords

19. What are the table u r adpatch will create and when?
Ans : Adpatch will create FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS table when it will apply d,g and u drivers
20. What is the significance of FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS table?
Ans: FND_INSTALL_PROCESSES table will store the worker information like what job is assigned to which worker and its status. AD_DEFERRED_JOBS will come into picture when some worker is failed, it will be moved to AD_DEFERRED_JOBS table, from where again adpatch will take that job and try to resign, after doing this 3 times if still that worker is failing, then adpatch will stop patching and throw the error that perticular worker has failed. We need to trouble shoot and restrart the worker.
21. If it is a multinode installation which driver we need to apply on which node?
Ans: c,d,g on concurrent node and c, g on web node. If it is u-driver we need to apply on all nodes.
22.While applying a application patch is that necessary that u r database and listener should be up?
Ans: Yes . why because adpatch will connect to database and update so many tables etc…..
23. While applying a patch if that patch is failing because of a pre-req then how you will apply that pre-req patch and resume with the current patch?
Ans: We need to take the backup of FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables and restart directory at APPL_TOP/amdin/SID and then use adctrl to quit all the workers. Then apply the pre-req patch , after that rename u r restart directory to its original name and create FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables from the bcakup tables. Start adpatch session and take the options want to continue previous session.
24. What is adctrl?
Ans: Adctrl is one of the adutilities, which is used to check the status of workers and to manage the workers.
25. Can u name some of the menu options in adctrl?
Ans: Check the status of workers, tell manager that worker has quited, restart a failed worker etc….
26. How to skip a worker and why?
Ans: We can skip a worker using option 8 in adctrl which is hidden. We will go for skipping a worker when we have executed the job which the worker is supposed to do.
27. How adpatch knows what are the pre-req’s for the patch which it is applying?
Ans: With every patch a file called b.ldt file will be delivered which contain the pre-req information. adpatch load this into databse using FNDLOAD and check , whether those pre-req patches were applied or not.


28. What is FNDLOAD ?
Ans: FNDLOAD is a utility which is similar to sqlloder but loads code objects into database, where as SQLLOADER loads data objects into database.
29. What c-driver will do?
Ans:
C-drive copies the files from patch unzipped directory to required location in u r application file system. Before copying it will check the file version of the existing file at the file system with the file version of the file in the patch. If the patch file version is higher than what it is at file system level then only c-driver will copy that files.
30. How adpatch will know the file versions of the patch delivered files?
Ans:
With each patch a file with name f.ldt is delivered , which contain the file versions of the files dilivered with the patch. Adpatch will use this file to compare the file versions of files its delivering with the file on file system.


31. What is the adpatch log file location?
Ans : APPL_TOP/admin/SID/log
32. What is the worker log file name and its location?
Ans : adwork01,adwork02…… and location is APPL_TOP/admin/SID/log
33. How u will know what are the files the patch is going to change just my unzipping the patch?
Ans:
When u unzip a patch it will keep all the files related to a particular product under that directory inside u r patch directory for example if the patch delivering files related to FND product then it will create a sub directory under the patch directory with the name FND in which it will put all related files to that product
34. What is the significance of backup directory under u r patch directory?
Ans:
When we apply a patch it will keep the copy of the files which its going to change in file system.
35. What are the different modes you can run your adpatch?
Ans :
1.Interactive – default mode
2.Non interactive – Use defaults files to store prompt values
(adpatch defaultsfile= interactive=no)
3. Test – Without actually applying a patch just to check what doing.(adpatch apply=no)
4. Pre-install – (adpatch preinstall=y)
This mode will be usefull to discrease upgrade downtime as its applies bus fixes without running SQL,EXEC and generate portion of patch.
36. How u will monitor u r applications as well as database?
Ans:
We have our custom scripts which is sheduled to run at a specific time which will monitor whether applications and databases are up/not. And it will mail us if some processes is not running. And we have one script which will check database alert log for ORA errors and mails it to us . Based on this we will react.
37. What are the latest ORA errors u have encountered?
Ans:
Useually we will get the ORA errors like unable to extend the tablespace by so and so size. And we will check those tablespaces for space, if space is not there we will resize the datafile and add one more datafile.
38. Which table u will query to check the tablespace space issues?
Ans : bytes column in dba_free_spaces and dba_data_files
39. Which table u will query to check the temp tablespace space issues?
Ans : dba_temp_files
40. What is temp tablespace? And what is the size of temp tablespace in u r instances?
Ans : Temp tablespace is used by so many application programs for sorting and other stuff. Its size is between 3 to 10 GB.
41. What is autoconfig?
Ans : Autoconfig is an adutility which is used to main application environment and configuration files.
42. What are the parameter autoconfig will ask for?
Ans : Context file name and apps password
43. What is context file?
Ans : Context file is a central repositary, which stores all application configuration information. The name is like _ .xml

44. How you will find autoconfig is enabled/not for u r applications?
Ans: 1. Open any env / configuration files, the first few lines will tell u that this files are maintained by autoconfig.2. If contextname.xml file is there in APPL_TOP/admin


45. How autoconfig will create env and configuration files?
Ans: Autoconfig will go to each and every top template directory take the templates from there and fill the values from xml file and create the required files.
46. In how many phases autoconfig will run?
Ans : Autoconfig will run in 3 phases.
1.INIT – Instantiate the drivers and templates
2.SETUP – Fill the templated with values from xml and create files
3.PROFILE – Update the profile values in database.
47. What is the location of adconfig log file?
Ans : APPL_TOP/admin//log/


48. Is it possiable to restore a autoconfig run?
Ans :
Partially. Adconfig will create a restore.sh script at $APPL_TOP/admin//out/. This restore.sh will copy the backed up files before autoconfig run to its original locations. But the profile values updated in the database can’t be restored back.


49. How to run autoconfig in test mode?
Ans :
adchkcfg.sh script at AD_TOP/bin. This script will run autoconfig in test mode and create the difference file which tells us what is going to change , when u actually run autoconfig.
50. How to find autoconfig is enabled or not for database?
Ans:
If we have appsutil directory under RDBMS_ORACLE_HOME

51. When a patch delivers java files what extra file u will get when u unzip the patch, other then u r dirver and readme files?
Ans : j.zip52.
52.What is apps.zip/appsbrog2.zip file?
Ans : apps.zip/appsbrog2.zip is the patchable archive of all java class files required for oracle application.Apps.zip was used to old application version, but from 11.5.8 onwards its appsbrog2.zip
53. What is the location of apps.zip/appsbrog2.zip?
Ans : AU_TOP/java and JAVA_TOP
54. What is for “validating apps schema” option in adadmin?
Ans: It will check for the corrupted objects in apps schema
55. What is “compile apps schema” option in adadmin?
Ans : It will compile the invalid database objects.
56. How to find invalid objects in database?
Ans : select count(*) from dba_objects where status=’INVALID’;
57. How to find MRC is enabled or not?
Ans: In adadmin if covert to MRC options is there , then MRC is not enabled,If maintain MRC options is there , then MRC is enabled.

58. How to find Multi-Org is enabled or not?
Ans : In adadmin if covert to Multi org option is there, then Multi-org is not enabled. If maintain multi-org options is there, then Multi-org is enabled.
59. What is mean by MRC?
Ans: MRC stands for Multiple reporting Currency, this should be enabled to see the reports in different currencies like (rupees,yaans etc).
60. What is Multi-Org?
Ans: If this is enabled we can store multiple organization information in a single oracle application instance.
61. What is the configuration file for adutilities (like adadmin,adconfig etc)?
Ans: adconfig.txt @APPL_TOP/admin
62. What is adrelink?
Ans : adrelink will relink the executables with the libraries. Generally we will go for adrelink when some patch delivers some library files, or when executables were corrupted.
63. How to find the version of a file?
Ans : 1. adident Header 2. strings -a filename grep Header


64. What is adodfcmp utility?
Ans : This utility is used to recreate/repair corrupted database objects from odf(object defination files) files.
65. How you will change apps password?
Ans: FNDCPASS 0 y apps/ system/ SYSTEM APPLSYS


66. What if apps password is changed with alter command?
Ans : Applications won’t work.
66. What is the difference between alter and FNDCPASS in changing apps password?
Ans : FNDCPASS will update some fnd tables other than standard tables.
67. Where the FNDCPASS utility is located?
Ans : Concurrent node @FND_TOP/bin
68. How to find out what component of u r oracle applications were installed on which node?
Ans : Xml file (context file)
69. How to find the version of httpd/Apache web server?
Ans : $IAS_ORACLE_HOME/Apache/bin/httpd –version
70. What is the configuration file for httpd and what is the location of it ?
Ans : httpd.conf @IAS_ORACLE_HOME/Apache/Apache/conf
71. Where you will see when you have some problem with u r webserver(httpd/Apache)?
Ans : access_log & error_log @IAS_ORACLE_HOME/Apache/Apache/logs
72. When Apache starts what other components its start ?
Ans : PL/SQL Listener, Servlet Engine, OJSP Engine
73. What is jserv?
Ans : jserv is nothing but servlet engine which will run u r servlets. It’s a module of apache which supports servlets.
74. What is self service application?
Ans : Whatever part of u r oracle application u r able to see through web browser is self service.
75. Where u will see when u r not able to get self service applications?
Ans : access_log,error_log, error_pls, jserv.log, wdbsvr.app(for apps password)
76. What is the location of jserv.log?
Ans : IAS_ORACLE_HOME/Apache/Jserv/log
77. What is the location of wdbsvr.app ?
Ans : IAS_ORACLE_HOME/Apache/modplsql/cfg
78. What are jserv.conf and jserv.properties files?
Ans : These are the configuration files which were used to start jvm’s(servlet engine) by apache.
79. What is mean by clearing cache and bouncing apache?
Ans :
1. Stop apache (adapcctl.sh stop apps)
2. Clear cache – Go to $COMMON_TOP/html/_pages and delete _oa_html directory
(rm –r _oa__html)
3. Start apache (adapcctl.sh start apps)
80. What is forms configuration file and its location?
Ans : appsweb_contextname.cfg @$COMMON_TOP/html/bin
81. What are the different modes u can start u r form server?
Ans : socket and servlet
82. What is the difference beween socket and servlet mode?
Ans :
In socket mode forms sessions are represented by f60webmx
In servlet mode forms sessions are represented by apache processes.
83. What is forms metric server and client?
Ans : When there are more than one form sever instances then forms metric server and clinet will be used to load balance.
84. Where the forms server related errors will be logged?
Ans : access_log and error_log
85. What is report server configuration and log file name and its location?
Ans : Configuration file – REP_.ora
Log file – REP_.log @806_ORACLE_HOME/reports60/server


86. What is CGIcmd.dat file and its location?
Ans : CGIcmd.dat file is the run time parameter file the report server located @ 806_ORACLE_HOME/reports60/server
87. What is the significance of DISPLAY variable?
Ans : Vnc server should be up and running at the specified port value in DISPLAY variable, otherwise reportserver may not able to show the graphics in Reports.
88. Where is the concurrent manager log file located?
Ans : $COMMON_TOP/admin//log or $APPLCSF/$APPLLOG


89. Is apps password necessary to start all the components of oracle application?
Ans : No. Only to start/stop concurrent managers apps password is needed.
90. What is a concurrent manager?
Ans : A concurrent manager is one which runs concurrent requests.
91. What are the different types of concurrent managers?
Ans :
1. Internal concurrent manager – Will start all other managers and monitor
2. Standard Manager – All concurrent request by default will to go this
3. Conflict resolution manager – Concurrent programs with incompatabilites will be handled by this
4. Transaction manager – Handle all transaction requests
92. What are actual and target count in ‘Adminster Concurrent Managers form’?
Ans : Target is the no. of concurrent processes a manager is supposed to start(specified in the defination of concurrent manager).Actual is the no. of processes a manager started actually.
Target and Actual should be always same.
93. What if Target and Actual are not same?
Ans : It means at operating system level resources are low to accomidate the required processes for concurrent managers.
94. What are work shifts?
Ans : Work shifts are nothing but timings at which the concurrent manager is supposed to run.
95. What if internal concurrent manager target and actual are not same?
Ans : we need to bounce the concurrent manager using adcmctl.sh
96. How to bounce a single concurrent manager?
Ans : From frontend using ‘Administer Concurrent Manager form’.
97. When we change apps password , is it necessary to bounce application?
Ans : Only we need to bounce concurrent managers.
98. What is dbc file and its location?
Ans : dbc file contain database connection information. DBC file is used by oracle applications to connect to database. Its location is $FND_TOP/secure
99. What is the other script by which u can start apache other than adapcctl.sh?
Ans : apachectl @IAS_ORACLE_HOME/Apache/bin
100. What is the configuration file for PL/SQL listener?
Ans : httpd_pls.conf @IAS_ORACLE_HOME/Apache/Apache/conf
101. How to skip copy portion while applying a patch?
Ans : Adpatch options=nocopyportion
102. How to merge patches and what type of patches can be merged?
Ans : admrgpch. We can merge any kind of application patches, if any of the patch contain a u-driver then merged patch will contain u_merged.drv otherwise c_merged.drv, d_merged.drv and g_merged.drv
103. What is the Tiered architecture of u r instance?
Ans : Two Tier: Web and Forms on one node and Conc, admin and report on other node.
104. How to find formserver version?
Ans: f60gen and press enter, it will tell u the formserver version or we can find out from the frondend using help menu.
105. What is RRA?
Ans : RRA stands for Report Review Agent. RRA is nothing but FNDFS which is part of apps listener. RRA job is to pick the log/out file from the file system and show on the editor when u press view log/out button in ‘View concurrent request form’.
106. What is apps listener?
Ans : Apps lintener is the combination of FNDFS and FNDSM. FNDSM is service manager which will monitor application services on that node when GSM:enable profile value is ‘Y’.
107. What is GSM?
Ans : GSM stands for Generic service Manager, which will monitor application processes like web, forms etc and restarts any of this processes if goes down.
108. How to find the application version like 11.5.8/11.5.9….?
Ans : select release_name from fnd_product_groups;
109. How to find the database/sqlplus version?
Ans : select banner from v$version;
110. How to find out what are the languages enabled in u r applications?
Ans : Query fnd_languages
111. What is the size of u r database?
Ans : 200 to 500 GB
112. How to find operating system version?
Ans : uname –a
113. What are the problems u have faced while shutting down applications?
Ans : While shutting down application generally concurrent manager won’t go down because some or the other request may be running. We will see what are the concurrent requests running by querying fnd_concurrent_requests, fnd_concurrent_program_vl, v$session,v$process and v$sqltext. If that request is only doing some select statement then we will kill those requests, otherwise we will check what time it will take to complete by querying the previous runs of that request and then we will decide what to do.
114. What are the problems u have faced while starting up applications?
Ans : Most of the time we will encounter problem with starting up concurrent managers. Reasons , database listener may be down or FNDSM entries are wrong in tnsnames.ora of 806_ORACLE_HOME.
115. How to find the locks and what is the resolution?
Ans : we can find general locks with the following query:
select * from sys.dba_dml_locks order by session_id.
We can find the dead locks with the following query:
select * from v$lock where lmode > 0 and id1 in (select distinct id1 from v$lock where request > 0)
If it’s a dead lock, we need to kill that session.
116. How to kill a database session?
Ans : alter system kill session '&sid,&sno';
117. How to find adconfig is enabled for oracle operating system user/database?
Ans : If appsutil directory is there in RDBMS_ORACLE_HOME
118. Which files tell u the database helath?
Ans : alert log file @RDBMS_ORACLE_HOME/admin//bdump


119. How to apply a rdbms patch?
Ans : Using opatch
120. How to find opatch is enabled or not for u r database?
Ans : If Opatch directory exists under RDBMS_ORACLE_HOME.
121. What is the pre-req for applying a rdbms patch?
Ans : Inventory should be set in file oraInst.loc @/var/opt/oracle or /etc
122. What is Inventroy?
Ans: The oraInventory is the location for the OUI (Oracle Universal Installer)'s bookkeeping. The inventory stores information about: All Oracle software products installed in all ORACLE_HOMES on a machine Other non-Oracle products, such as the Java Runtime Environment (JRE)
In a 11i Application system the RDBMS and iAS ORACLE_HOMEs are registered in the oraInventory. The 806 ORACLE_HOME, which is not managed through OUI, is not.
123. What are different types of inventories?
Ans:
The Global inventory (or Central inventory) The Local inventory (or Home inventory)
124. What is Global inventory?
Ans : The Global Inventory is the part of the XML inventory that contains the high level list of all oracle products installed on a machine. There should therefore be only one per machine. Its location is defined by the content of oraInst.loc.The Global Inventory records the physical location of Oracle products installed on the machine, such as ORACLE_HOMES (RDBMS and IAS) or JRE. It does not have any information about the detail of patches applied to each ORACLE_HOMEs.The Global Inventory gets updated every time you install or de-install an ORACLE_HOME on the machine, be it through OUI Installer, Rapid Install, or Rapid Clone.
Note: If you need to delete an ORACLE_HOME, you should always do it through the OUI de-installer in order to keep the Global Inventory synchronized.
125. What is local inventory?
Ans : There is one Local Inventory per ORACLE_HOME. It is physically located inside the ORACLE_HOME at $ORACLE_HOME/inventory and contains the detail of the patch level for that ORACLE_HOME.The Local Inventory gets updated whenever a patch is applied to the ORACLE_HOME, using OUI.
126. What is rapid clone?
Ans : Rapid Clone is the new cloning utility introduced in Release 11.5.8. Rapid Clone leverages the new installation and configuration technology utilized by Rapid Install
127. How do I determine if my system is rapid clone enabled?
Ans : First, verify that your system is AutoConfig enabled. Then, verify that you have applied the latest Rapid Clone patch.
128. Explain the cloning process?
Ans :
1. Run adpreclone as applmgr and oracle user on source Perl adpreclone.pl dbTier as oracle user Perl adpreclone.pl appsTier as applmgr user
2. Take the cold/hotbackup of source database
3. Copy the five directories appl,comn,ora , db,data to target
4. Rename the directories, and change the permisssion
5. Set the inventory in oraInst.loc
6. Run perl adcfgclone.pl dbTier as oracle user,if the backup type is cold
7. If the backup type is hotbackup then Perl adcfgclone.pl dbTechStack. Create the control file on target from the control script trace file from source Recover the database Alter database open resetlogs
8. Run autoconfig with the ports changed as per requirement in xml.
9. Run perl adcfgclone.pl appsTier as applmgr
10. Run autoconfig with the ports changed as per requirement in xml.
129. What is the location of adpreclone.pl for oracle user?
Ans : RDBMS_ORACLE_HOME/appsutil/scripts/


130. What is the location of adpreclone.pl for applmgr user?
Ans : $COMMON_TOP/admin/scripts/


131. What is the location of adcfgclone.pl for oracle user?
Ans : $RDBMS_ORACLE_HOME/appsutil/clone/bin
132. What is the location of adcfgclone.pl for applmgr user?
Ans : $COMMON_TOP/clone/bin
133. What is statspack?
Ans : Statspack is a database utility to gather database and session level performance information.
134. How to install statspack?
Ans : Run the script spcreate.sql @RDBMS_ORACLE_HOME/rdbms/admin
Note more details on statspack refer metalink noteid: 149113.1
135. How to enable trace at database level?
Ans : set init.ora parameter sql_trace
136. How to enable trace for a session?
Ans: Alter system set sql_trace=true;
Execute the sql query
Alter system set sql_trace=false;
This will create a trace file at
$RDBMS_ORACLE_HOME/admin/contextname/udump with the spid of the current sql session.
137. How to enable trace for other session?
Ans : exec sys.dbms_system.set_sql_trace_in_session(sid,serial#,true/false)
Eg: To enable trace for sql session with sid 8SQL> exec sys.dbms_system.set_sql_trace_in_session(8,121,true);
PL/SQL procedure successfully completed.
To disable trace
SQL> exec sys.dbms_system.set_sql_trace_in_session(8,121,false);
138.What is the location of inint.ora ?
Ans : $RDBMS_ORACLE_HOME/dbs
139. What is that trace files contains and the utiliy used to read them?
Ans : Trace file contains the detail diagnostics of a sql statement like explain plan, physical reads, logical reads, buffer gets etc. Tkprof utility is used to convert trace file into readable format.
140. What is the syntax for tkprof?
Ans: tkprof explain=apps/ sys=no


141.How do we find adpreclone is run in source or not ?
Ans : If clone directory exists under RDBMS_ORACLE_HOME/appsutil for oracle user and $COMMON_TOP for applmgr user.
143. How to find trace file for a given concurrent request id?
Ans : Go to $RDBMS_ORACLE_HOME/admin//udump
grep “ “ *


144. What is a database link? How to create it?
Ans : If we want to access objects of another database from this database then we need a database link from this database to the other.
1.Login as oracle user
2.sqlplus “/as sysdba”
3. create database link connect to identified by using '';
Ex
SQL> create database link TEST1_TO_TEST2 connect to apps identified by apps using 'TEST2';
Database link created.
SQL> select name from v$database@ TEST1_TO_TEST2;
NAME
---------
TEST2
SQL>select db_link from dba_db_links;
4. Add destination database tns entry in tnsnames.ora
145. How many clonings u have done?
Ans : If u r very much confident on cloning processes then say 5 to 8 otherwise just 2 or 3.
146. What u know abt RMAN?
Ans : If u r good at RMAN then say yes, otherwise say we are not using RMAN for backup/recovery , why because we are using netapp snap technology for backups.
147. What is netapp?
Ans : Netapp is a storage technology.
148. What is formserver url?
Ans :http://hostname.domain:/dev60cgi/f60cgi


149. What is jinitiator?
Ans : Oracle jinitiator is the one which provide the required jvm to run forms interface/applet. When we access forms applet first time , oracle jinitiator will be installed automatically.
150. What is discoverer server?
Ans : Discoverer server is reporting tools which allows novoice user to use oracle application reports. Discoverer will come along with oracle applications when installed.
154. What is adsplicer?
Ans : Adsplicer is a uitility used to register off cycle products.
155. What is licence manager?
Ans : Licence manager(adlicmgr) utility is used to licence/unlicence , enable new languages,enbale country specific functionality.
156. What is tnsping?
Ans : tnsping is command used to check the connectivity to the database server node from other nodes.
Ex: tnsping
Note: Tns entry should be there in tnsnames.ora for the database we are trying to work this command.



158. How to compile a form using f60gen?
Ans :
f60gen module=/TEST/testappl/au/11.5.0/forms/F/ARXTWMAI.fmb userid=APPS/APPS output_file=/TEST/testappl/ar/11.5.0/forms/F/ARXTWMAI.fmx module_type=form batch=yes compile_all=special



160. What is APPLPTMP environment variable?



Ans : This is the temporary file location for the pl/sql temp files. If this variable was not set then the concurrent programs may errored out. 161. What is mean by enabling maintanance mode?
Ans : Maintanance mode is the adadmin option introduced from AD.I. When maintanance mode is enabled user may able to login to application but they only get profile option in the frontend navigation menu.



162. Is that necessary to enable maintanance mode while applying a patch?



Ans : We can even apply a patch without enabling maintanance mode with the following option
Adpatch options=hotpatch



163. How to find out oracle application framework version?



Ans : 1. Through aoljtest2. cd $COMMON_TOP/html/3. adident Header OA.jsp



164. How to find out what are the rdbms patches applied to an oracle home?
Ans :
1. opatch lsinventory
2. $RDBMS_ORACLE_HOME/.patch_storage directory contains the directories with the rdbms patch number, which are applied to this oracle home.



165. Is that necessary to shutdown database while applying a database patch?
Ans : Yes.



166. What is the command line utility to submit a concurrent request?
Ans : CONSUB



167. What is the significance of utl_file_dir parameter in init.ora file?



Ans : The value of this parameter is the group of directories to which u r database can write, means u r database packages have permission to write to flat files in these directories.



168. How you will find out discoverer version?
Ans : cd $806_ORACLE_HOME/discwb4/lib strings libd* grep 'Version:'



169. While applying a rdbms patch using opatch you are getting the error, unable to read inventory/inventory is corrupted/ORACLE_HOME is not not registered, what you will do, and how you will apply the patch?



Ans: We will check the inventory directory permission, try to apply the patch after giving 777 permissions to that inventory directory. If still it won’t work we will apply patch with the following command:
Opatch apply no_inventory



172. Have you applied rdbms patches and for what?
Ans : We got ORA-7445 error in alert log, for which oracle recommended to apply a rdbms patch.



173. What are the patch errors , you have encountered?
Ans :
1)Patch fails with the error, unable to generate perticular form, do u want to continue. We continue patching by saying “yes”, then we manually regenarate the form using f60gen utility.



2) Unable to generate jar files under JAVA_TOP AutoPatch error: Failed to generate the product JAR files Solution:Run adjkey -initialize -----------to creat identitydb.obj file which will beused by adjava to sign jar files.



174. What is adjkey? What files it will create?
Ans : adjkey is an adutility which will create digital signature, which will be used to sign all t" admin? mailto:adsign.txt@APPL_TOP>adsign.txt@APPL_TOP/adminappltop.cer@APPL_TOP/adminidentitydb.obj@applmgr home

175. What are the post installation task?
Ans : Running adjkey –initialize and then runnning adadmin to regerate jar files.
177. What are the clone errors, you have encountered?
Ans : Error:
RC-50013: Fatal: Failed to instantiate driver/u01/fms2c/appfms2c/fms2cora/iAS/appsutil/driver/instconf.drvCauseThe source instance has files that adpreclone flags as 'autoconfigable' but in reality they are not. So adpreclone.pl adds these files into the instconf.drv. Then when adcfgclone.pl is run on target it looks for the template file to instantiate for these files and since there isn't a template file adcfgclone.pl fails. SolutionModify the target's instconf.drv and remove the offending lines. Then rerun adcfgclone.pl
178. What are the real time problems you have encountered and how you trouble shooted that?
Ans:1. Concurrent Program is erroing out with snapshot too old error. To resolve this we have added space to temp tablespace.2. Concurrent Program is erroing out with unable to extent a perticular tablespace by so and so extents. To resolve this we have added on more data file to that tablespace.3. When we are trying to start apache with adapcctl.sh script after a autoconfig run, its saying that “node id is not matching with the application server id”. To resolve this we have updated the server id column in fnd_nodes table with the server id value in dbc file.
179. How you will find workflow version?
Ans : Run wfver.sql@FND_TOP/sql script as apps user
180 . When forms are running in servlet mode then the environment variables required for forms must be defined in what file and its location?
Ans : formsservlet.ini@$APACHE_TOP/Jserv/etc.
181. How to find out which patch driver is applied(like c,d,g or u)?
Ans: query ad_patch_drivers.
182. How to find out whether a language patch is applied for a perticular patch?
Ans : Query ad_patch_driver_langs.
183. How to validate that sysadmin password is correct or not from backend?
Ans: select fnd_web_sec.validate_login('SYSADMIN','Qwert8765') from dual;
184. How to compile jsp's(other than from adadmin)?
Ans: Force compilation of all jsps using the following command ojspCompile.pl --compile --flush
185. How to rotate logs for apache logs?
Ans: Using rotatelogs executable in httpd.conf file. Use Errorlog for error_log file rotation. Transferlog for other log files.
186. Other way of checking whether MRC is enabled or not besides using adadmin?
Ans : select multi_currency_flag from fnd_product_groups;
187. How to compile rdf?
Ans: Either using adadmin or rwcon60
189. How to change file/directory owner in linux/solaris?
Ans : chown - R :
Ex: chown - R applmgr:dba testappl


190. How to change the permission of file/directory in linux/solaris?
Ans : chmod –R
Ex : chmod –R 755 testappl


191. What are the files which contain apps password?
Ans :
1. wdbsrv.app@IAS_ORACLE_HOME/Apache/modplsql/cfg
2. CGIcmd.dat@806_ORACLE_HOME/reports60/server
3. wfmail.cfg@FND_TOP/resource - optional
4. CatalogLoader.conf@OA_JAVA - optional
5. CatalogLoader.xml@OA_HTML - optional
192. What is the script to find out ICM status?
Ans : afimchk.sql@FND_TOP/sql
193. What is the script to list the concurrent request status?
Ans: afrqrun.sql@FND_TOP/sql
194. What is the script that Lists managers that currently are running a request?
Ans : afcmrrq.sql@FND_TOP/sql

195) How can I determine whether a template is customizable or non-customizable?
Ans : If a keyword "LOCK" is present at the end of the file entry in the respective driver, then it is a non-customizable template. If the "LOCK" keyword is not seen, then that template can be customized.
196) How to find out JDBC version :
Ans : In the middle tier, edit the jserv.properties file located in the IAS_ORACLE_HOME/Apache/Jserv/etc directory- Locate the wrapper.classpath that is pointing to the jdbc zip file/opt/oracle/apps/$TWO_TASK/comn/java/jdbc14.zip
197)How to findout XML Parser Version
Ans : SQL> select WF_EVENT_XML.XMLVersion() XML_VERSION from sys.dual;
198)How to find out WorkFlow Version
Ans :
SQL> select TEXT Version from WF_RESOURCES where TYPE = 'WFTKN' and NAME = 'WF_VERSION';
199) How to find a file version in Application DB:
select v.version,v.CREATION_DATE,c.CREATION_DATE from AD_FILES c,AD_FILE_VERSIONS v where c.FILENAME like 'ARPURGEB.pls' AND c.file_id = v.file_id AND c.app_short_name = 'AR';
When a copy driver (C) or the copy portion of a unified driver (U) are aborted for any reason, upon reapplying, the CREATION_DATE and/or LAST_UPDATE_DATE columns in the patching history tables (Ex: AD_FILE_VERSIONS)are not updated to show the proper installation date but are left with the 01-01-1950 date. you can resolve the issuse by applying the latest ad.I patch.
200) How to check whether the product is install,shared and Not installed in Apps.?
Ans :
SQL>select t.application_name, t.application_id, i.patch_level, decode(i.status,’I',’Fully Installed’,‘N’,'Not Installed’,'S’,'Shared’,'Undetermined’) statusfrom fnd_product_installations i, fnd_application_vl twhere i.application_id = t.application_idorder by t.application_id;