Change Hostname in Linux(Red Hat)
Install Oracle 11.2.0.3 with ASM on Centos 6.3
“ For RHEL 6, Oracle will provide ASMLib software and updates only when configured with a kernel distributed by Oracle. Oracle will not provide ASMLib packages for kernels distributed by Red Hat as part of RHEL 6. ASMLib updates will be delivered via Unbreakable Linux Network (ULN), which is available to customers with Oracle Linux support. ULN works with both Oracle Linux or Red Hat Linux installations, but ASMLib usage will require replacing any Red Hat kernel with a kernel provided by Oracle.”
Because of the above announcement we use UDEV rules to prepare disks for ASM installation.
So let’s start.
1. Install required RPMs.
RPM names:
compat-libcap1-1.10-1.i686.rpm
compat-libcap1-1.10-1.x86_64.rpm
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
elfutils-devel-0.152-1.el6.x86_64.rpm
elfutils-libelf-devel-0.152-1.el6.x86_64.rpm
gcc-c++-4.4.6-4.el6.x86_64.rpm
glibc-2.12-1.80.el6.i686.rpm
glibc-devel-2.12-1.80.el6.i686.rpm
libaio-0.3.107-10.el6.i686.rpm
libaio-devel-0.3.107-10.el6.x86_64.rpm
libattr-2.4.44-7.el6.i686.rpm
libcap-2.16-5.5.el6.i686.rpm
libgcc-4.4.6-4.el6.i686.rpm
libstdc++-devel-4.4.6-4.el6.x86_64.rpm
libtool-ltdl-2.2.6-15.5.el6.i686.rpm
ncurses-devel-5.7-3.20090208.el6.i686.rpm
ncurses-libs-5.7-3.20090208.el6.i686.rpm
nss-softokn-freebl-3.12.9-11.el6.i686.rpm
pdksh-5.2.14-30.x86_64.rpm
readline-6.0-4.el6.i686.rpm
If you have Centos installation disk, these RPMs should be locate there. Or you can download them from http://rpm.pbone.net/
Note: if during installing pdksh-5.2.14-30.x86_64.rpm it says that package conflicts with ksh then you should erase ksh package and install pdksh, like this:
# rpm -qa | grep ksh
# rpm -e ksh-…
# rpm –ivh pdksh-5.2.14-30.x86_64.rpm
2. Configure Kernel:
# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 982431744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576
To make changes take effect:
# sysctl –p
Edit /etc/pam.d/login :
# vi /etc/pam.d/login
session required pam_limits.so
Edit /etc/security/limits.conf:
# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
Run the following to add lines in /etc/pam.d/login:
[root@orcl ~]# cat >> /etc/pam.d/login <<EOF
session required pam_limits.so
EOF
Run the following to add lines in /etc/profile:
[root@orcl ~]# cat >> /etc/profile <<EOF
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
Run the following to add lines in /etc/csh.login
[root@orcl ~]# cat >> /etc/csh.login <<EOF
if ( \$USER == "oracle" || \$USER == "grid" )
then
limit maxproc 16384
limit descriptors 65536
endif
EOF
Disable SELinux:
# /usr/sbin/getenforce
Enforcing
# /usr/sbin/setenforce 0
To make changes permanent, change /etc/sysconfig/selinux file by the following way:
cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted – Targeted processes are protected,
# mls – Multi Level Security protection.
SELINUXTYPE=targeted
To check the status again:
# /usr/sbin/getenforce
Disabled
3. Creating OS groups and users.
#Creating groups for Grid Infrastructure
groupadd asmadmin
groupadd asmdba
groupadd asmoper
#Creating groups for Oracle Software
groupadd oinstall
groupadd dba
groupadd oper
#Creating user for Grid Infrastructure
useradd -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid grid
#Creating user for Oracle Software
useradd -g oinstall -G dba,oper,asmdba -d /home/oracle oracle
#Setting password for users
passwd grid
passwd oracle
4. Creating necessary directories
mkdir -p /u01/app/grid
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/oracle
chown -R grid:oinstall /u01
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01
5. Creating .bash_profile-s
#For Oracle user
su – oracle
vi .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fiORACLE_SID=orcl; export ORACLE_SID
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
JAVA_HOME=/usr/local/java; export JAVA_HOME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_HOMEORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export NLS_DATE_FORMATTNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATHTHREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmpumask 022
#For Grid user
su – grid
vi .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fiORACLE_SID=+ASM; export ORACLE_SID
JAVA_HOME=/usr/local/java; export JAVA_HOME
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATHTHREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmpumask 022
6. Add disks for ASM
If your disk is not partitioned yet, partition it by fdisk utility.
At this point you will need SCSI identifier.
So if your disk is physical just run the following command to identify it:
# scsi_id -g -u -d /dev/sdb
36000c292dfddac7b8934d3293313098e
Or if you have virtual disk , you will need to set disk.EnableUUID parameter to TRUE to see this identifier:
Shutdown VM, go to the directory where VM files are stored and edit VMX file. Add the following line:
disk.EnableUUID = "TRUE"
Restart your VM and run the above command (scsi_id -g -u -d /dev/sdb)
We will use this identifier for the UDEV rules to set permissions and alias for the new device in /etc/udev/rules.d/50-udev.rules file.
# vi /etc/udev/rules.d/50-udev.rules
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",
RESULT=="36000c292dfddac7b8934d3293313098e", NAME="oracleasm/asm-disk1",
OWNER="oracle", GROUP="dba", MODE="0660"
Restart udev, by the following way:
# /sbin/start_udev
Starting udev: [ OK ]
Check that alias exists:
# ls -la /dev/oracleasm/*
brw-rw—- 1 oracle dba 8, 17 Feb 18 12:49 /dev/oracleasm/asm-disk1
7. Install grid
Go to the grid installation folder and run:
./runInstaller
Step 1:
Skip Software Updates.
Step 2:
Configure Oracle Grid Infrastructure for a Standalone Server.
Step 3:
Click Next.
Step 4:
Select the Change Discovery Path button and enter /dev/oracleasm.
There should appear /dev/oracleasm/asm-disk-1 and check it.
Type disk group name as DATA01.
Step 5:
Set the passwords for the SYS and ASMSNMP accounts:
Step 6:
ASM Database Administrator(OSDBA) Group : asmdba
ASM Instance Administration Operator(OSOPER) Group: asmoper
ASM Instance Administrator(OSASM) Group: asmadmin
Step 7:
Click Next.
Step 8:
Click Next.
Step 9:
Click Install.
After pop-upping the window , asking to run
- /u01/app/oraInventory/orainstRoot.sh
- /u01/app/oracle/product/11.2.0/db_1/root.sh
run these scripts one by one and click OK on pop-up window.
Note: if root.sh script shows the error like this:
…error while loading shared libraries: libcap.so.1: …
Then in your system libcap-1 and libcap-2 RPMs are missing, first install them.
8. Install database
Go to the database installation folder and run:
./runInstaller
Step 1:
I don’t want any more spam thanks.
Step 2:
Skip the updates.
Step 3:
Create and configure a database.
Step 4:
Server Class.
Step 5:
Single instance database installation.
Step 6:
Advanced install.
Step 7:
Choose the languages you want.
Step 8:
Enterprise Edition.
Step 9:
Choose the defaults.
Note: Grid and Database must be in the different folders.
Step 10:
General Purpose / Transaction Processing.
Step 11:
Write a database name.
Step 12:
Use Oracle Enterprise Manager Database Control for database management.
Step 13:
Use Automatic Storage Management.
Step 15:
Do not enable automated backups
Step 16:
Select the DATA01 diskgroup.
Step 17:
Set the passwords for the database.
Step 18:
Accept the defaults.
Database Administrator(OSDBA) Group: dba
Database Operator(OSOPER) Group: oper
Step 19:
Click Install to start the installer.
After the installation requires to run root.sh script, run it.
That is all.

