Installation Document - JDE-OracleDB-Restore
Installation Document - JDE-OracleDB-Restore
Installa(on Document
Oracle JDE Database Restore
Aswin Hadinata
IT Technical Consultant
Page |2
Contact Detail
Any inquiries regarding this document, its contents, structure, please contact :
Aswin Hadinata, IT Technical Consultant, Mobile phone : +62 812 9860 1245
Or email (✉) to : [email protected]
Page |3
Table of Contents
Contact Detail .................................................................................................................................................2
1. Installing Oracle Linux 6.1.......................................................................................................................4
1.2. Firewall...........................................................................................................................................17
1.3. SELinux ..............................................................................................................................18
2. Installing Oracle Database 11g Release 2 (11.2) Enterprise EdiYon .....................................................18
2.1. Pre-InstallaYon tasks .........................................................................................................19
2.1.1. Download So\ware ......................................................................................................19
2.1.2. Unpack Files .................................................................................................................19
2.1.3. Hosts File ......................................................................................................................20
2.1.4. Oracle InstallaYon Prerequisites ..................................................................................20
2.2. InstallaYon ..................................................................................................................................23
2.3. Post InstallaYon ..........................................................................................................................29
2.3.1. Common Errors ............................................................................................................29
3. Restore and Recovery Oracle Database 11g Release 2 (11.2) Enterprise EdiYon .................................30
3.1. Restore Database Process ........................................................................................................31
Page |4
a. Boot from the DVD. At the boot screen, press the "Enter" key.
b. Press the "tab" key to move focus to the "Skip" key, then press the "Enter" key to conYnue.
e. Select the relevant keyboard seeng, then click the "Next" budon.
Page |6
f. Select the storage opYon necessary for the installaYon, then click the "Next" budon.
g. Click the "Re-iniYalize all" budon on the disk iniYalizaYon warning dialog.
Page |7
h. Enter a fully qualified host name, then click the "Configure Network" budon.
j. Check the "Connect automaYcally" checkbox. If you are not using DHCP, click on the "IPv4 Seengs" tab, set
the method to "Manual", click the "Add" budon and enter the appropriate network details. When you are
happy with the details, click the "Apply" and "Close" budons to return to the host name screen, then click
the "Forward" budon.
k. Select the relevant Yme zone by clicking on your nearest city on the map. Click on the "Next" budon to
proceed.
Page |9
l. Enter a root password for the server, then click the "Next" budon to proceed.
m. Check the parYYoning type you require. If you want to amend the default parYYoning layout, check the
"Review and modify parYYoning layout" opYon. Click the "Next" budon.
P a g e | 10
n. The installer will list the default parYYoning scheme for your size disk. Amend them as required and click
the "Next" budon, then the "Format" and "Write changes to disk" budons on the following dialogs.
p. Accept the "Basic Server" installaYon and check the "Customize now" opYon, then click the "Next" budon.
q. The "Package Group SelecYon" screen allows you to select the required package groups, and individual
packages within the details secYon. When you've made your selecYon, click the "Next" budon.
P a g e | 12
v. Pick the desired ULN RegistraYon opYon, then click the "Forward" budon. In this case we will pick the
register later opYon.
y. Enter the details for system user, then click the "Forward" budon.
P a g e | 16
z. Adjust the Date and Time seengs if necessary, and click the "Forward" Budon.
aa. Accept the default seeng on the Kdump screen by clicking the "Finish" budon.
P a g e | 17
bb. Next, you are presented with the login screen. Log in by clicking on the user on the login screen.
1.2. Firewall
To turn off the firewall do the following as the "root" user.
#11.2.0.2
unzip p10098816_112020_Linux-x86-64_1of7.zip
unzip p10098816_112020_Linux-x86-64_2of7.zip
#11.2.0.3
unzip p10404530_112030_Linux-x86-64_1of7.zip
unzip p10404530_112030_Linux-x86-64_2of7.zip
P a g e | 20
#11.2.0.4
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
You should now have a single directory called "database" containing installaYon files.
2.1.3. Hosts File
The "/etc/hosts" file must contain a fully qualified name for the server.
<IP-address> <fully-qualified-machine-name> <machine-name>
For example.
127.0.0.1 localhost.localdomain localhost
172.16.3.8 oradev
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Add the following lines to the "/etc/security/limits.conf" file.
oracle so] nproc 16384
oracle hard nproc 16384
oracle so] nofile 4096
oracle hard nofile 65536
oracle so] stack 10240
Install the following packages if they are not already present.
# From Oracle Linux 6 DVD
cd /media/cdrom/Server/Packages
rpm -Uvh binu(ls-2*x86_64*
rpm -Uvh glibc-2*x86_64* nss-so]okn-freebl-3*x86_64*
rpm -Uvh glibc-2*i686* nss-so]okn-freebl-3*i686*
rpm -Uvh compat-libstdc++-33*x86_64*
rpm -Uvh glibc-common-2*x86_64*
rpm -Uvh glibc-devel-2*x86_64*
rpm -Uvh glibc-devel-2*i686*
rpm -Uvh glibc-headers-2*x86_64*
rpm -Uvh elfu(ls-libelf-0*x86_64*
rpm -Uvh elfu(ls-libelf-devel-0*x86_64*
rpm -Uvh gcc-4*x86_64*
rpm -Uvh gcc-c++-4*x86_64*
rpm -Uvh ksh-*x86_64*
rpm -Uvh libaio-0*x86_64*
rpm -Uvh libaio-devel-0*x86_64*
rpm -Uvh libaio-0*i686*
rpm -Uvh libaio-devel-0*i686*
rpm -Uvh libgcc-4*x86_64*
rpm -Uvh libgcc-4*i686*
rpm -Uvh libstdc++-4*x86_64*
rpm -Uvh libstdc++-4*i686*
rpm -Uvh libstdc++-devel-4*x86_64*
rpm -Uvh make-3.81*x86_64*
rpm -Uvh numactl-devel-2*x86_64*
rpm -Uvh sysstat-9*x86_64*
rpm -Uvh compat-libstdc++-33*i686*
rpm -Uvh compat-libcap*
cd /
eject
P a g e | 22
This will install all the necessary 32-bit packages for 11.2.0.1. From 11.2.0.2 onwards many of these are
unnecessary, but having them present does not cause a problem.
Create the new groups and users.
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 506 asmdba
groupadd -g 505 asmoper
# To this
* - nproc 16384
Set secure Linux to permissive by ediYng the "/etc/selinux/config" file, making sure the SELINUX flag is set
as follows.
SELINUX=permissive
Once the change is complete, restart the server.
If you have the Linux firewall enabled, you will need to disable or configure it
Create the directories in which the Oracle so\ware will be installed.
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Login as root and issue the following command.
xhost +<machine-name>
Login as the oracle user and add the following lines at the end of the ".bash_profile" file.
# Oracle Seengs
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
2.2. InstallaYon
Proceed with the installaYon of your choice. The prerequisites checks will fail for the following version-
dependent reasons:
• 11.2.0.1: The installer shows mulYple "missing package" failures because it does not recognize several
of the newer version packages that were installed. These "missing package" failures can be ignored as
the packages are present. The failure for the "pdksh" package can be ignored because we installed the
"ksh" package in its place.
• 11.2.0.2: The installer should only show a single "missing package" failure for the "pdksh" package. It
can be ignored because we installed the "ksh" package in its place.
• 11.2.0.3: The installer shows no failures and conYnues normally.
You can see the type of installaYon I performed by clicking on the links below to see screen shots of
each stage.
1. Configure Security Updates
2. Select Install OpYon
3. System Class
4. Node SelecYon
5. Select Install Type
6. Typical Install ConfiguraYon
7. Create Inventory
8. Perform Prerequisite Checks
9. Summary
10. Install Product
11. Database ConfiguraYon Assistant
12. Database ConfiguraYon Assistant 2
13. Execute ConfiguraYon Scripts
14. Finish
Log into the oracle user. If you are using X emulaYon then set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.
./runInstaller
It will starYng oracle Universal Installer
P a g e | 24
Next, is fill the email address and Myoracle Support password if any, but you can skip it. And next
Next, is select install opYons that we want to choose, in this case we can choose install database so\ware
only since we want to Restore ExisYng database to the new Machine,
P a g e | 25
On Grid OpYons select the database installaYon what we want to perform, in this case we choose for Single
instance database installaYon,
Set Privileged OperaYng System Groups, choose dba for OSDBA and oinstall for OSOPER,
Next is checking Prerequisites that might need for this installaYon, such as Library file or package on OS,
SWAP et. So make sure your SWAP is enough and all library needed is installed.
P a g e | 28
Oracle Recovery Manager called “Oracle RMAN” allows you to manage any backup and restore also
recovery when your Oracle DB system is failed, and it will restore your data from last backup.
There are some points of the backup and restore Oracle using RMAN that DB Admin / backup admin needs
to take a great care about :
1. Make Sure Backup DesYnaYon is enough to store Database backup on producYon environment,
either its Disk/Storage or Tape Library technology.
2. If you specify RMAN backup script by your own, make sure this component is backed up :
a. Datafile
b. Archivelog
c. Controlfile
3. Make sure there is no Corrupt table or tablespace or offline in Datafile, if any error, corrupt or
offline tablespace, datafile or there is inaccessible datafile state, please fix it first unYl it delete or
solved and accessible eventually or it beder to use syntax “SKIP INACCESSIBLE or SKIP OFFLINE” to
skip this kind of “Problem”.
4. Make sure there is no Obsolate and Expired Status of Datafile, archivelog and controlfile in a
backup piece. You can ensure this by accessing RMAN console and type “List Backup Summary” for
viewing backup summary and you can perform “CROSSCHECK BACKUP”, crosscheck backup
command will check for the records in the RMAN repository to make sure they are accurate. If
there is an record in the RMAN catalog that is not available on the physical filesystem, it will make
that entry with appropriate status. If crosscheck is finished, you can delete obsolete backup using
“DELETE OBSOLETE”. To delete all record on RMAN Catalog that marked with “EXPIRED” we can
use Command “DELETE EXPIRED BACKUP”.
5. Make sure you are doing Full backup First when doing DB MigraYon, Tuning, or any kinds of acYon
that possibly touch configuraYon of your producYon Oracle Database.
6. SomeYmes “parallelism” or mulY stream in backup to disk doesn’t works well when it allocated
manual, so let the chanel allocaYon be automaYc only.
7. It beder to enable automa(c backup of controlfile and SPfile, to perform easy restore process
Here are the steps when doing restore Database on the new machine:
3. Set DBID before we restore parameter spfile, (DBID is based on Source Database Instance)
6. a\er that we will startup database using current spfile with nomount;
7. since it new machine, we need to create audit trail folder (look at init<SID>.ora file for the locaYon
of the audit trail – marked with ‘audit_file_dest=’), if you are not prepare the folder that audit trail
needs, Restoring control file would not be easy and smooth. Exit the RMAN and use command
mkdir on root to create audit trail folder.
9. a\er finished restore controlfile we will bring up the database into mount state;
10. next we will start to restore database, normally restore database can be done with below
command:
But, special cases need to conduct when some of tablespace is not restored due to corrupt and
need to skip, so the process of the restore will be a bit difficult. Below is the sample of current
condiYon on the customer that demo and ps900dtai tablespace is offline / corrupt for some
reason.
11. a\er all database is restored, next we need to restore archivelog for recovery process later;
12. a\er all archivelog has been restored, next we need to recover database to bring up on to open
state,
13. a\er that, we need to bring up this database from mount state to the open state. But since this
recovery is not using latest archivelog or it use last backup of archivelog, so for latest transacYon
that not commided will be reset to have open state,