Search This Blog

Oracle Applications R12 Installation

Disk Space Requirements:

Application node(Fresh & Vision database)- 28GB
Database node for Fresh database - 45GB
Database node for Vision demo database - 133GB
Stage area size - 33GB

Total Space for fresh Install - 73GB
Total Space for Vision - 161GB


Operating System Version Used:

Red Hat Enterprise Linux 4.0-Update 4/higher(32-bit)



To determine version, $ uname - r

 Required Packages:

Check required rpms installed or not:   rpm –q glibc-2.3.4-2.25

glibc-2.3.4-2.25
glibc-common-2.3.4-2.25
binutils-2.15.92.0.2-21
compat-libstdc++-296-2.96-132.7.2
gcc-3.4.6-3
gcc-c++-3.4.6-3
libgcc-3.4.6-3
libstdc++-3.4.6-3
libstdc++-devel-3.4.6-3
openmotif21-2.1.30-11.RHEL4.6
pdksh-5.2.14-30.3
setarch-1.6-1
make-3.80-6.EL4
gnome-libs-1.4.1.2.90-44.1
sysstat-5.0.5-11.rhel4
compat-db-4.1.25-9
control-center-2.8.0-12.rhel4.5
xscreensaver-4.18-5.rhel4.11
libaio-0.3.105-2
libaio-devel-0.3.105-2

Software Requirements:

Check these Softwares installed or not:   which ar

Ar, gcc , g++ , ld , ksh, make, Xdisplay

Kernel Settings:

Set following kernel parameters in /etc/sysctl.conf

set kernel.semmsl=256
set kernel.semmns=32000
set kernel.semopm=100
set kernel.semmni=142
set kernel.shmall=2097152
set kernel.shmmax=2147483648(half of memory)
set kernel.shmmni=4096
set kernel.msgmax=8192
set kernel.msgmnb=65535
set kernel.msgmni=2878
set fs.file-max=65536
set net.ipv4.ip_local_port_range=1024 65000
set net.core.rmem_default=262144
set net.core.rmem_max=262144
set net.core.wmem_default=262144
set net.core.wmem_max=262144

Verifying Host Names:

Verify that the /etc/hosts file is formatted as follows:
127.0.0.1 localhost.localdomain localhost
Eg: 192.168.1.88 prod.testapps.com prod
Verify that the /etc/sysconfig/network file is formatted as follows:
HOSTNAME= prod.testapps.com

 If the /etc/sysconfig/networking/profiles/default/network
file exists, remove it. If you changed any files in the
previous steps, restart the system.

Modifying the Number of Open File Descriptors:

Open the /etc/security/limits.conf file and change
the existing values for "hard" and "soft" parameters as
follows. Restart the system after making changes.

* hard nofile 65535
* soft nofile 4096
* hard nproc 16384
* soft nproc 2047

Mount the DVD.

Before starting installation check rapidwiz version:
Current Version of Rapid Install
The most current version of the Rapid Install wizard
is 12.0.0.22. You can obtain this version by applying
patch 5885627, available at OracleMetaLink. To verify
your current version, use the RapidWizVersion
executable, located in the rapidwiz directory on the
Start Here DVD.

$ cd /Stage12/startCD/Disk1/rapidwiz
$ ./RapidWizVersion

To update the Start Here DVD, uncompress the patch in
the main staging area to overwrite the startCD
directory.

$ cd /Stage12
$ unzip -o p5885627_R12_GENERIC.zip


OS user account settings:
Create groups and user:-

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
useradd -g oinstall -G dba applmgr

Create directory structure & assign permissions:-

mkdir -p /d01/oracle
chmod -R 777 /d01

Change password of the users created:

passwd applmgr
passwd oracle

Check whether the both users have write permissions in the directory:-
touch abc (login using oracle user)

Start installation:-

$ /<installation file>/startCD/Disk1/rapidwiz/
$ ./rapidwiz

Rman Recovery Scenarios