Install Backup Exec Client(Remote Agent) on Linux
RALUS is a remote agent installation , simply Linux client of Backup exec that can be retrieved from Backup Exec installation DVD in LinuxUnixMac folder.
Some details:
Client Server IP: 10.0.1.100
Client Hostname: orcl_node
Domain: sa.ge
Media Server IP: 192.168.1.100
Create some installation directory and locate RALUS installation file to this folder.
1. Installation
# mkdir /0
# cd /0
# tar -xvf RALUS_RMALS_RAMS-4164.5.tar
# ./installralus
Step 1:
Enter the system names separated by spaces on which to install RALUS: (oracle-node1.tbilisi.gov.ge)10.0.1.100
Checking system communication:
Checking OS version on 10.0.1.100 ………….. Linux 2.6.18-194.el5
Checking system support for 10.0.1.100 … Linux 2.6.18-194.el5 supported by RALUSInitial system check completed successfully.
Press Enter.
Step 2:
Press Enter.
Step 3:
If the output is:
Checking file system space ……………. required space is available
Then press Enter
Step 4:
To display the Remote Agent as a selection in a media server’s backup selection tree, and to be able to specify a local network for use between the Remote Agent and a media server, enter the names or IP addresses of the media servers that you want the Remote Agent on ’10.0.1.100′ to communicate with.
An IP Address: XXX.XXX.XXX.XXX
A Host Name: COMPUTERNAMEEnter a directory host:192.168.1.100
Do you want to add another name or address for this agent? [y, n] (n)
Step 5:
If the information is correct press Enter
Step 6:
In this step beoper group will be created if it doesn’t exist and root user will be added to this group.
Press Enter
Press Enter
Press Enter (choosing y option by default)
Press Enter(choosing n option by default)
Press Enter (choosing y option by default)
Press Enter
Step 7 :
Checking VRTSralus package ………………………… not installed
Press Enter
Step 8:
Installing VRTSralus 13.0.4164 on 10.0.1.100 …… done 1 of 1 steps
Press Enter
Step 9 :
Creating configuration files on 10.0.1.100 ………………… Done
Press Enter
RALUS installation is complete, now it’s time to configure it.
2. Configuration on Client
Step 1:
Run AgentConfig:
# /opt/VRTSralus/bin/AgentConfig
Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection: 1Configuring machine information
Choose one of the following options:
1. Add system credentials for Oracle operations
2. Edit system credentials used for Oracle operations
3. Remove system credentials used for Oracle operations
4. View system credentials used for Oracle operations
5. Quit
Please enter your selection: 1
Enter a user name that has local system credentials: oracle
Enter the password:
Re-enter password:
Validating credentials…….
Do you want to use a custom port to connect to the media server during Oracle operations? (Y/N): N
Commit Oracle operation settings to the configuration file? (Y/N): Y
SUCCESS: Successfully added the entry to the configuration file.Configuring machine information
Choose one of the following options:
1. Add system credentials for Oracle operations
2. Edit system credentials used for Oracle operations
3. Remove system credentials used for Oracle operations
4. View system credentials used for Oracle operations
5. Quit
Please enter your selection: 5Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection: 2If this computer is a RAC node, you must perform additional steps for configuration before you continue. Refer to the readme for these additional steps.
Configuring the Oracle Agent
Choose one of the following options:
1. Add a new Oracle instance to protect
2. Edit an existing Oracle instance
3. Delete an existing Oracle instance
4. View Oracle instance entries that have been added in the Remote Agent Utility
5. Quit
Please enter your selection: 1
Select an Oracle instance to configure
Entry 1. orcl
Enter the number 0 to go back
Enter your selection: 1
Enter the Oracle database SYSDBA user name: SYS
Enter the Oracle database SYSDBA password:
Re-enter password:
Validating credentials…….
Enter the media server name or IP address: The length of the entered data is greater than the maximum permitted length.
Enter the media server name or IP address: 192.168.1.100
Do you use a recovery catalog? (Y/N):N
Do you want to use a customized job template? (Y/N): N
Commit Oracle operation settings to the configuration file? (Y/N): Y
Created symbolic link for /opt/VRTSralus/bin/libobk.so at /u01/app/oracle/product/11.2.0/db_1/lib/libobk.so
SUCCESS: Successfully added the entry to the configuration file.Configuring the Oracle Agent
Choose one of the following options:
1. Add a new Oracle instance to protect
2. Edit an existing Oracle instance
3. Delete an existing Oracle instance
4. View Oracle instance entries that have been added in the Remote Agent Utility
5. Quit
Please enter your selection: 5Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection: 3
Start agent:
# /etc/init.d/VRTSralus.init start
Starting Symantec Backup Exec Remote Agent ……
Starting Symantec Backup Exec Remote Agent: [ OK ]
3. Configuration on Media Server
To make media server see your client do the following steps:
Step 1:
Run Start->-All Programs>Symantec Backup Exec->Backup Exec 2010
Step 2:
Tools->Options->Oracle –>click Modify List button->click New button and fill the following fields, by the following way:
Oracle or DB2 Server: 10.0.1.100
Logon Account ->>>>click New button –>click New button and fill the following fields, by the following way:
User name: oracle
Password: enter oracle password for client server
Confirm Password: enter the password again
Account Name: oracle
click OK.
You will also need to configure SYS user account.
And choose oracle in Logon Account field.
click OK.
Do the same steps for 2 more times, just change Oracle or DB2 Server filed to orcl_node(instead of 10.0.1.100) for the first time and orcl_node.sa.ge for the second time
Step 3:
On media server , in hosts file add client entry.
That is all.

Supported Oracle Versions and Operating Systems
I was trying to install Oracle 10.2.0.1 on Windows Server 2008 R2 and of course this installation was UNSUCCESSFUL. So I decide to post Oracle versions and Operating System list. Here it is:
Oracle versions |
Windows Server versions |
Oracle 10g, Release 2 (10.2.0.1.0) |
|
Oracle 10g, Release 2 (10.2.0.2.0, 10.2.0.3.0) |
|
Oracle 10g, Release 2 (10.2.0.4.0) |
|
Oracle 10g, Release 2 (10.2.0.5.0) |
|
Oracle 11g, Release 1 (11.1.0.6.0) |
|
Oracle 11g, Release 1 (11.1.0.7.0) |
|
Oracle 11g, Release 2 (11.2.0.1.0, 11.2.0.2.0) |
|

Create Oracle Backup Job in Backup Exec
It is very easy to backup Oracle from Backup Exec than Netbackup So let’s discuss how to do it.
Some details:
Client Server IP: 10.0.1.100
Client Hostname: orcl_node
Media Server IP: 192.168.1.100
You should have installed RALUS Agent(Backup Exec client software) on client machine, if not see my post “Install Backup Exec Client(Remote Agent) on Linux”(There is also Agent configuration, but we will discuss this configuration in this post also, so just see the client installation section)
1. Configurations on client side
1.1 Oracle user (user that is the oracle software owner) must be in the beoper group.
# id oracle
uid=501(oracle) gid=503(oinstall) groups=503(oinstall),501(asmdba),504(dba),505(oper)# usermod -G asmdba,dba,oper,beoper oracle
# id oracle
uid=501(oracle) gid=503(oinstall) groups=503(oinstall),501(asmdba),504(dba),505(oper),506(beoper)
1.2. Configure RALUS agent on client machine
# /opt/VRTSralus/bin/AgentConfig
Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection: 1Configuring machine information
Choose one of the following options:
1. Add system credentials for Oracle operations
2. Edit system credentials used for Oracle operations
3. Remove system credentials used for Oracle operations
4. View system credentials used for Oracle operations
5. Quit
Please enter your selection: 1
Enter a user name that has local system credentials: oracle
Enter the password:
Re-enter password:
Validating credentials…….
Do you want to use a custom port to connect to the media server during Oracle operations? (Y/N): N
Commit Oracle operation settings to the configuration file? (Y/N): Y
SUCCESS: Successfully added the entry to the configuration file.Configuring machine information
Choose one of the following options:
1. Add system credentials for Oracle operations
2. Edit system credentials used for Oracle operations
3. Remove system credentials used for Oracle operations
4. View system credentials used for Oracle operations
5. Quit
Please enter your selection: 5Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection: 2If this computer is a RAC node, you must perform additional steps for configuration before you continue. Refer to the readme for these additional steps.
Configuring the Oracle Agent
Choose one of the following options:
1. Add a new Oracle instance to protect
2. Edit an existing Oracle instance
3. Delete an existing Oracle instance
4. View Oracle instance entries that have been added in the Remote Agent Utility
5. Quit
Please enter your selection: 1
Select an Oracle instance to configure
Entry 1. orcl
Enter the number 0 to go back
Enter your selection: 1
Enter the Oracle database SYSDBA user name: SYS
Enter the Oracle database SYSDBA password:
Re-enter password:
Validating credentials…….
Enter the media server name or IP address: The length of the entered data is greater than the maximum permitted length.
Enter the media server name or IP address: 192.168.1.100
Do you use a recovery catalog? (Y/N):N
Do you want to use a customized job template? (Y/N): N
Commit Oracle operation settings to the configuration file? (Y/N): Y
Created symbolic link for /opt/VRTSralus/bin/libobk.so at /u01/app/oracle/product/11.2.0/db_1/lib/libobk.so
SUCCESS: Successfully added the entry to the configuration file.Configuring the Oracle Agent
Choose one of the following options:
1. Add a new Oracle instance to protect
2. Edit an existing Oracle instance
3. Delete an existing Oracle instance
4. View Oracle instance entries that have been added in the Remote Agent Utility
5. Quit
Please enter your selection: 5Symantec Backup Exec Remote Agent Utility
Choose one of the following options:
1. Configure database access
2. Configure Oracle instance information
3. Quit
Please enter your selection: 3
2. Configurations on media server side
Run Backup Exec from start menu.
2.1 Adding client info.
From the menu bar click Tools->Options
In Job Defaults section –> Oracle –> click button Modify list
Click New button –> again New button –> and again New button
Fill the fields,
Username: oracle
Password:
Confirm Password:
Account Name: oracle
click OK
click OK.
click OK -> click OK –> click OK
2.2 Creating backup job.
From the left pane-> Backup Tasks-> New job
In Source section->Selections
Selection list name: Enter the name you want, let it be Oracle-test
Check View by Resource->All Resources-> Favorite Resources->orcl-node->Oracle Database “orcl”..->Tablespaces
I will not discuss all sections in detail, they are self-explanatory..
In Settings section-> Oracle –> choose Backup method and other necessary options like Delete backed up archive log files and so on…
By default job will run immediately after clicking the Submit button , but if you want to configure the schedule of your job , do the following:
In Frequency section –>Schedule-> choose Run according to schedule-> click Edit Schedule Details button and choose your appropriate schedule..
For example if you want your backup to run everyday at 1:00AM and no later than 11:00AM, click Day Interval –> check Every and write 1
In Time Window, fill :
Start no earlier than: 1:00AM
and no later than: 11:00AM
Click OK.
Click Submit button.
That’s it.

Configure SSL Connections on Report Server(https)
You must have a server certificate installed on the computer. Ask for the certificate to your sysadmins(windows admins), or request a certificate from a trusted certificate authority.
The following steps do not include instructions for requesting, generating, downloading, or installing a certificate. You must have a certificate installed and available to use.
So let’s start.
1. Run Reporting Services Configuration Manager and connect to the reporting server.
2. In Web Service URL section –> SSL Certificate –> choose your certificate –> click Apply.
3. Report Manager URL section –> Advanced button –> Multiple SSL identities for Report Manager section –>
click Add button –> in Certificate choose your certificate and click OK –> OK.
4. Stop and Start your Reporting service, from the first section of the configuration manager.
5. Check that the URL works by indicating https instead of http.

