Search This Blog

Friday, August 24, 2007

Recover Database using RMAN

I use the following script to backup my database , with out catalog

Backup
======
run
{
allocate channel ch1 type disk;
backup incremental level 0 as backupset tag=full_backup (database);
sql 'alter system archive log current';
release channel ch1;
allocate channel ch1 type disk;
backup archivelog all tag=archives_backup
delete all input;
release channel ch1;

}
delete noprompt obsolete;
restore validate database;

Restore
=======
RMAN>shutdown immediate
RAMN>connect target sys/oracle
RMAN>startup mouunt
RMAN>
RUN
{
allocate channel ch1 type disk;
sql "alter session set nls_date_format=''MM-DD-YYYY HH24:MI:SS''";
set until time '08-24-2007 10:47:00';
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN RESETLOGS;
release channel ch1;
}

Tuesday, August 21, 2007

Install Oracle 11g on Redhat Linux 5 ( kernel 2.6.18 )

Redhat installation
====================
During the installation I choose the installation for "Developer"
I used 2.5G of swap space.

After the installation create the oracle user , and assign to it the dba group

As root installed the package below ( the --installed flag indicate that the package is alredy , installed during the "development installation"

Packages for Red Hat Enterprise Linux 5.0

binutils-2.17.50.0.6-2.el5 --installed
compat-libstdc++-33-3.2.3-61 --2
elfutils-libelf-0.125-3.el5 --installed
elfutils-libelf-devel-0.125 --2
glibc-2.5-12 --installed
glibc-common-2.5-12 --installed
glibc-devel-2.5-12 --installed
gcc-4.1.1-52 --installed
gcc-c++-4.1.1-52 --installed
libaio-0.3.106 ---installed
libaio-devel-0.3.106 -- installed
libgcc-4.1.1-52 --installed
libstdc++-4.1.1 --installed
libstdc++-devel-4.1.1-52.e15 --2
make-3.81-1.1 --installed
sysstat-7.0.0 --3
unixODBC-2.2.11 --2
unixODBC-devel-2.2.11 --2

edit the /etc/sysctl.conf file

fs.file-max = 512 * PROCESSES
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144


Add the following lines to the /etc/security/limits.conf file:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:

session required /lib/security/pam_limits.so
session required pam_limits.so


Restart the server , and run the runinstaller, the rest it is like in 10g expect some , security issue.

Ensure that the SElinux is disable, or it setup correctly.

For futher info , just send email askMichaelgeorgiou@gmail.com

References:Oracle 11g Installation Guide, for Linux

Setup estimation including redhat installation about 1hour