Rman recovery scenarios require that the database is in archive log mode, and that
backups of datafiles, control files and archived
redolog files are made using Rman. Incremental Rman backups may be used also.
Rman can be used with the repository installed on the archivelog, or with a
recovery catalog that may be installed in the same or
other database.
Configuration and operation recommendations:
Set the parameter controlfile autobackup to ON to have with each backup a
controlfile backup also:
configure controlfile autobackup on;
Set the parameter retention policy to the recovery window you want to have,
ie redundancy 2 will keep the last two backups
available, after executing delete obsolete commands:
configure retention policy to redundancy 2;
Execute your full backups with the option 'plus archivelogs' to include your
archivelogs with every backup:
backup database plus archivelog;
Perform daily maintenance routines to maintain on your backup directory
the number of backups you need only:
crosscheck backup;
crosscheck archivelog all;
delete noprompt obsolete backup;

To work with Rman and a database based catalog follow these steps:-
1. sqlplus /
2. create tablespace repcat;
3. create user rcuser identified by rcuser default tablespace repcat temporary
    tablespace temp;
4. grant connect, resource, recovery_catalog_owner to rcuser
5. exit
6. rman catalog rcuser/rcuser     # connect to rman catalog as the rcuser
7. create catalog                       # create the catalog
8. connect target /

Complete Closed Database Recovery. System tablespace is missing:-
In this case complete recovery is performed, only the system tablespace is missing,
so the database can be opened without reseting
the redologs.
1.rman target /
2.startup mount;
3.restore database;
4.recover database;
5.alter database open;

Complete Open Database Recovery. Non system tablespace is missing, database is up:-
1.rman target /
2.sql 'alter tablespace <tablespace_name> offline immediate';
3.restore datafile 3;
4.recover datafile 3;
5.sql 'alter tablespace <tablespace_name> online';

Complete Open Database Recovery (when the database is initially closed).Non system tablespace is missing:-
A user datafile is reported missing when tryin to startup the database. The datafile
can be turned offline and the database started up. Restore and
recovery are performed using Rman. After recovery is performed the datafile can
be turned online again.

1.sqlplus /nolog
2.connect / as sysdba
3.startup mount
4.alter database datafile '<datafile_name>' offline;
5.alter database open;
6.exit;
7.rman target /
8.restore datafile '<datafile_name>';
9.recover datafile '<datafile_name>';
10.sql 'alter tablespace <tablespace_name> online';

Recovery of a Datafile that has no backups (database is up):
If a non system datafile that was not backed up since the last backup is missing,
recovery can be performed if all archived logs since the creation
of the missing datafile exist. Since the database is up you can check the tablespace
name and put it offline. The option offline immediate is used
to avoid that the update of the datafile header.
Pre requisites: All relevant archived logs.

1.sqlplus '/ as sysdba'
2.alter tablespace <tablespace_name> offline immediate;
3.alter database create datafile '/user/oradata/u01/dbtst/newdata01.dbf;
4.exit
5.rman target /
6.recover tablespace <tablespace_name>;
7.sql 'alter tablespace <tablespace_name> online';

If the create datafile command needs to be executed to place the datafile on a
location different than the original use:
alter database create datafile '/user/oradata/u01/dbtst/newdata01.dbf' as
'/user/oradata/u02/dbtst/newdata01.dbf'


Restore and Recovery of a Datafile to a different location. (Database is up):-
If a non system datafile is missing and its original location not available, restore
can be made to a different location and recovery performed.
Pre requisites: All relevant archived logs, complete cold or hot backup.
1.Use OS commands to restore the missing or corrupted datafile to the new
   location, ie:
   cp -p /user/backup/uman/user01.dbf /user/oradata/u02/dbtst/user01.dbf
2.alter tablespace <tablespace_name> offline immediate;
3.alter tablespace <tablespace_name> rename datafile
   '/user/oradata/u01/dbtst/user01.dbf' to '/user/oradata/u02/dbtst/user01.dbf';
4.rman target /
5.recover tablespace <tablespace_name>;
6.sql 'alter tablespace <tablespace_name> online';

Control File Recovery:-
Always multiplex your controlfiles. If you loose only one controlfile you can
replace it with the one you have in place, and startup the
Database. If both controlfiles are missing, the database will crash.
Pre requisites: A backup of your controlfile and all relevant archived logs. When
using Rman alway set configuration parameter
autobackup of controlfile to ON. You will need the dbid to restore the controlfile,
get it from the name of the backed up controlfile.
It is the number following the 'c-' at the start of the name.
1.rman target /
2.set dbid <dbid#>
3.startup nomount;
4.restore controlfile from autobackup;
5.alter database mount;
6.recover database;
7.alter database open resetlogs;
8.make a new complete backup, as the database is open in a new incarnation and
   previous archived log are not relevant.