Installation problem of OEL6 on HP ProLiant DL360e Gen8 with HP Dynamic Smart Array B320i Controller
This post is dedicated to the Oracle Enterprise Linux 6.x installation on HP server with Dynamic Smart Array B320i Controller.
Brief description of the problem:
During OEL6 installation on HP server installer was not able to see local disks, on which system should be installed. Local disk specification was the following: Two 300GB disks involved into the RAID 1 and controller for RAID was Dynamic Smart Array B320i.
Installer was able to see multipath devices and any other external devices, like flash drive, but not local disks.
On HP site, there is written that the minimum supported Oracle Linux updates for HP DL380e series are the following:
- Oracle Linux/UEK 6.2
- Oracle Linux/UEK 5.8
“Minimum support includes all future updates of the indicated release unless a maximum is listed. (Example: Oracle 6 implies support for Oracle 6.x, unless it’s specifically called out in the notes as "not supported with 6.x")”
And HP also declaims that it gives its drivers to the supported OSs manufacturers.
To tell the truth, I’ve tried Oracle Enterprise Linux 5.5, 6.0, 6.2 and 6.4 versions, but none of them was able to see the local storage.
After a lot of troubleshooting, I found the solution.
Solution:
The solution implies the HP Dynamic Smart Array SATA RAID Controller Driver for Red Hat Enterprise Linux 6 installation before OS installation.
1. Download drivers from the following link, click here.
Note: hpvsa-1.2.4-4.rhel6u1.x86_64.dd.gz is for RHEL6.1
hpvsa-1.2.4-4.rhel6u2.x86_64.dd.gz is for RHEL6.2
hpvsa-1.2.4-4.rhel6u3.x86_64.dd.gz is for RHEL6.3
Because of we are installing Oracle Enterprise Linux 6.2 which is based on RHEL6.2, we need hpvsa-1.2.4-4.rhel6u2.x86_64.dd.gz.
2. Extract gz file, you should have file with the extension of dd. Write this file to the flash drive and connect it to the server.
3. Put Oracle Enterprise Linux 6.2 installation disk and when the following window appears, press the TAB.
At the end of the command write install dd(separated from the previous command with space) and press Enter.
4. Choose the driver file, that we mentioned earlier and continue the installation.
Oracle EL should now see the local disk without any problem. Good Luck.

Multipath configuration on RHEL6
1. Check if you have already installed device-mapper-multipath rpm, if not then install it.
rpm -qa device-mapper-multipath
2. If /etc/multipath.conf file doesn’t exist, then copy it from /usr/share/doc/device-mapper-multipath-*
cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/multipath.conf
3. Find WWIDs that should be added to multipath configuration.
# scsi_id -g -u /dev/sdb
36001438009b044d90000900000780000
4. Edit the /etc/multipath.conf configuration file
defaults {
user_friendly_names yes
path_grouping_policy failover
}blacklist {
wwid "*"
}blacklist_exceptions {
wwid "36001438009b044d90000900000780000"
}multipaths {
multipath {
wwid "36001438009b044d90000900000780000"
alias asm1
}
}
5. Add module to the Linux kernel:
modprobe dm-multipath
6. Start multipath service:
service multipathd start
7. If you have any syntax errors or any parameters that do not work in your Linux version, the following command will show:
multipath -d
8. Commit the configuration:
multipath -v2
9. The following command must find the paths , or you have a bad configuration in multipath.conf file:
multipath -ll
10. Make devices configured after a reboot:
chkconfig multipathd on
If you have made any mistakes in multipath.conf file then correct them and do the following steps to make changes take affect :
1. edit the /etc/multipath.conf
2. Reload the multipath service:
service multipathd reload
3. Remove all unused multipath devices
multipath -F
4. Check again that syntax is correct:
multipath –d
5. Commit the changes:
multipath –v2
Note that, this configuration is very simple, but it is working also perfectly.
For more multipath options and more sophisticated configuration, see the following documentation.

