Thursday, June 18, 2015

ORA-01722 while database upgrade.


SQL> SELECT TO_NUMBER('LABEL_SECURITY_OPTION_OFF') FROM v$option
  2  WHERE value = 'FALSE' and parameter =
  3        (SELECT 'Oracle Label Security' FROM user$ where name = 'DVSYS');
SELECT TO_NUMBER('LABEL_SECURITY_OPTION_OFF') FROM v$option
                 *
ERROR at line 1:
ORA-01722: invalid number


I found the following on MOS: Upgrade Fails With ORA-01722 When Upgrading A Database With Data Vault (Doc ID 1147895.1)

Fix: Install Oracle Label Security (which should enable OLS by default), link Data Vault off with the dv_off target (if not already done), and then peform the upgrade. Data Vault can be linked back on (with the dv_on target) after the upgrade is completed.

I did the following, after which upgrade completed fine

chopt enable lbac
$ chopt enable lbac

Writing to /opt/app/oracle/product/11.2.0.4/install/enable_lbac.log...
/usr/bin/make -f /opt/app/oracle/product/11.2.0.4/rdbms/lib/ins_rdbms.mk lbac_on ORACLE_HOME=/opt/app/oracle/product/11.2.0.4/
/usr/bin/make -f /opt/app/oracle/product/11.2.0.4/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/opt/app/oracle/product/11.2.0.4/


$ make -f ins_rdbms.mk dv_off
/usr/bin/ar cr /opt/app/oracle/product/11.2.0.4/rdbms/lib/libknlopt.a /opt/app/oracle/product/11.2.0.4/rdbms/lib/kzvndv.o

Wednesday, June 10, 2015

How to Install Oracle GoldenGate 12C (12.1.2.1)

1) Download Oracle GoldenGate 12c (12.1.2.1) binaary “121210_fbo_ggs_Linux_x64_shiphome.zip”, and unzip it. One  directory and two files created as below:
$unzip 121210_fbo_ggs_Linux_x64_shiphome.zip
$ ls -ltr
drwxrwx—. 1 root vboxsf 0 Aug 8 2014 fbo_ggs_Linux_x64_shiphome
-rwxrwx—. 1 root vboxsf 1540 Aug 11 2014 OGG-12.1.2.1.0-README.txt
-rwxrwx—. 1 root vboxsf 246718 Aug 11 2014 OGG-12.1.2.1.0-ReleaseNotes.pdf
2)Run runInstaller:
$ cd fbo_ggs_Linux_x64_shiphome
$ cd Disk1
$ ./runInstaller
Capture_1

3) Select the option for Oracle GoldenGate for Oracle Database 12c.
If you select the option for Database 11g, the installation will be valid but will not start against an 11g database due to shared libraries needed (libnnz12.so ).  Support version for Integrated Replicat is Oracle 11g (11.2.0.4).
Capture2

4)Review the Summary screen:
Capture3
5) Start to install with processing details:
Capture4
6)The installation is complete:
Capture5
7) Unlike previous version of Oracle GoldenGate, for 12c OGG installation, the oraInventory is updated accordingly as below:
[oracle@racnote1 ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
 <SAVED_WITH>11.2.0.3.0</SAVED_WITH>
 <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.1.0/dbhome_1" TYPE="O" IDX="1"/>
<HOME NAME="OraHome1" LOC="/u01/app/oracle/product/12.1.2/oggcore_1" TYPE="O" IDX="2"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
8) Check Manager process has been stated:
$ . oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@racnote1 oggcore_1]$ cd /u01/app/oracle/product/12.1.2/oggcore_1
$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.1.0 OGGCORE_12.1.2.1.0_PLATFORMS_140727.2135.1_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Aug 7 2014 10:21:34
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
GGSCI (racnote1) 2> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (racnote1) 3>
9) Check parameter  file:
$ cd dirprm
$ ls -ltr
total 8
-rwxr-x---. 1 oracle oinstall 103 Aug 7 2014 jagent.prm
-rw-r--r--. 1 oracle oinstall 9 Mar 29 22:48 mgr.prm
$ cat mgr.prm
PORT 7809
10) The 12c installation is simple and straight away,  there is no need to run “CREATE SUBDIRS”, because the OUI does all. It is pretty good.
11) Uninstall Oracle GoldenGate Installation
cd $OGG_HOME
cd deinstall
./deinstall.sh
Check oraInventory and confirm $OGG_HOME has been removed  from inventory.
$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
 <SAVED_WITH>11.2.0.3.0</SAVED_WITH>
 <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.1.0/dbhome_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>