Incomplete Recovery, Until Time/Sequence/Cancel:-
Incomplete recovery may be necessaire when the database crash and needs to be
recovered, and in the recovery process you find that
an archived log is missing. In this case recovery can only be made until the
sequence before the one that is missing.
Another scenario for incomplete recovery occurs when an important object was
dropped or incorrect data was committed on it.
In this case recovery needs to be performed until before the object was dropped.
Pre requisites: A full closed or open database backup and archived logs, the time or
sequence that the 'until' recovery needs to be performed.
1.If the database is open, shutdown it to perform full restore.
2.rman target \
3.startup mount;
4.restore database;
5.recover database until sequence 8 thread 1; # you must pass the thread, if a
   single instance will always be 1.
6.alter database open resetlogs;
7.make a new complete backup, as the database is open in a new incarnation and
   previous archived log are not relevant.
 
*Alternatively you may use instead of until sequence, until time, ie: '2004-12-
  28:01:01:10'.

User Managed Recovery Scenarios And Configuration

User managed recovery scenarios do require that the database is in archive log
mode, and that backups of all datafiles and control files are
made with the tablespaces set to begin backup, if the database is open while the
copy is made. At the end of the copy of each tablespace
it is necessaire to take it out of backup mode. Alternatively complete backups can
be made with the database shutdown. Online redologs can
be optionally backed up.
Files to be copied:
select name from v$datafile;
select member from v$logfile; # optional
select name from v$controlfile;

Complete Closed Database Recovery. System tablespace is missing:-
If the system tablespace is missing or corrupted the database cannot be started up
so a complete closed database recovery must be performed.
Pre requisites: A closed or open database backup and archived logs.
1. Use OS commands to restore the missing or corrupted system datafile to its
original location, ie:
cp -p /user/backup/uman/system01.dbf
/user/oradata/u01/dbtst/system01.dbf
2. startup mount;
3. recover datafile 1;
4. alter database open;

Complete Open Database Recovery. Non system tablespace is missing:-
If a non system tablespace is missing or corrupted while the database is open,
recovery can be performed while the database remain open.
Pre requisites: A closed or open database backup and archived logs.
1. Use OS commands to restore the missing or corrupted datafile to its original
location, ie:
cp -p /user/backup/uman/user01.dbf /user/oradata/u01/dbtst/user01.dbf
2. alter tablespace <tablespace_name> offline immediate;
3. recover tablespace <tablespace_name>;
4. alter tablespace <tablespace_name> online;

Complete Open Database Recovery (when the database is initially closed)Non system tablespace is missing:-
If a non system tablespace is missing or corrupted and the database crashed,
recovery can be performed after the database is open.
Pre requisites: A closed or open database backup and archived logs.
1.startup; (you will get ora-1157 ora-1110 and the name of the missing datafile, the
database will remain mounted)
2.Use OS commands to restore the missing or corrupted datafile to its original
location, ie: cp -p /user/backup/uman/user01.dbf /user/oradata/u01/dbtst/user01.dbf
3.alter database datafile3 offline; (tablespace cannot be used because the database
is not open)
4.alter database open;
5.recover datafile 3;
6.alter tablespace <tablespace_name> online;

Recovery of a Missing Datafile that has no backups
(database is open):-
If a non system datafile that was not backed up since the last backup is missing,
recovery can be performed if all archived logs since the creation
of the missing datafile exist.
Pre requisites: All relevant archived logs.
1.alter tablespace <tablespace_name> offline immediate;
2.alter database create datafile '/user/oradata/u01/dbtst/newdata01.dbf';
3.recover tablespace <tablespace_name>;
4.alter tablespace <tablespace_name> online;
5.If the create datafile command needs to be executed to place the datafile on a
   location different than the original use:
   alter database create datafile '/user/oradata/u01/dbtst/newdata01.dbf' as                                                          '/user/oradata/u02/dbtst/newdata01.dbf'