Automatic Tablespace Point-in-Time Recovery(TSPIR) in Oracle 11gR2
Automatic tablespace point-in-time recovery is very useful in the following situations:
1. You want to recover just one tablespace to the point in time other than rest of the tablespaces.
2. You want to recover dropped tablespace.
3. You want to recover data in table that was lost after changing structure of the table. Note that you are not able to use Flashback Table feature to recover data that was lost after changing table structure, it is not permitted.
TSPITR has a number of restrictions, a quick summary of which follows:
1. You can’t restore tablespaces with objects owned by SYS. Any tablespace with replicated master tables cannot be recovered with TSPITR.
2. Tablespaces with snapshot logs are not supported.
3. You can’t restore tablespaces that contain rollback segments.
4. If an object within the tablespace to be recovered has one of the following types, then TSPITR is not supported:
1. VARRAY
2. Nested tables
3. External files
5. The current physical structure of the undo and rollback segments in the target database
must be unchanged between the point you wish to recover to and the current point.
6. Once you have completed TSPITR on a given tablespace, all previous backups of that tablespace are no longer usable for future TSPITR recoveries of that tablespace. So you should backup your tablespace after TSPITR in case you need to run another TSPITR.
So, let’s start automatic TSPITR…Note that we are not using recovery catalog.
1. Identify the time to which you want to recover your tablespace. Don’t misidentify the time or you will not be able to retry the recovery.(As we mentioned in the section 6 of TSPITR restrictions, all previous backups will no longer be usable for future TSPITR)
2. Make sure that objects in that tablespace are self-contained.
Let’s say we have the tablesapace called “TEST”. It contains table “TEST_TABLE” but indexes on that table resides on another tablespace called “TEST_IDX”. In this case, if you want to recover “TEST” tablespace to some point-in-time , then you must also recover “TEST_IDX” tablespace to the same point-in-time(or you will loose indexes).
To identify dependent tablesapaces, run the following:
SQL> select obj1_owner
,obj1_name
,obj1_type
,ts2_name
,reason
from sys.ts_pitr_check
where ( ts1_name in (‘TEST’)
and ts2_name not in (‘TEST’) )
or ( ts1_name not in (‘TEST’)
and ts2_name in (‘TEST’) );
OBJ1_OWNER OBJ1_NAME OBJ1_TYPE TS2_NAME REASON TEST_USR TEST_TABLE TABLE TEST_IDX Tables and associated indexes not fully contained in the recovery set
This would return no rows if there were no dependencies. If there were any, you would see a
row describing each of them, as shown above.
In our case, there is an index associated with TEST_TABLE table and it resides in TEST_IDX tablespace. We should restore it also.
3. Identify what objects will be dropped after recovering tablespace.
Run the following,
SQL> select *
from ts_pitr_objects_to_be_dropped
where tablespace_name=’TEST’
OWNER NAME CREATION_TIME TABLESPACE_NAME TEST_USR TEST_TABLE 4/19/2013 12:19:18 PM TEST
For example, if you are going to recover tablespace to 4/19/2013 12:00:00PM then TEST_TABLE will be dropped.
4. Start test case.
Now we create 2 tablespaces TEST and TEST_IDX . Create TEST_USR user. Create TEST_TABLE table in TEST tablespace and TEST_INDEX in TEST_IDX. Fill table with data. Backup database. Before dropping table we save current SCN and then drop table. We will do TBSPIR until the saved SCN.
Step 0 : Clean the previous failed TSPIR
SQL> exec dbms_backup_restore.manageauxinstance (‘instance_name’,1) ;
instance_name will be generated automatically, and you should see it in RMAN output.
Step 1. Create TEST and TEST_IDX tablespaces.
SQL> CREATE TABLESPACE TEST DATAFILE
‘D:\APP\ORACLE\ORADATA\ORCL\TEST.DBF’ SIZE 104857600
AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M;
SQL> CREATE TABLESPACE TEST_IDX DATAFILE
‘D:\APP\ORACLE\ORADATA\ORCL\TEST_IDX.DBF’ SIZE 104857600
AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M;
Step 2. Create TEST_USR user, grant privileges.
SQL> CREATE USER TEST_USR IDENTIFIED BY TEST
DEFAULT TABLESPACE TEST;SQL> GRANT CONNECT,RESOURCE TO TEST_USR;
Step 3. Create TEST_TABLE table.
SQL> CREATE TABLE TEST_USR.TEST_TABLE(A DATE);
Step 4. Create TEST_INDEX index.
SQL> CREATE INDEX TEST_USR.TEST_INDEX
ON TEST_USR.TEST_TABLE(A)
TABLESPACE TEST_IDX;
Step 5. Fill data.
SQL> INSERT INTO TEST_USR.TEST_TABLE
VALUES(SYSDATE);SQL> INSERT INTO TEST_USR.TEST_TABLE
VALUES(SYSDATE);SQL> COMMIT;
Step 6.
SQL> SELECT *
FROM TEST_USR.TEST_TABLE
A 4/19/2013 12:20:16 PM 4/19/2013 12:20:16 PM
Step 7. Backup database.
RMAN> backup database plus archivelog;
Step 8. Note the current SCN.
SQL> SELECT CURRENT_SCN
FROM V$DATABASE
CURRENT_SCN 2091595
Step 9. Drop table.
DROP TABLE TEST_USR.TEST_TABLE
Step 10. Create tables in SYSTEM and TEST_IDX tablespaces.
SQL> CREATE TABLE TEST_USR.TEST_USR_SYSTEM(A DATE)
TABLESPACE SYSTEM;SQL> INSERT INTO TEST_USR.TEST_USR_SYSTEM VALUES(SYSDATE);
SQL> COMMIT;
SQL> CREATE TABLE TEST_USR.TEST_USR_TEST_IDX(A DATE)
TABLESPACE TEST_IDX;SQL> INSERT INTO TEST_USR.TEST_USR_TEST_IDX VALUES(SYSDATE);
SQL> COMMIT;
This is just for to see that just TEST and TEST_IDX tablespaces are affected. And not SYSTEM or any other tablespaces.
Step 11. Do TSPIR.
Note: Auxiliary destination must already exist and oracle software owner must be able to write into it.
!!! You should recover dependent tablespaces also , or data in these tablespaces will be lost.
For example: If you just recover TEST tablespace, then index on TEST_TABLE will be lost(resides in TEST_IDX tablespasce)… Note also that if you try to recover just TEST_IDX tablespace it will cause the following error:
The transportable set is not self-contained, violation list is Index TEST_USR.TEST_INDEX in tablespace TEST_IDX points to table TEST_USR.TEST_TABLE in tablespace TEST.
!!! Recoverable tablespaces must not contain SYS objects, or it will fail.
!!! Identify the exact point of time or after recovering tablespace, you will not be able to re-run TSPIR by existing backups.
After recovering tablespaces, if you run list backup command:
RMAN> list backup;
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——————- —-
1 Full 2084320 19-04-2013 16:52:21 D:\APP\ORACLE\ORADATA\ORCL\SYSTEM01.DBF
2 Full 2084320 19-04-2013 16:52:21 D:\APP\ORACLE\ORADATA\ORCL\SYSAUX01.DBF
3 Full 2084320 19-04-2013 16:52:21 D:\APP\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF
4 Full 2084320 19-04-2013 16:52:21 D:\APP\ORACLE\ORADATA\ORCL\USERS01.DBF
5 Full 2084320 19-04-2013 16:52:21
6 Full 2084320 19-04-2013 16:52:21
There are empty strings across recovered tablespaces.
So after TSPIR , you must re-take backup of the recovered tablespaces.
Starting TSPIR…
RMAN> recover tablespace "TEST","TEST_IDX" until scn 2091595 auxiliary destination ‘D:\oracle’;
Starting recover at 19-04-2013 17:57:28
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-timeList of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1Creating automatic instance, with SID=’uecp’
initialization parameters used for automatic instance:
db_name=ORCL
db_unique_name=uecp_tspitr_ORCL
compatible=11.2.0.0.0
db_block_size=8192
db_files=200
sga_target=280M
processes=50
db_create_file_dest=D:\oracle
log_archive_dest_1=’location=D:\oracle’
#No auxiliary parameter file usedstarting up automatic instance ORCL
Oracle instance started
Total System Global Area 292933632 bytes
Fixed Size 1374164 bytes
Variable Size 100665388 bytes
Database Buffers 184549376 bytes
Redo Buffers 6344704 bytes
Automatic instance created
Running TRANSPORT_SET_CHECK on recovery set tablespaces
TRANSPORT_SET_CHECK completed successfullycontents of Memory Script:
{
# set requested point in time
set until scn 2091595;
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone ‘alter database mount clone database’;
# archive current online log
sql ‘alter system archive log current’;
# avoid unnecessary autobackups for structural changes during TSPITR
sql ‘begin dbms_backup_restore.AutoBackupFlag(FALSE); end;’;
}
executing Memory Scriptexecuting command: SET until clause
Starting restore at 19-04-2013 17:58:39
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=59 device type=DISKchannel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2013_04_19\O1_MF_NCSNF_TAG20130419T175122_8Q2M0XGP_.BKP
channel ORA_AUX_DISK_1: piece handle=D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2013_04_19\O1_MF_NCSNF_TAG20130419T175122_8Q2M0XGP_.BKP tag=TAG20130419T175122
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=D:\ORACLE\ORCL\CONTROLFILE\O1_MF_8Q2MDJ5K_.CTL
Finished restore at 19-04-2013 17:58:41sql statement: alter database mount clone database
sql statement: alter system archive log current
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
contents of Memory Script:
{
# set requested point in time
set until scn 2091595;
plsql <<<– tspitr_2
declare
sqlstatement varchar2(512);
offline_not_needed exception;
pragma exception_init(offline_not_needed, -01539);
begin
sqlstatement := ‘alter tablespace ‘|| ‘"TEST"’ ||’ offline immediate’;
krmicd.writeMsg(6162, sqlstatement);
krmicd.execSql(sqlstatement);
exception
when offline_not_needed then
null;
end; >>>;
plsql <<<– tspitr_2
declare
sqlstatement varchar2(512);
offline_not_needed exception;
pragma exception_init(offline_not_needed, -01539);
begin
sqlstatement := ‘alter tablespace ‘|| ‘"TEST_IDX"’ ||’ offline immediate’;
krmicd.writeMsg(6162, sqlstatement);
krmicd.execSql(sqlstatement);
exception
when offline_not_needed then
null;
end; >>>;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 2 to new;
set newname for clone tempfile 1 to new;
set newname for datafile 5 to
"D:\APP\ORACLE\ORADATA\ORCL\TEST.DBF";
set newname for datafile 6 to
"D:\APP\ORACLE\ORADATA\ORCL\TEST_IDX.DBF";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 3, 2, 5, 6;
switch clone datafile all;
}
executing Memory Scriptexecuting command: SET until clause
sql statement: alter tablespace "TEST" offline immediate
sql statement: alter tablespace "TEST_IDX" offline immediate
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to D:\ORACLE\ORCL\DATAFILE\O1_MF_TEMP_%U_.TMP in control file
Starting restore at 19-04-2013 17:58:58
using channel ORA_AUX_DISK_1channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to D:\ORACLE\ORCL\DATAFILE\O1_MF_SYSTEM_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00003 to D:\ORACLE\ORCL\DATAFILE\O1_MF_UNDOTBS1_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00002 to D:\ORACLE\ORCL\DATAFILE\O1_MF_SYSAUX_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00005 to D:\APP\ORACLE\ORADATA\ORCL\TEST.DBF
channel ORA_AUX_DISK_1: restoring datafile 00006 to D:\APP\ORACLE\ORADATA\ORCL\TEST_IDX.DBF
channel ORA_AUX_DISK_1: reading from backup piece D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2013_04_19\O1_MF_NNNDF_TAG20130419T175122_8Q2LYVQ3_.BKP
channel ORA_AUX_DISK_1: piece handle=D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2013_04_19\O1_MF_NNNDF_TAG20130419T175122_8Q2LYVQ3_.BKP tag=TAG20130419T175122
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:05
Finished restore at 19-04-2013 18:00:04datafile 1 switched to datafile copy
input datafile copy RECID=4 STAMP=813175204 file name=D:\ORACLE\ORCL\DATAFILE\O1_MF_SYSTEM_8Q2MF36L_.DBF
datafile 3 switched to datafile copy
input datafile copy RECID=5 STAMP=813175204 file name=D:\ORACLE\ORCL\DATAFILE\O1_MF_UNDOTBS1_8Q2MF3K3_.DBF
datafile 2 switched to datafile copy
input datafile copy RECID=6 STAMP=813175204 file name=D:\ORACLE\ORCL\DATAFILE\O1_MF_SYSAUX_8Q2MF3BV_.DBFcontents of Memory Script:
{
# set requested point in time
set until scn 2091595;
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 3 online";
sql clone "alter database datafile 2 online";
sql clone "alter database datafile 5 online";
sql clone "alter database datafile 6 online";
# recover and open resetlogs
recover clone database tablespace "TEST", "TEST_IDX", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
}
executing Memory Scriptexecuting command: SET until clause
sql statement: alter database datafile 1 online
sql statement: alter database datafile 3 online
sql statement: alter database datafile 2 online
sql statement: alter database datafile 5 online
sql statement: alter database datafile 6 online
Starting recover at 19-04-2013 18:00:06
using channel ORA_AUX_DISK_1starting media recovery
archived log for thread 1 with sequence 15 is already on disk as file D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_04_19\O1_MF_1_15_8Q2M11L9_.ARC
archived log for thread 1 with sequence 16 is already on disk as file D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_04_19\O1_MF_1_16_8Q2MDSHL_.ARC
archived log file name=D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_04_19\O1_MF_1_15_8Q2M11L9_.ARC thread=1 sequence=15
archived log file name=D:\APP\ORACLE\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_04_19\O1_MF_1_16_8Q2MDSHL_.ARC thread=1 sequence=16
media recovery complete, elapsed time: 00:00:02
Finished recover at 19-04-2013 18:00:10database opened
contents of Memory Script:
{
# make read only the tablespace that will be exported
sql clone ‘alter tablespace "TEST" read only’;
sql clone ‘alter tablespace "TEST_IDX" read only’;
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ”
D:\oracle”";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ”
D:\oracle”";
}
executing Memory Scriptsql statement: alter tablespace "TEST" read only
sql statement: alter tablespace "TEST_IDX" read only
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ”D:\oracle”
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ”D:\oracle”
Performing export of metadata…
EXPDP> Starting "SYS"."TSPITR_EXP_uecp":
EXPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
EXPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX
EXPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
EXPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
EXPDP> Master table "SYS"."TSPITR_EXP_uecp" successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_uecp is:
EXPDP> D:\ORACLE\TSPITR_UECP_36510.DMP
EXPDP> ******************************************************************************
EXPDP> Datafiles required for transportable tablespace TEST:
EXPDP> D:\APP\ORACLE\ORADATA\ORCL\TEST.DBF
EXPDP> Datafiles required for transportable tablespace TEST_IDX:
EXPDP> D:\APP\ORACLE\ORADATA\ORCL\TEST_IDX.DBF
EXPDP> Job "SYS"."TSPITR_EXP_uecp" successfully completed at 18:01:30
Export completedcontents of Memory Script:
{
# shutdown clone before import
shutdown clone immediate
# drop target tablespaces before importing them back
sql ‘drop tablespace "TEST" including contents keep datafiles’;
sql ‘drop tablespace "TEST_IDX" including contents keep datafiles’;
}
executing Memory Scriptdatabase closed
database dismounted
Oracle instance shut downsql statement: drop tablespace "TEST" including contents keep datafiles
sql statement: drop tablespace "TEST_IDX" including contents keep datafiles
Performing import of metadata…
IMPDP> Master table "SYS"."TSPITR_IMP_uecp" successfully loaded/unloaded
IMPDP> Starting "SYS"."TSPITR_IMP_uecp":
IMPDP> Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
IMPDP> Processing object type TRANSPORTABLE_EXPORT/TABLE
IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX
IMPDP> Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
IMPDP> Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
IMPDP> Job "SYS"."TSPITR_IMP_uecp" successfully completed at 18:01:57
Import completedcontents of Memory Script:
{
# make read write and offline the imported tablespaces
sql ‘alter tablespace "TEST" read write’;
sql ‘alter tablespace "TEST" offline’;
sql ‘alter tablespace "TEST_IDX" read write’;
sql ‘alter tablespace "TEST_IDX" offline’;
# enable autobackups after TSPITR is finished
sql ‘begin dbms_backup_restore.AutoBackupFlag(TRUE); end;’;
}
executing Memory Scriptsql statement: alter tablespace "TEST" read write
sql statement: alter tablespace "TEST" offline
sql statement: alter tablespace "TEST_IDX" read write
sql statement: alter tablespace "TEST_IDX" offline
sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;
Removing automatic instance
Automatic instance removed
auxiliary instance file D:\ORACLE\ORCL\DATAFILE\O1_MF_TEMP_8Q2MHOX7_.TMP deleted
auxiliary instance file D:\ORACLE\ORCL\ONLINELOG\O1_MF_3_8Q2MHJJJ_.LOG deleted
auxiliary instance file D:\ORACLE\ORCL\ONLINELOG\O1_MF_2_8Q2MHGMY_.LOG deleted
auxiliary instance file D:\ORACLE\ORCL\ONLINELOG\O1_MF_1_8Q2MHC0J_.LOG deleted
auxiliary instance file D:\ORACLE\ORCL\DATAFILE\O1_MF_SYSAUX_8Q2MF3BV_.DBF deleted
auxiliary instance file D:\ORACLE\ORCL\DATAFILE\O1_MF_UNDOTBS1_8Q2MF3K3_.DBF deleted
auxiliary instance file D:\ORACLE\ORCL\DATAFILE\O1_MF_SYSTEM_8Q2MF36L_.DBF deleted
auxiliary instance file D:\ORACLE\ORCL\CONTROLFILE\O1_MF_8Q2MDJ5K_.CTL deleted
Finished recover at 19-04-2013 18:02:05RMAN>
Step 12. Make TEST and TEST_IDX tablespaces online.
ALTER TABLESPACE TEST ONLINE;
ALTER TABLESPACE TEST_IDX ONLINE;
Step 13. Check what was and wasn’t recovered.
SQL> select *
from TEST_USR.TEST_USR_SYSTEM;
A 4/19/2013 5:53:01 PM SQL> select *
from TEST_USR.TEST_USR_TEST_IDX;ORA-00942: table or view does not exist
SQL> select *
from TEST_USR.TEST_TABLE;
A 4/19/2013 5:50:44 PM 4/19/2013 5:50:44 PM
So just “TEST” and “TEST_IDX” tablespaces are affected, nice
Good Luck!

Transaction recovery: lock conflict caught and ignored
ALERT.LOG:
..... Transaction recovery: lock conflict caught and ignored
.....
And also some incident files are being created in $ORACLE_BASE/diag/rdbms/dbname/instancename/incident folder.
In my case the error started after SUPPLEMENTAL LOGGING enabled in a RAC environment. After disabling it the messages have not disappeared, but incident files are no longer being created.
1. Dead Trasaction
SQL> select b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks,a.ktuxesta txstatus
from x$ktuxe a, undo$ b
where a.ktuxecfl like ‘%DEAD%’
and a.ktuxeusn = b.us#;
USEG INSTID STATUS XID_USN XID_SLOT XID_SEQ UNDOBLOCKS TXSTATUS _SYSSMU7_881277423$ 1 3 7 13 1829999 1 ACTIVE _SYSSMU8_4204495590$ 1 3 8 32 3045564 1 ACTIVE _SYSSMU10_1314081219$ 1 3 10 3 11844457 1 ACTIVE
Transaction id is XID_USN.XID_SLOT.XID_SEQ
So in our case, for the first row it will be 7.13.1829999
2. Read transaction table from undo header.
ALTER SYSTEM DUMP UNDO HEADER ‘_SYSSMU7_881277423$’;
….
TRN TBL::
index state cflags wrap# uel scn dba parent-xid nub stmt_num cmt————————————————————————————————
0×00 9 0×03 0x1bf45c 0x000b 0×0000.789de808 0x00c242eb 0×0000.000.00000000 0×00000001 0x00c242eb 1367258143
0×01 9 0×00 0x1c031b 0×0014 0×0000.789e6018 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258225
0×02 9 0×00 0x1c147a 0x000e 0×0000.789e694b 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258230
0×03 9 0×00 0x1c06f9 0×0016 0×0000.789e601c 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258225
0×04 9 0×00 0x1c06c8 0×0009 0×0000.789e3566 0x00c242f9 0×0000.000.00000000 0×00000001 0×00000000 1367258192
0×05 9 0×00 0x1c1167 0×0015 0×0000.789e357f 0x00c242ec 0×0000.000.00000000 0×00000001 0×00000000 1367258192
0×06 9 0×00 0x1c2716 0×0017 0×0000.789e69e1 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258230
0×07 9 0×00 0x1c1045 0x000c 0×0000.789e1bdb 0x00c242eb 0×0000.000.00000000 0×00000001 0×00000000 1367258170
0×08 9 0×00 0x1c2614 0×0005 0×0000.789e357e 0x00c242ec 0×0000.000.00000000 0×00000001 0×00000000 1367258192
0×09 9 0×00 0x1bfa03 0×0021 0×0000.789e3574 0x00c242f9 0×0000.000.00000000 0×00000001 0×00000000 1367258192
0x0a 9 0×00 0x1bf712 0x001e 0×0000.789e3246 0x00c242f1 0×0000.000.00000000 0×00000001 0×00000000 1367258190
0x0b 9 0×00 0x1c1e01 0×0007 0×0000.789e1bd9 0x00c242eb 0×0000.000.00000000 0×00000001 0×00000000 1367258170
0x0c 9 0×00 0x1c08e0 0x000a 0×0000.789e3244 0x00c242f1 0×0000.000.00000000 0×00000006 0×00000000 1367258190
0x0d 10 0×90 0x1bec6f 0×0038 0×0000.789e783e 0x00c242fb 0×0000.000.00000000 0×00000001 0x00c242fb 0
0x0e 9 0×00 0x1c068e 0×0010 0×0000.789e694d 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258230
0x0f 9 0×00 0x1c151d 0×0012 0×0000.789e3578 0x00c242ec 0×0000.000.00000000 0×00000001 0×00000000 1367258192
0×10 9 0×00 0x1c26bc 0×0006 0×0000.789e69df 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258230
0×11 9 0×00 0x1c16eb 0×0000 0×0000.789cbd77 0x00c242eb 0×0000.000.00000000 0×00000001 0×00000000 1367257923
0×12 9 0×00 0x1c082a 0x001d 0×0000.789e357c 0x00c242ec 0×0000.000.00000000 0×00000001 0×00000000 1367258192
0×13 9 0×00 0x1c1459 0x001f 0×0000.789e7891 0x00c242fc 0×0000.000.00000000 0×00000001 0×00000000 1367258238
0×14 9 0×00 0x1c14b8 0×0003 0×0000.789e601a 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258225
0×15 9 0×00 0x1c0457 0×0020 0×0000.789e39d3 0x00c242ec 0×0000.000.00000000 0×00000001 0×00000000 1367258195
0×16 9 0×00 0x1c1326 0×0002 0×0000.789e601d 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258225
0×17 9 0×00 0x1c0db5 0x001c 0×0000.789e788a 0x00c242fc 0×0000.000.00000000 0×00000001 0×00000000 1367258238
0×18 9 0×00 0x1bffe4 0x001b 0×0000.789e400d 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258200
0×19 9 0×00 0x1c16e3 0×0001 0×0000.789e5fd2 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258225
0x1a 9 0×00 0x1bdbb2 0×0018 0×0000.789e400b 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258200
0x1b 9 0×00 0x1c1141 0×0019 0×0000.789e453a 0x00c242fa 0×0000.000.00000000 0×00000001 0×00000000 1367258204
0x1c 9 0×00 0x1bc9a0 0×0013 0×0000.789e788e 0x00c242fc 0×0000.000.00000000 0×00000001 0×00000000 1367258238
0x1d 9 0×00 0x1c02ef 0×0008 0×0000.789e357d 0x00c242ec 0×0000.000.00000000 0×00000001 0×00000000 1367258192
0x1e 9 0×00 0x1c0b6e 0×0004 0×0000.789e3250 0x00c242f9 0×0000.000.00000000 0×00000009 0×00000000 1367258190
0x1f 9 0×00 0x1c00ad 0xffff 0×0000.789e78a1 0x00c242fc 0×0000.000.00000000 0×00000001 0×00000000 1367258238
0×20 9 0×00 0x1c166c 0x001a 0×0000.789e39dd 0x00c242fa 0×0000.000.00000000 0×00000002 0×00000000 1367258195
0×21 9 0×00 0x1c160b 0x000f 0×0000.789e3576 0x00c242ec 0×0000.000.00000000 0×00000001 0×00000000 1367258192
EXT TRN CTL::
usn: 7
State# 10 means active transaction.
dba points to starting UNDO block address.
usn: Undo segment number
usn.index.wrap# gives transaction id.
An active transaction 0×0007.00d.001bec6f is available in slot 0x0d which has a dba of 0x00c242fb (12731131 in decimal)
3. Reading UNDO Block:
Identify fileID and blockID:
fileID:
select DBMS_UTILITY.DATA_BLOCK_ADDRESS_FILE(12731131) from x$dual;
3
blockID:
select DBMS_UTILITY.DATA_BLOCK_ADDRESS_BLOCK(12731131) from x$dual;
148219
Dumping block
alter system dump datafile 3 block 148219;
UNDO BLK:
xid: 0×0007.00d.001bec6f seq: 0x41f9 cnt: 0×6 irb: 0×5 icl: 0×0 flg: 0×0000
Rec Offset Rec Offset Rec Offset Rec Offset Rec Offset—————————————————————————
0×01 0x1f98 0×02 0x1f2c 0×03 0x1d7c 0×04 0x1d10 0×05 0x1ca0
0×06 0x1bfc
*—————————–* Rec #0×1 slt: 0x0d objn: 0(0×00000000) objd: 0 tblspc: 0(0×00000000)
* Layer: 5 (Transaction Undo) opc: 7 rci 0×00
Undo type: Regular undo Begin trans Last buffer split: NoTemp Object: No
Tablespace Undo: No
rdba: 0x00000000Ext idx: 0
flg2: 0
*—————————–
uba: 0x00c242fa.41f9.37 ctl max scn: 0×0000.789b7668 prv tx scn: 0×0000.789bb8d7
txn start scn: scn: 0×0000.789e783e logon user: 88
prev brb: 12731116 prev bcl: 0
*—————————–* Rec #0×2 slt: 0x0d objn: 110769(0x0001b0b1) objd: 110769 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×00
Undo type: Regular undo User Undo Applied Last buffer split: NoTemp Object: No
Tablespace Undo: No
rdba: 0×00000000
*—————————–
KDO undo record:
KTB Redo
op: 0×04 ver: 0×01
compat bit: 4 (post-11) padding: 1op: L itl: xid: 0×0012.01c.00322281 uba: 0x0102c5f0.3fa9.0a
flg: C— lkc: 0 scn: 0×0000.789ca3f4
KDO Op code: LKR row dependencies Disabled
xtype: XA flags: 0×00000000 bdba: 0x038180fc hdba: 0x018d64e2
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 14 to: 0
*—————————–* Rec #0×3 slt: 0x0d objn: 110769(0x0001b0b1) objd: 110769 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×02
Undo type: Regular undo User Undo Applied Last buffer split: NoTemp Object: No
Tablespace Undo: No
rdba: 0×00000000
*—————————–
KDO undo record:
KTB Redo
op: 0×02 ver: 0×01
compat bit: 4 (post-11) padding: 1op: C uba: 0x00c242fb.41f9.02
KDO Op code: URP row dependencies Disabled
xtype: XA flags: 0×00000000 bdba: 0x038180fc hdba: 0x018d64e2
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 14(0xe) flag: 0x2c lock: 1 ckix: 0
ncol: 9 nnew: 6 size: 0
col 1: [ 7] 78 71 04 1d 13 01 01
col 2: [ 2] c1 13
col 3: [ 1] 80
col 4: [16] 10 e5 00 2e 10 d1 10 d0 10 d7 10 e3 10 db 10 d8
col 5: [174]
10 d0 10 ed 10 d0 10 e0 10 d8 10 e1 00 20 10 d0 00 2e 10 e0 00 2e 00 20 10
de 10 e0 10 dd 10 d9 10 e3 10 e0 10 d0 10 e2 10 e3 10 e0 10 d8 10 e1 00 20
10 e1 10 d0 10 d2 10 d0 10 db 10 dd 10 eb 10 d8 10 d4 10 d1 10 dd 00 20 10
dc 10 d0 10 ec 10 d8 10 da 10 d8 10 e1 00 20 10 e3 10 e4 10 e0 10 dd 10 e1
00 20 10 d2 10 d0 10 db 10 dd 10 db 10 eb 10 d8 10 d4 10 d1 10 d4 10 da 10
e1 00 20 10 d1 10 d0 10 e2 10 dd 10 dc 00 20 10 d2 10 d8 10 dd 10 e0 10 d2
10 d8 00 20 10 de 10 d4 10 e0 10 d0 10 dc 10 d8 10 eb 10 d4 10 e1 00 2e
col 6: [36]
00 54 00 01 04 0c 00 00 00 02 00 00 00 01 00 00 09 07 b0 63 00 10 09 00 00
00 00 00 00 00 00 00 00 00 00 00
*—————————–* Rec #0×4 slt: 0x0d objn: 89834(0x00015eea) objd: 93214 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×03
Undo type: Regular undo User Undo Applied Last buffer split: NoTemp Object: No
Tablespace Undo: No
rdba: 0×00000000
*—————————–
KDO undo record:
KTB Redo
op: 0×04 ver: 0×01
compat bit: 4 (post-11) padding: 1op: L itl: xid: 0x000c.017.000d65d6 uba: 0x0103df2c.22a5.20
flg: C— lkc: 0 scn: 0×0000.789c4694
KDO Op code: LKR row dependencies Disabled
xtype: XA flags: 0×00000000 bdba: 0×03833994 hdba: 0x0181f832
itli: 1 ispac: 0 maxfr: 4858
tabn: 0 slot: 7 to: 0
*—————————–* Rec #0×5 slt: 0x0d objn: 89834(0x00015eea) objd: 93214 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×04
Undo type: Regular undo Last buffer split: NoTemp Object: No
Tablespace Undo: No
rdba: 0×00000000
*—————————–
KDO undo record:
KTB Redo
op: 0×02 ver: 0×01
compat bit: 4 (post-11) padding: 1op: C uba: 0x00c242fb.41f9.04
KDO Op code: LMN row dependencies Disabled
xtype: XA flags: 0×00000000 bdba: 0×03833994 hdba: 0x0181f832
itli: 1 ispac: 0 maxfr: 4858
*—————————–* Rec #0×6 slt: 0x0d objn: 89703(0x00015e67) objd: 92020 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×05
Undo type: Regular undo User Undo Applied Last buffer split: NoTemp Object: No
Tablespace Undo: No
rdba: 0×00000000
*—————————–
KDO undo record:
irb points to last UNDO RECORD in UNDO block.
rci points to previous UNDO RECORD. if rci=0, it’s the first UNDO RECORD.
Recovery operation starts from irb and chain is followed by rci until rci is zero.
The transaction starts recovery from UNDO RECORD of 0×5.
4. Reading UNDO Records:
* Rec #0×5 slt: 0x0d objn: 89834(0x00015eea) objd: 93214 tblspc: 6(0×00000006)* Layer: 11 (Row) opc: 1 rci 0×04
….* Rec #0×4 slt: 0x0d objn: 89834(0x00015eea) objd: 93214 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×03
….* Rec #0×3 slt: 0x0d objn: 110769(0x0001b0b1) objd: 110769 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×02
…* Rec #0×2 slt: 0x0d objn: 110769(0x0001b0b1) objd: 110769 tblspc: 6(0×00000006)
* Layer: 11 (Row) opc: 1 rci 0×00
…
objn means object id.
5. Find these objects
The following objects need recovery:
select * from dba_objects
where object_id in (89834,110769);
………………………………………………………..
This problem is Oracle Bug:9857702:
..... Affects: Product (Component) Oracle Server (Rdbms) Range of versions believed to be affected Versions >= 11.1 but BELOW 12.1 Versions confirmed as being affected •11.2.0.1 •11.1.0.7 Platforms affected Generic (all / most platforms affected) Fixed: This issue is fixed in •12.1 (Future Release) •11.2.0.2 (Server Patch Set) •11.1.0.7.8 Patch Set Update •11.1.0.7 Patch 40 on Windows Platforms .....
6. Workaround:
- Recreate objects that need recovery.
- Or drop them