Restore and Recovery of a Datafile to a different location:-
If a non system datafile is missing and its original location not available, restore
can be made to a different location and recovery performed.
Pre requisites: All relevant archived logs.
1.Use OS commands to restore the missing or corrupted datafile to the new
   location, ie:
   cp -p /user/backup/uman/user01.dbf /user/oradata/u02/dbtst/user01.dbf
2.alter tablespace <tablespace_name> offline immediate;
3.alter tablespace <tablespace_name> rename datafile
  '/user/oradata/u01/dbtst/user01.dbf' to '/user/oradata/u02/dbtst/user01.dbf';
4.recover tablespace <tablespace_name>;
5.alter tablespace <tablespace_name> online;

Control File Recovery:-
Always multiplex your controlfiles. Controlfiles are missing, database crash.
Pre requisites: A backup of your controlfile and all relevant archived logs.
1.startup; (you get ora-205, missing controlfile, instance start but database is not
   mounted)
2.Use OS commands to restore the missing controlfile to its original location:
   cp -p /user/backup/uman/control01.dbf /user/oradata/u01/dbtst/control01.dbf
   cp -p /user/backup/uman/control02.dbf /user/oradata/u01/dbtst/control02.dbf
3.alter database mount;
4.recover automatic database using backup controlfile;
5.alter database open resetlogs;
6.make a new complete backup, as the database is open in a new incarnation and
   previous archived log are not relevant.