Accidentally deleted Central Inventory-How to re-create it?
Details:
Users: Oracle, Grid.
Homes: /u01/app/oracle/product/11.2.0/db_1 , /u01/app/11.2.0/grid
Local inventory: /u01/app/oracle/product/11.2.0/db_1/inventory , /u01/app/11.2.0/grid/inventory
Central inventory: /u01/app/oraInventory (it was accidentally deleted )
To Check:
0.
su – oracle
1.
cd /u01/app/oracle/product/11.2.0/db_1/OPatch/
2.
./opatch lsinventory
Invoking OPatch 11.2.0.1.7
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-11-04_15-06-56PM.logOPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.
LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.OPatch failed with error code 73
To Solve:
OUI is the great tool by which you can re-create Central or Local inventories.
Find the owner of the /u01/app folder. For me it is grid.
[oracle@oracle01 ~]$ ls -la /u01
total 12
drwxr-xr-x. 3 grid oinstall 4096 Sep 10 15:36 .
dr-xr-xr-x. 27 root root 4096 Oct 24 17:20 ..
drwxr-xr-x. 6 grid oinstall 4096 Nov 4 17:43 app
Login by the same user and run:
–To attach Oracle home
[grid@oracle01 ~]$ /u01/app/oracle/product/11.2.0/db_1/oui/bin/runInstaller -silent -attachHome -invPtrLoc /etc/oraInst.loc oracle_home="/u01/app/oracle/product/11.2.0/db_1" ORACLE_HOME_NAME="OraDb11g_home1"
Starting Oracle Universal Installer…Checking swap space: must be greater than 500 MB. Actual 8191 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
‘AttachHome’ was successful.
–To attach Grid home
[grid@oracle01 ~]$ /u01/app/11.2.0/grid/oui/bin/runInstaller -silent -attachHome -invPtrLoc /etc/oraInst.loc oracle_home="/u01/app/11.2.0/grid" ORACLE_HOME_NAME="Ora11g_gridinfrahome1"
Starting Oracle Universal Installer…Checking swap space: must be greater than 500 MB. Actual 8191 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
‘AttachHome’ was successful.
Check again:
[oracle@oracle01 OPatch]$ ./opatch lsinventory -all
Invoking OPatch 11.2.0.1.7Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-11-04_18-01-36PM.logLsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2013-11-04_18-01-36PM.txt
——————————————————————————–
List of Oracle Homes:
Name Location
Ora11g_gridinfrahome1 /u01/app/11.2.0/grid
OraDb11g_home1 /u01/app/oracle/product/11.2.0/db_1Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.There are no Interim patches installed in this Oracle Home.
——————————————————————————–
OPatch succeeded.

Configure Oracle database to use SSL with self-signed certificate
You can use Oracle SSL to encrypt data exchange between Oracle database and Oracle client.
For the first time, let’s check that data is not encrypted by default when the client is selecting some info from the database.
For demonstration of this I will use WireShark.
Checking…
1. Run WireShark and highlight network card by which you use to connect to the database. For me it is "”Local Area Connection 3”.
2. click Capture Options and in Capture Filter write :
src host 192.168.171.153 and dst host 192.168.59.51 and tcp port 1521
Description: src host –is client ip
dst host – is database ip
tcp port – is the database port number
This means to capture requests from client(192.168.171.153) to the database(192.168.59.51) using tcp port 1521.
3. click Start.
4. Connect to the database and run testing select:
select *
from dual
WireShark with a lot of rows will contain the row consisting the following text, that contains our select
Configuring SSL…
Wallet configuration on DB server
0. Lets create working folder called /0 for simplicity.
mkdir /0
chmod –R 777 /0
1. Create certification request using Oracle Wallet Manager (/u01/app/oracle/product/11.2.0/db_1/bin/owm).
su – oracle
owm
2. Wallet->New
3. Enter the password, which protects wallet from opening. OK
4. Click Yes(for creating necessary folders for wallet)
5. Click Yes(for creating certification request)
6. Fill the items by your info.
7. click OK
8. Highlight certification request and from menu choose Operations->Export Certificate Request
9. Save the file with the extension .csr in /0 folder
10. Download ssl.ca-0.1.tar.gz file for to generate trusted and user certificates.
Here I want to note that trusted certificate is like a public key which will be sent to the client and user certificate is like a private key which has only the database server.
Move downloaded file to the /0 folder and extract. Then move certification request to the extracted folder.
cd /0/
tar -xvf ssl.ca-0.1.tar.gz
mv /0/CerReq.csr /0/ssl.ca-0.1/
1.10 Create a self-signed root certificate by running the new-root-ca.sh script. This will create a file called ca.crt
cd /0/ssl.ca-0.1/
./new-root-ca.sh
No Root CA key round. Generating one
Generating RSA private key, 1024 bit long modulus
…………………++++++
………………………………………………………..++++++
e is 65537 (0×10001)
Enter pass phrase for ca.key:enter the password
Verifying – Enter pass phrase for ca.key:enter the passwordSelf-sign the root CA…
Enter pass phrase for ca.key:enter the password
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [MY]:GE
State or Province Name (full name) [Perak]:. <- here is written dot (.)
Locality Name (eg, city) [Sitiawan]:Tbilisi
Organization Name (eg, company) [My Directory Sdn Bhd]:MjM
Organizational Unit Name (eg, section) [Certification Services Division]:IT
Common Name (eg, MD Root CA) []:ca_root
Email Address []:mariam.kupa@gmail.com
1.11 Create the self-signed server certificate by running the sign-server-cert.sh script.
./sign-server-cert.sh CerReq
CA signing: CerReq.csr -> CerReq.crt:
Using configuration from ca.config
Enter pass phrase for ./ca.key:enter the password for the ca
Check that the request matches the signature
Signature ok
The Subject’s Distinguished Name is as follows
commonName : .PRINTABLE:’MjM’
organizationalUnitName: .PRINTABLE:’IT’
organizationName : .PRINTABLE:’MjM’
localityName : .PRINTABLE:’Tbilisi’
countryName : .PRINTABLE:’GE’
Certificate is to be certified until Nov 5 12:40:48 2014 GMT (365 days)
Sign the certificate? [y/n]:y1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
CA verifying: CerReq.crt <-> CA cert
CerReq.crt: OK
1.12 From the wallet manager import these certificates.
Operations-> Import Trusted Certificate
Select a file that contains the certificate. click OK.
Choose ca.crt
Choose CerReq.crt
Save the wallet from the menu Wallet->Save
click OK.
Check Auto Login and Exit.
Oracle Advanced Security and listener Configuration on DB Server
1.
su – oracle
netmgr
Choose Profile->Oracle Advanced Security-> SSL
choose server
Fill the items as it is shown on the picture, except that you should indicate your own wallet location. For me it is /u01/app/oracle/product/11.2.0/db_1/owm/wallets/oracle
Click File->Save Network Configuration.
2. Change listener entry on the database server by adding port 2484 using protocol TCPS :
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = orcl)
)
)SSL_CLIENT_AUTHENTICATION = FALSE
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/product/11.2.0/db_1/owm/wallets/oracle)
)
)LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server.gov.ge)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCPS)(HOST = server.gov.ge)(PORT = 2484))
)
)ADR_BASE_LISTENER = /u01/app/oracle
Look at the highlighted section , I am using 2484 as a port number ,which is Oracle recommended port for SSL , and TCPS as a protocol .
Restart the listener
lsnrctl stop
lsnrctl start
Client Configuration
1. Do the same steps as we did on the database server.
1.1 Create new wallet
1.2 Create certificate request
1.3 Copy trusted certificate, which we have generated on the database server
1.4 Import only trusted certificate.
1.5 Save
1.6 Check Auto Login and Save.
2. Run Network Manager
2.1 Profile->Oracle Advanced Security –>SSL
choose client.
Fill items as it is shown on the picture(indicate your wallet location)
3. Configure tnsnames.ora by the following entry:
orcl_ssl=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCPS)(HOST = server.gov.ge)(PORT = 2484))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Check again by WhireShark.
You will see that no rows will contain clear words. Everything is encrypted.
Note: If you have any certification validation failure errors, first try to stop listener and start again..or write me on the comment and I will try to help you.

Upgrade 10g XE to 11g XE
I’ve had a lot of trouble with 10g XE. Especially with its upgrading process to 11g XE. So I want to share my experience with you.
There are at least 2 options to do the upgrade.
First one is backup/restore and second one is export/import.
Note: I ‘ve installed 10g XE and 11g XE on separate servers(because couldn’t handle to install them together)
Note2: The 1st one doesn’t worked for me and is described shortly. The 2nd one worked for me and is fully descriptive.
1. Take utlu112i.sql script from 11g XE and place it on 10g XE server.
2. Run this script on 10g XE.
Go to the gen_inst.sql file location or indicate a full path to the file:
sqlplus sys as sysdba @gen_inst.sql
3. Backup 10g XE database.
4. Restore to 11g XE
5. Startup upgrade.
6. Run the following scripts on 11g XE.
–Upgrade
sqlplus sys as sysdba @catupgrd.sql
–Recompile
sqlplus sys as sysdba @utlrp.sql
BUT these steps that are described on most of the blogs and sites did not work for me.
Another option that worked for me is export/import.
1. Take gen_inst.sql script from 11g XE.
2. Place and run this script on 10g XE.
sqlplus sys as sysdba @gen_inst.sql
It will generate install.sql
, gen_apps.sql
and other .sql
files
3. On 10g XE
CREATE DIRECTORY DUMP_DIR AS ‘C:\oraclexe\dump_dir’;
GRANT read, write ON DIRECTORY DUMP_DIR TO public;
expdp ‘sys/passwd as sysdba’ full=Y EXCLUDE=SCHEMA:\"LIKE \’APEX_%\’\",SCHEMA:\"LIKE \’FLOWS_%\’\" directory=DUMP_DIR dumpfile=DB10G.DMPlogfile=expdpDB10G.log
expdp ‘sys/passwd as sysdba’ TABLES=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ directory=DUMP_DIR dumpfile=DB10G2.dmp logfile=expdpDB10G2.log
Note: if ‘sys/passwd as sysdba’ doesn’t work try without it and then enter the credentials.
expdp full=Y EXCLUDE=SCHEMA….
Username: sys@XE as sysdba
Password: *****
4. Import to 11g XE
CREATE DIRECTORY DUMP_DIR AS ‘C:\oraclexe\dump_dir’;
GRANT read, write ON DIRECTORY DUMP_DIR TO public;impdp ‘sys/passwd as sysdba’ full=Y directory=DUMP_DIR dumpfile=DB10G.DMP logfile=expdpDB10G1.log
impdp ‘sys/passwd as sysdba’ directory=DUMP_DIR TABLE_EXISTS_ACTION=APPEND TABLES=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ dumpfile=DB10G2.DMP logfile=expdpDB10G1b.log
5. Run install.sql. It will run other scripts itself.
sqlplus sys as sysdba @install.sql

How to reset SYSASM password
By sysasm user can maintain ASM instance. The main idea is to separate storage administrator and database administrator responsibilities. To reset its password, do the following:
[oracle@r1n1 ~]$ . oraenv
ORACLE_SID = [orcl1] ? +ASM1
The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/oracle[oracle@r1n1 ~]$ asmcmd
ASMCMD> orapwusr –modify –password sys
Enter password: ********

Add/Drop ASM disks to DISKGROUP on RAC(or Standalone)
Note: The steps are described for RAC, but you can easily guess what are the steps for the standalone database.
1. First of all find the disk or partition name, that should be added to the ASM.
fdisk -l
My disk partition name is /dev/sdi1.
2. Assign the disk to ORACLEASM.
–On node1
/etc/init.d/oracleasm createdisk DISK7 /dev/sdi1
3. Scan disks in ALL NODES and list them to check if is presented.
–On node1
/etc/init.d/oracleasm scandisks
/etc/init.d/oracleasm listdisks
–On node2
/etc/init.d/oracleasm scandisks
/etc/init.d/oracleasm listdisks
4. Change the environment to the grid infrastructure, by setting ORACLE_SID to +ASM and so on :
$ . oraenv
ORACLE_SID = [media1] ? +ASM1
The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/oracle
# Connect as an SYSASM
sqlplus / as sysasm
Note: If you don’t remember the password for the sysasm user see How to reset SYSASM password.
# Find the diskgroup name
SQL> select name from v$asm_diskgroup;
NAME
——————————
DATA01
# Increase power limit, if you want, to complete rebalance operation in a short time.
SQL> alter system set asm_power_limit=10
# Indicate disks location by the parameter asm_diskstring
SQL> alter system set asm_diskstring=’ORCL:DISK*’
SQL> alter diskgroup DATA01 add disk ‘ORCL:DISK7′;
It will do the rebalance automatically.
# To drop the disk , do the following:
SQL > alter diskgroup DATA01 drop disk DISK7;
It will rebalance first and then drops the disk automatically.
You can see the current operation in v$asm_operation view.
Note: Until the view v$asm_operation contains a record you are able to undrop the disks by the following way:
SQL> alter diskgroup DATA01 undrop disks;
If the operation is already completed , you are not able to undrop the disk . But you can re-add the disk , if you want.
That is all.

DBMS_SQLPA – PACKAGE BODY – INVALID 10g
To resolve the issue, do the following:
1. Connect as SYSDBA
$ sqlplus / as sysdba
2. Drop plan table
SQL> drop table plan_table;
Table dropped.
3. Recreate plan table
SQL> @?/rdbms/admin/utlxplan
Table created.
4. Re-create dbms_sqlpa package and public synonym
SQL> @?/rdbms/admin/prvtspao.plb
PL/SQL procedure successfully completed.
Package created.
No errors.
Synonym created.
No errors.
Package body created.
No errors.
5. Recompile all objects
SQL> @?/rdbms/admin/utlrp.sql

PIN_PACKS-TRIGGER-INVALID, DBMS_SHARED_POOL.KEEP must be declared 10g
Oracleasm deletedisk failed Unable to clear disk
I’ve deleted disk from ASM diskgroup:
ALTER DISKGROUP DATA01 DROP DISK DISK6;
After it finished dropping the disk and all extents were moved to the remaining disks, I tried to delete disk from the ASM library and return it to the system:
oracleasm deletedisk -v DISK6
Clearing disk header: oracleasm-write-label: Unable to open device "/dev/oracleasm/disks/DISK6": Device or resource busy
failed
Unable to clear disk "DISK6"
The reason is that oracle leaves the disk open even after removing it from the diskgroup.
There are two solutions:________________________________________________
1. One for 24/7 databases:
–Find the device name
[root@r2n1 ~]# blkid |grep oracleasm
/dev/sdd1: LABEL="DISK6" TYPE="oracleasm"
–Clear the device header manually
Make sure, you use the right device name. If you specify wrong device name, the operation is unrecoverable.
su –
dd if=/dev/zero of=/dev/sdd1 bs=1024 count=100
or
dd if=/dev/zero of=/dev/oracleasm/disks/DISK6 bs=1024 count=100
If you have RAC system , run dd on all nodes.
Another solution:
1. Reboot the server
# reboot
Or
Restart database instance and CRS services
–Shutdown database
$ export ORACE_SID=orcl
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
$ sqlplus / as sysdba
SQL> shutdown immediate;
–Shutdown CRS services
./crsctl stop crs
–Start CRS services
./crsctl start crs
–Start database
$ export ORACE_SID=orcl
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
$ sqlplus / as sysdba
SQL> startup;
2. Then delete the disk.
oracleasm deletedisk -v DISK6