Incomplete Recovery, Until Time/Sequence/Cancel:-
Incomplete recovery may be necessaire when an archived log is missing, so
recovery can only be made until the previous sequence,
or when an important object was dropped, and recovery needs to be made until
before the object was dropped.
Pre requisites: A closed or open database backup and archived logs, the time or
sequence that the 'until' recovery needs to be performed.
1.If the database is open, shutdown abort
2.Use OS commands to restore all datafiles to its original locations:
   cp -p /user/backup/uman/u01/*.dbf /user/oradata/u01/dbtst/
   cp -p /user/backup/uman/u02/*.dbf /user/oradata/u01/dbtst/
   cp -p /user/backup/uman/u03/*.dbf /user/oradata/u01/dbtst/
   cp -p /user/backup/uman/u04/*.dbf /user/oradata/u01/dbtst/
   etc...
3.startup mount;
4.recover automatic database until time '2004-03-31:14:40:45';
5.alter database open resetlogs;
6.make a new complete backup, as the database is open in a new incarnation and
   previous archived log are not relevant.
*Alternatively you may use instead of until time, until sequence or until cancel:
  recover automatic database until sequence 120 thread 1; OR
  recover database until cancel;

Creating a VNC Server

To see the vncserver currently running:-
[root@localhost ~]# which vncserver
/usr/bin/vncserver

To set the vncserver to a port suppose 0:-
[root@localhost ~]# vncserver :0
You will require a password to access your desktops:-
Password:
Verify:
Warning: localhost.localdomain:0 is taken because of /tmp/.X0-lock 

A VNC server is already running as :0
Remove this file if there is no X server localhost.localdomain:0 or
connect with another port such as 1:-

[root@localhost ~]# ps -ef | grep -X
root      2732  2727  0 16:03 ?        00:00:12 /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
root      3005  2960  0 16:38 pts/1    00:00:00 grep X

Now the vncserver is created/connected with :1:-
[root@localhost ~]# vncserver :1
xauth:  creating new authority file /root/.Xauthority

Display Error or Xhost + not working

When using remote terminals the default DISPLAY is not <server name>:0.0.
This causes issues when the installer is run.

To fix this, log into your remote terminal as root, and check your DISPLAY setting (+echo $DISPLAY+). This may come back with :1.0, etc.
Run the following commands:
xhost <+server name+)
export DISPLAY= server name:1.0 (or 2.0, or whatever octetstring the earlier DISPLAY command returned)
xhost +

Now login as the oracle user.
Set DISPLAY as above

How Do I Disable Firewall in Linux?

First login as the root user.
Next enter the following three commands to disable firewall.
# service iptables save
# service iptables stop
# chkconfig iptables off

iptables is administration tool / command for IPv4 packet filtering and NAT. You need to use the following tools:
[a] service is a command to run a System V init script. It is use to save / stop / start firewall service.
[b] chkconfig command is used to update and queries runlevel information for system service. It is a system tool for maintaining the /etc/rc*.d hierarchy. Use this tool to disable firewall service at boot time.

Tape ARchive utility (TAR)

TAR is the Unix Tape ARchive utility. It can be used to either store data on a streaming tape device like a DAT drive, or store files in what is commonly called a tarball file- somewhat like a pkzip file, only compression is optional. 

The basics:-

In these examples, I will use the following file structure: a top level directory called DIR1 containing the files picture.jpg, document.doc anddatabase.db. 

  DIR1/ 

  DIR1/picture.jpg 
  DIR1/document.doc 
  DIR1/database.db 


Creating a tarball:-

If we were in the directory DIR1 and wanted to backup all the files to a tarball called backup.tar, we could issue this command: 

  $ 
tar cvf backup.tar . 

  ./ 
  picture.jpg 
  doucment.doc 
  database.db 
  tar: backup.tar is the archive; not dumped 


Note: 
c=create (an archive) 
v=verbose (just because) 
f=filename (the name of our tarball) 
.=current directory (what's going to be backed up)

Also worth mentioning is that by default tar is recursive- meaning it will back up all files and subdirectories recursively unless you otherwise specify with the n flag (non-recursive)


Displaying the Contents of a Tarball:-

The current directory will now contain a file called backup.tar. To display the contents of the tarball file, we could issue this command: 

  $ 
tar tvf backup.tar 

  drwxr-xr-x root/gci 0 Jun 29 10:10 ./ 
  -rw-r--r-- root/gci 1 Jun 29 10:10 picture.jpg 
  -rw-r--r-- root/gci 1 Jun 29 10:10 document.doc 
  -rw-r--r-- root/gci 1 Jun 29 10:10 databse.db 


Note: 
t=table of contents (list) 
v=verbose (display all info)
f=filename (backup.tar)


Extracting Data from a Tarball:-

To extract the entire contents of the tarball to the current directory, we can type: 

  $ 
tar xvf backup.tar 

  ./ 
  picture.jpg 
  doucment.doc 
  database.db 


Note: 
x=extract 
v=verbose 
f=filename (backup.tar)

To extract only the picture.jpg file from the archive, type the following command: 

  $ 
tar xvf backup.tar picture.jpg 

Alternatively, you can use wild cards in either the creation or extraction of a tarball. To extract all jpg files from our archive, we can use a command like this: 

  $ 
tar xvf backup.tar *.jpg 


Using Compression:-

If you would also like to add compression to your tarballs, you can combine the gzip utility with tar on the command line by adding the z switch to the command. Usually when this is done, we change the suffix of our tarball filename from .tar to either .tgz or .tar.gz. This will let whoever sees the file know that it is a gzipped tarball. 

  $ 
tar zcvf tarball.tgz . 

Note:
z=gzip compression 
c=create 
v=verbose 
f=filename (backup.tgz)
.=current directory (what to backup)


Permissions with tar:-

If you would like to preserve the permissions of the files you backup, use the p option with the tar command. This will save the uid, gid as well as the specific permission attributes of the files (read, write, execute etc.) 

  $ 
tar pzcvf tarball.tgz . 

You should also use the p option with the tar extraction command: 

  $ 
tar pxvf tarball.tgz . 


Using tar with a Tape Drive:-

I use tar in conjunction with my Seagate DAT drive. If you issue any of the previous commands in this HOW-TO without the f option and a tarball filename, you will find that tar will default to writing the files to the device /dev/rsa0 (raw sequential access device 0). Basically this is your first SCSI tape drive. If you have more than one tape drive you would like to use, you can issue the f option and the device name (rsa0, rsa1 etc.) of your specific tape drive instead of a filename. 

Examples:
Backing up the current directory to Tape:

  $ 
tar cv . <- default tape drive (rsa0) 

  $ 
tar cvf /dev/rsa1 . <- second tape drive (rsa1) 

Restore files from Tape:

  $ 
tar xv . 
  $ 
tar xvf /dev/rsa1 

So, there are the basics of tar. If you would like more information on the tar command, try the man pages.

man tar