Configure Oracle 11g database to connect with AD(Domain) user using Kerberos5
Problem:
Application config files contain plain text passwords. Which is insecure and should be changed to encrypted passwords or not indicate them at all :)
The last solution can be achieved by KERBEROS authorization. So users will connect to the database using Active Directory user and will not indicate username/password. Like it happens in SQL Server with Windows Authorization.
So at the end of this post domain user connected to the windows computer will be able to connect to the database without indicating username and password.
========Details==============
AD Server:
Ip: 192.168.11.10
Hostname: ADSERVER.DOMAIN.GE
Realm: DOMAIN.GE
===========================
Database Server:
Ip: 192.168.11.15
Hostname: DBSERVER.DOMAIN.GE
Database Name/SID: ORCL
===========================
Client:
Ip: 192.168.11.20
Domain User: MARIAMI.DOMAIN.GE
Client Home: D:\app\oracle\product\11.2.0\client_1
===========================
Let’s start..
========AD configuration
1. Under DOMAIN.GE /Users create a new user with the same name as the hostname of the database (with lowercase letters).
First name : dbserver.domain.ge
Fill name : dbserver.domain.ge
User logon name : dbserver.domain.ge
User logon name (pre-Windows 2000): DOMAIN \ dbserver.domain.ge
Next >
I prefer to check “Password never expires” and uncheck “User must change password at next logon“
Next >
Finish
Right click on the newly created user , choose Properties -> choose tab Account ->in Account options section -> check “Do not require Kerberos preauthentication“
2. Generate keytab file using ktpass.exe
ktpass.exe -princ oracle/dbserver.domain.ge@DOMAIN.GE -ptype KRB5_NT_PRINCIPAL -mapuser dbserver.domain.ge -crypto ALL -pass qwert123QWERT -out d:\keytab
========Database Server Configuration
export ORACLE_SID=ORCL
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
export TNS_ADMIN=/u01/app/oracle/product/11.2.0/db/network/adminmkdir -p $TNS_ADMIN/kerberos
Copy keytab file generated on AD server and place it in $TNS_ADMIN/kerberos/ location.
Create krb5.conf file.
vim $TNS_ADMIN/kerberos/krb5.conf
[libdefaults]
default_realm = DOMAIN.GE[realms]
DOMAIN.GE = {
kdc = adserver.domain.ge:88
}[domain_realm]
.domain.ge = DOMAIN.GE
domain.ge = DOMAIN.GE
File is case sensitive :) try to not make case sensitive errors. AD server hostname is in lowercase letters.
So $TNS_ADMIN/kerberos/ contains two files:
ls $TNS_ADMIN/kerberos/
keytab krb5.conf
Configure sqlnet.ora file.
Note that at this time if you mistakenly configure sqlnet.ora file , connections to the database will cause error. Be very careful when configuring on production server. But you can solve this error in 3 seconds , by replacing new sqlnet.ora with old sqlnet.ora or just change parameter
SQLNET.AUTHENTICATION_SERVICES= (BEQ, KERBEROS5)
to
SQLNET.AUTHENTICATION_SERVICES= (BEQ)
vim $TNS_ADMIN/sqlnet.ora
SQLNET.KERBEROS5_KEYTAB = /u01/app/oracle/product/11.2.0/db/network/admin/kerberos/keytabSQLNET.AUTHENTICATION_SERVICES= (BEQ, KERBEROS5)
SQLNET.KERBEROS5_CONF = /u01/app/oracle/product/11.2.0/db/network/admin/kerberos/krb5.conf
SQLNET.KERBEROS5_CONF_MIT = TRUE
SQLNET.AUTHENTICATION_KERBEROS5_SERVICE = oracle
ADR_BASE = /u01/app/oracle
SQLNET.KERBEROS5_CC_NAME=/u01/app/oracle/product/11.2.0/db/network/admin/kerberos/cache_file
#TRACE_LEVEL_SERVER = SUPPORT
#TRACE_UNIQUE_SERVER = on
#TRACE_DIRECTORY_SERVER = /u01/app/oracle/traces
#TRACE_FILE_SERVER = server
DIAG_ADR_ENABLED = OFF
#TRACE_TIMESTAMP_SERVER = ON
Note: I have commented TRACE_* parameters , because it is not necessary if everything is OK , but if connection fails then you will need these parameters to be uncommented to generate more informative trace file to solve the problem.
Connect to the database via sqlplus and create database user corresponding to the domain user, using uppercase letters.
sqlplus / as sysdba
create user “MARIAMI.DOMAIN.GE” identified externally.
grant connect, resource to “MARIAMI.DOMAIN.GE”;
ALTER SYSTEM SET os_authent_prefix=” SCOPE=SPFILE;
ALTER SYSTEM SET remote_os_authent=FALSE SCOPE=SPFILE;
shutdown immediate;
startup;
Generate ticket
$ okinit -e 23 -f dbserver.domain.ge
Enter the password of dbserver.domain.ge username , in our case qwert123QWERT.
Note, it will generate a cache file called cache_file(SQLNET.KERBEROS5_CC_NAME parameter in sqlnet). It has expire time (8 hours) and after it is passed , connection to the database without password will not work. So you will need a cronjob to run the above command every 7 or less hours. But for now you have 8 hours to configure kerberos and test the connection.. )
========Client Configuration
1. Configure sqlnet.ora
SQLNET.AUTHENTICATION_KERBEROS5_SERVICE = oracle
SQLNET.KERBEROS5_CONF_MIT = true
SQLNET.KERBEROS5_CC_NAME=OSMSFT://
DIAG_ADR_ENABLED = OFF
SQLNET.AUTHENTICATION_SERVICES= (beq, kerberos5)
SQLNET.KERBEROS5_CONF = d:\app\oracle\krb5.ini
#TRACE_LEVEL_CLIENT = SUPPORT
#TRACE_UNIQUE_CLIENT = on
#TRACE_DIRECTORY_CLIENT = D:\app\oracle
#TRACE_FILE_CLIENT = client
#TRACE_TIMESTAMP_CLIENT = ON
#SQLNET.KERBEROS5_KEYTAB = C:\krb5\v5srvtab
2. Copy krb5.conf file content from db server and name it as .ini instead of .conf
–krb5.ini
[libdefaults]
default_realm = DOMAIN.GE[realms]
DOMAIN.GE = {
kdc = adserver.domain.ge:88
}[domain_realm]
.domain.ge = DOMAIN.GE
domain.ge = DOMAIN.GE
3. tnsnames.ora , nothing special.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.15)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)
4. Add kerberos5 in C:\windows\system32\drivers\etc\services:
Before:
kerberos 88/tcp krb5 kerberos-sec #Kerberos
kerberos 88/udp krb5 kerberos-sec #Kerberos
After:
kerberos 88/tcp kerberos5 krb5 kerberos-sec #Kerberos
kerberos 88/udp kerberos5 krb5 kerberos-sec #Kerberos
Try to connect without password. /@ORCL together.
sqlplus /@ORCL
With PL/SQL Developer , do not indicate username and password just sid and try to connect. I have noticed that PL/SQL Devloper version 9 doesn’t worked for me version 10 worked.
Note: If you are using shared servers and during connecting to the database returns ORA-01017: invalid username/password; logon denied. The problem may be the following, that you changed sqlnet.ora after instance startup. The problem is that shared servers read sqlnet.ora just before instance startup, so if you change any parameters in sqlnet.ora file after instance startup then shared servers will not recognize it. The only solution is to restart database, to re-read sqlnet.ora file.

Accidentally deleted Central Inventory-How to re-create it?
Details:
Users: Oracle, Grid.
Homes: /u01/app/oracle/product/11.2.0/db_1 , /u01/app/11.2.0/grid
Local inventory: /u01/app/oracle/product/11.2.0/db_1/inventory , /u01/app/11.2.0/grid/inventory
Central inventory: /u01/app/oraInventory (it was accidentally deleted )
To Check:
0.
su – oracle
1.
cd /u01/app/oracle/product/11.2.0/db_1/OPatch/
2.
./opatch lsinventory
Invoking OPatch 11.2.0.1.7
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-11-04_15-06-56PM.logOPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.
LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.OPatch failed with error code 73
To Solve:
OUI is the great tool by which you can re-create Central or Local inventories.
Find the owner of the /u01/app folder. For me it is grid.
[oracle@oracle01 ~]$ ls -la /u01
total 12
drwxr-xr-x. 3 grid oinstall 4096 Sep 10 15:36 .
dr-xr-xr-x. 27 root root 4096 Oct 24 17:20 ..
drwxr-xr-x. 6 grid oinstall 4096 Nov 4 17:43 app
Login by the same user and run:
–To attach Oracle home
[grid@oracle01 ~]$ /u01/app/oracle/product/11.2.0/db_1/oui/bin/runInstaller -silent -attachHome -invPtrLoc /etc/oraInst.loc oracle_home="/u01/app/oracle/product/11.2.0/db_1" ORACLE_HOME_NAME="OraDb11g_home1"
Starting Oracle Universal Installer…Checking swap space: must be greater than 500 MB. Actual 8191 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
‘AttachHome’ was successful.
–To attach Grid home
[grid@oracle01 ~]$ /u01/app/11.2.0/grid/oui/bin/runInstaller -silent -attachHome -invPtrLoc /etc/oraInst.loc oracle_home="/u01/app/11.2.0/grid" ORACLE_HOME_NAME="Ora11g_gridinfrahome1"
Starting Oracle Universal Installer…Checking swap space: must be greater than 500 MB. Actual 8191 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
‘AttachHome’ was successful.
Check again:
[oracle@oracle01 OPatch]$ ./opatch lsinventory -all
Invoking OPatch 11.2.0.1.7Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-11-04_18-01-36PM.logLsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2013-11-04_18-01-36PM.txt
——————————————————————————–
List of Oracle Homes:
Name Location
Ora11g_gridinfrahome1 /u01/app/11.2.0/grid
OraDb11g_home1 /u01/app/oracle/product/11.2.0/db_1Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.There are no Interim patches installed in this Oracle Home.
——————————————————————————–
OPatch succeeded.
