2012-04-24

Installing BusinessObjects Data Services 4.0 on AIX

Summary

This post describes installation of BusinessObjects Data Services 4.0 in test environment.
SAP BusinessObjects Information Platform Services 4.0 (IPS) is required component to install BODS.

Official product names (as on SAP support website):
(SBOP INFORMATION PLAT SVCS 4.0) - SAP BusinessObjects Information Platform Services 4.0
(SBOP DATA SERVICES 4.0) - SAP BusinessObjects Data Services 4.0 (14.0.1)
(SBOP DS DESIGNER 4.0) - SBOP Data Services Designer for 4.0

Environment

OS: UNIX AIX 6.1 TL6 SP2
Database: Oracle 11.2.0.3
SBOP Data Services 4.0 SP02 Patch3

All BODS components and Oracle database are on the same host.
BO and Oracle installations are owned by different UNIX users.

Prerequisites

Authorise user (pocadm) to use UNIX cron.
Verify that all ports to be used by BO are available.
For more details use BODS Installation Guide for UNIX (sbo401_ds_install_unix_en.pdf).

Locale requirements problems

Set variables according to documentation:
export LANG=en_US.utf8
export LC_ALL=en_US.utf8

pocadm@host01:/deve/TEST01/POC/software/IPS$./setup.sh
The UTF-8 locale is not recognized by Perl. Please set a valid UTF-8 locale in $LC_ALL.
Please consult setlocale(3) for the list of available locales on your system.
If that fails, please try the following commands:
    locale -a
    nlsinfo
    ls /usr/lib/nls/loc
    ls /usr/lib/locale
    ls /usr/lib/nls
    ls /usr/share/locale

pocadm@host01:/deve/TEST01/POC/software/IPS$locale -a
C
POSIX
de_DE.8859-15@euro
de_DE.8859-15@preeuro
de_DE.8859-15
de_DE.IBM-1252@euro
de_DE.IBM-1252@preeuro
de_DE.IBM-1252
de_DE.ISO8859-1
de_DE
en_US.8859-15
en_US.ISO8859-1
en_US

The current AIX 6.1 TL6 SP2 does not have locale UTF-8
There is no bos.loc.com.utf on the lpp_source_6162_bund that was supplied for AIX 6.1 TL6 SP2

If LC_ALL is set to non UTF-8 existing locale, e.g. LC_ALL=en_US, setup.sh returns:
Non-UTF-8 locale is detected in LC_ALL.

Locale requirements solution

Only bos.loc.com.utf for AIX 6.1 TL4 is found.
EN_US.UTF-8 for AIX 6.1 TL4 was installed on host01 (AIX 6.1 TL6)

locale -a
C
POSIX
EN_US.UTF-8
EN_US
de_DE.8859-15@euro
de_DE.8859-15@preeuro
de_DE.8859-15
de_DE.IBM-1252@euro
de_DE.IBM-1252@preeuro
de_DE.IBM-1252
de_DE.ISO8859-1
de_DE
en_US.8859-15
en_US.ISO8859-1
en_US

Use the following variables. They are different from SAP documentation (UTF-8 instead of utf8).
They are case sensitive and have to match “locale -a”
export LANG=EN_US.UTF-8
export LC_ALL=EN_US.UTF-8

Configuring Oracle database

Oracle database for BO repositories must have character set UTF-8
Create new tablespace SAP_BO.
Create Oracle user for Central Management Server (CMS) repository.
CREATE USER "BO_CMS" PROFILE "DEFAULT" IDENTIFIED BY "BO_CMS" DEFAULT TABLESPACE "SAP_BO" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "SAP_BO" ACCOUNT UNLOCK;
GRANT CREATE VIEW TO "BO_CMS";
GRANT "CONNECT" TO "BO_CMS";
GRANT "RESOURCE" TO "BO_CMS";

Configuring Oracle Client

For BO owner (pocadm) add $ORACLE_HOME to .profile and $ORACLE_HOME/bin into $PATH
Add $ORACLE_HOME/lib into $LIBPATH
export LIBPATH=$ORACLE_HOME/lib:/usr/lib:/lib

Configure tnsnames.ora. Test sqlplus connection from UNIX user (pocadm) to Oracle database (SAP_BO@repdb01).
As everything is on the same host, database Oracle home is used as Oracle client.

Installing IPS

IPS has to be installed before BO Data Services.
You have to install base release first and then patch it.
Download base release of IPS from SAP website:
51041259_part1.exe
51041259_part2.rar

Unpack them on PC and copy to UNIX (I didn’t have unrar on AIX).
pwd
/deve/TEST01/POC/software/IPS
chmod -R u+rx 51041259
cd /deve/TEST01/POC/software/IPS/51041259/DATA_UNITS/SBOP_INFO_PLAT_SVCS_40_AIX64

Do not run ./setup.sh. This will require separate product key. BTW, temporary key of “BI (Business Intelligence) Platform - BI 4.0” is accepted.
For IPS as a part of Data Services, run InstallIPS:

./InstallIPS
Destination directory chosen in the following step will be used for Data Services installation as well. Both components are installed into the same directory.

  1. Specify the destination folder
destination folder: /deve/TEST01/POC/BODS4/

  1. Prerequisite checking
Summary of the missing critical and optional prerequisites
Succeeded: Cannot be installed on the same machine as SAP BusinessObjects BI platform (Critical)
Succeeded: Minimum patch level requirements for OS (Optional)
Succeeded: Bundled DB - user's home directory must have minimum mode of 755 (Optional)
Succeeded: Bundled DB - these directories cannot exist: ~/sqllib and ~/$USER (Optional)
Succeeded: Bundled DB - the gunzip utility needs to be on the system path (Optional)
Succeeded: Check for required disk space in /tmp (Critical)
Succeeded: Bundled DB - meet restrictions on UID and GID (Optional)
Succeeded: Bundled DB - meet restrictions on the user's ID and primary group (Optional)
Succeeded: Validate network settings (Critical)
Succeeded: Platform Memory Architecture Requirement (Critical)
Succeeded: Root User Rights (Critical)

  1. Licence
  2. Product Key is automatically inserted, just hit Enter
  3. Language – English
  4. Select a user install or a system install
System install requires root access to run initialization scripts after install
 1  -   User install - regular Information Platform Services installation
 2  -   System install - user install plus system initialization scripts

  1. Choose Install Type
1  -   Full
2  -   Custom / Expand
3  -   Web Tier

  1. Select Features
Please select which features you would like to install.
-[~]Instances
  +[X]WebTier
  -[~]Platform Services
     [X]Central Management Server
     [X]File Repository Server
     [ ]Integrated Database
     [X]Platform Processing Services
     [X]Platform Scheduling Services
     [X]Client Auditing Proxy Processing Service
     [X]Lifecycle Management Processing Services
     [X]Monitoring Processing Service
     [X]Security Token Service
    +[X]Advanced Analysis Services
     [X]System Landscape Directory - Data Supplier
     [X]Destination Scheduling Service
     [X]Program Scheduling Service
     [X]Subversion
  -[X]Administrator Tools
     [X]Upgrade management tool
  +[ ]Database Access

Unselect Integrated Database as we plan to use Oracle.
Unselect Database Access as we are not planning to plug into JD Edwards, Oracle EBS, etc

  1. Choose new deployment:
1  -   Start a new Information Platform Services deployment
2  -   Expand an existing Information Platform Services deployment. (Requires a remotely installed CMS)

  1.  Select existing CMS Database Type
Specify the database type to use for the CMS repository
 1  -   MySQL
 2  -   IBM DB2
 3  -   Oracle
 4  -   MaxDB
 5  -   Sybase

  1. Select existing Auditing Database Type
Specify the database to use for the Auditing Database.  Select No Auditing Database to configure auditing at a later time.
 1  -   MySQL
 2  -   IBM DB2
 3  -   Oracle
 4  -   MaxDB
 5  -   Sybase
 6  -   No Auditing Database

  1. SIA and Smart Server Configuration
Enter the SIA port and listing port range for Smart Servers
Node Name
[host01                                                    ]
SIA Port
[6410  ]

  1. Configure Central Managament Server
Enter the port number to use for the new CMS
CMS Port
[6400  ]

  1. Configure CMS Account
Specify the new password for the CMS Administrator account, and a value for the CMS Cluster Key.
Administrator Account Password:
[********                                                    ]
Confirm Password:
[********                                                    ]
Cluster Key:
[********                                                    ]
Confirm Cluster Key:
[********                                                    ]

  1. Configure CMS Repository Database - Oracle
Enter details for the database to use for storing CMS information.
Oracle TNSNAME
[repdb01                                                    ]
Username
[BO_CMS                                                      ]
Password
[******                                                      ]
Reset existing database (1 = yes, 0 = no)
[1]

  1. Choose to start or stop servers
Start the servers after installation?
 1  -   Yes
 2  -   No

  1. Configure Tomcat
Enter the port information for Tomcat application server
Connection Port
[8080  ]
Shutdown Port
[8005  ]
Redirect Port
[8443  ]

  1. Subversion Configuration
Subversion will installed and used as the version control system for Lifecycle Manager. Provide the port and user name for Subversion.
Repository (LCM_repository) Port
[3690  ]
Repository User (LCM) Password
[*********                                                   ]
Confirm Password
[*********                                                   ]

  1. Configure Connectivity to SMD (Solution Manager Diagnostics) Agent
Enable connectivity to SMD Agent
 1  -   Do not configure connectivity to SMD Agent.
 2  -   Configure connectivity to SMD Agent. You will be prompted for information.

  1. Introscope Integration
Enable connectivity to Introscope Enterprise Manager
 1  -   Do not integrate connectivity to Introscope Enterprise Manager.
 2  -   Integrate connectivity to Introscope Enterprise Manager. You will be prompted for information.

This installation is (BuildVersion=14.0.2.364.)
After installation try to login to CMC http://host01:8080/BOE/CMC as Administrator.

Patching IPS

Download and unpack IPS_4.0_SP02_patch14
Do not use AIX tar command as it causes the following error:
tar: can't create ././@LongLink: Permission denied

Cause: TDI uses AIX tar which has a limitation on the maximum buffer size. The prefix buffer can be a maximum of 155 bytes and the name buffer can hold a maximum of 100 bytes. If the path name cannot be split into these two parts by a slash, it cannot be archived.

Install and use GNU version of tar: /opt/freeware/bin/tar
gunzip INFOPLATSVCS02P_14-20007540.TGZ
/opt/freeware/bin/tar -xvf INFOPLATSVCS02P_14-20007540.tar

cd /deve/TEST01/POC/software/IPS_patch
./setup.sh InstallDir=/deve/TEST01/POC/BODS4

  1. Setup Language
Please choose setup language
 1  -   English

  1. Specify the destination folder
The destination folder is where the product was or will be installed. Please enter the full path.
Destination Folder
[/deve/TEST01/POC/BODS4/                                     ]

  1. Prerequisite checking
Summary of the missing critical and optional prerequisites
Succeeded: Detect updates are applicable (Optional)
Succeeded: Detect Information Platform Services 4.0 installed (Critical)
Succeeded: Root User Rights (Critical)

  1. Existing CMS Deployment Information
Specify the CMS and Administrator logon information of your existing CMS deployment.
CMS Name
[host01                                                    ]
CMS Port
[6400  ]
User
[Administrator                                               ]
Password
[*********                                                   ]

  1. Start Installation
Are you ready to have the Information Platform Services 4.0 SP2 Patch 14 Installation Wizard begin the install?

Installing BODS

Create oracle user for local repository
CREATE USER "BO_REPO1" PROFILE "DEFAULT" IDENTIFIED BY "BO_REPO1" DEFAULT TABLESPACE "SAP_BO" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "SAP_BO" ACCOUNT UNLOCK;
GRANT CREATE VIEW TO "BO_REPO1";
GRANT "CONNECT" TO "BO_REPO1";
GRANT "RESOURCE" TO "BO_REPO1";

Download and copy SAP BusinessObjects Data Services 4.0 Support Pack 2 Patch 3 (DATASERV02P_3-10010590.TGZ).

You don’t have to install base release of BODS 4.0 as if  there  is  no  version  of  Data  Services  already  installed  on  the  system,  BODS4.0SP02patch3  will  go  through  the normal full installation.

Use GNU version of tar: /opt/freeware/bin/tar
gunzip DATASERV02P_3-10010590.TGZ
/opt/freeware/bin/tar -xvf DATASERV02P_3-10010590.tar

cd /deve/TEST01/POC/software/BODS4.0
InstallDir has to be the same as IPS installation:
./setup.sh InstallDir=/deve/TEST01/POC/BODS4

  1. Setup Language
Please choose setup language
 1  -   English

  1. Specify the destination folder
The destination folder is where the product was or will be installed. Please enter the full path.
Destination Folder
[/deve/TEST01/POC/BODS4/                                ]

  1. Prerequisite checking
Summary of the missing critical and optional prerequisites
Succeeded: Minimum patch level requirements for OS (Optional)
Succeeded: Existing Data Services version (Critical)
Missing: SAP HostAgent (Optional)
         Reason: The SAP HostAgent was not detected. You will not be able to integrate Data Services with SLD
during installation.
Succeeded: Platform Memory Architecture (Critical)
Succeeded: SAP BusinessObjects Enterprise (Optional)
Succeeded: SAP BusinessObjects Enterprise Version (Critical)
Succeeded: Root User Rights (Critical)

  1. License Agreement

  1. User Information
Please fill in your product key to proceed
Product Keycode: xxxx-xxxx-xxxx
 (Temporary key is used)

  1. Choose Language Packs
A language pack gives the product the ability to interact with users in a specific language.
[X]  English
[ ]  Japanese
[ ]  Turkish

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Select DataServices Installed with CMS Server or not.
 1  -   Install DataServices with CMS Server
 2  -   Install DataServices without CMS Server

  1. SAP BusinessObjects Enterprise Server Login
SAP BusinessObjects Enterprise Server (CMS)
System:
[host01                                                    ]
User:
[Administrator                                               ]
Password:
[*********                                                   ]
Authentication mode (Enterprise is the only allowed value)
[Enterprise]

  1. Select Features
Please select which features you would like to install.
-[~]BusinessObjects Data Services
  -[X]Data Services Server
     [X]Job Server
     [X]AccessServer
   [X]Data Services Management Console
  -[X]Data Services APS Services
     [X]Data Services RFC Server Service
     [X]Data Services Administrator Service
     [X]Data Services Metadata Browsing Service
     [X]Data Services View Data Service
   [X]Data Services MessageClient
  -[~]Text Data Processing Languages
     [ ]French
     [ ]German
     [ ]Japanese
     [ ]Simplified Chinese
     [ ]Spanish
   [X]DataDirect ODBC Drivers
   [X]Data Services Documentation

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Specify if you would like to use existing DataServices configuration (DSConfig.txt)
 1  -   Skip configuration
 2  -   Reuse existing DataServices configuration

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Repository Selection
 1  -   Use an existing database
 2  -   Skip configuration

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Local Repository Database Type
 1  -   Oracle
 2  -   DB2
 3  -   MySQL
 4  -   Sybase ASE
 5  -   Oracle RAC

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Local Repository Location
Repository name for CMS registry
[edw_repo1                                                   ]
Please specify the oracle client install location 'ORACLE_HOME'
[/oracle/rdbms/11.2.0/orax01                                 ]
Oracle TNSNAME
[repdb01                                                    ]
Database port
[1526  ]
SID
[repdb01                                                    ]
Repository host server name
[host01                                                    ]
User ID
[BO_REPO1                                                    ]
Password
[********                                                    ]

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Which operation do you want to do for the local repository
 1  -   Create

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Configure Job Server
 1  -   Configure a new Job Server
 2  -   Skip Job Server configure

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Configure a new Job Server
Job Server name
[JobServer_1                                                 ]
Job Server port (Defaults to 3500)
[3500  ]
Enable SNMP (Y/N, Defaults to N)
[N]
Enable SSL (Y/N, Defaults to Y)
[Y]
Job Server advance configure (Y/N, Defaults to N)
[N]

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Configure Access Server
 1  -   Configure a new Access Server
 2  -   Skip Access Server configure

  1. SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Setup
Configure Access Server
Access Server Directory
[/deve/TEST01/POC/BODS4/dataservices/conf/AS1                ]
Access Server Port (Defaults to 4000)
[4000  ]
Enable Access Server (Y/N, Defaults to Y)
[Y]
Enable SSL (Y/N, Defaults to Y)
[Y]

  1. Configure Metadata Service
Specify Metadata Service configuration information.
Metadata service:
[4010  ]
JMX connector:
[4011  ]

  1. Configure Viewdata Service
Specify Viewdata Service configuration information.
Viewdata service:
[4012  ]
JMX connector:
[4013  ]

  1. Start Installation
Are you ready to have the SAP BusinessObjects Data Services 4.0 SP2 Patch 3 Installation Wizard begin the install?

Installing Data Services Designer

If there is a previous version of Designer on your PC, you have to uninstall it.

Download latest DS Designer from SAP “SUPPORT PACKAGES AND PATCHES”: SBOP Data Services Designer for 4.0 SP02 Patch 3
For Windows 32-bit: DATASERVDESIGN02P_3-20007461.EXE
It is self-extracting archive and it creates temporary folder (1.17GB) in your TEMP directory.
The installation needs 2.35GB.

Update Oracle tnsnames.ora on your PC before starting DS Designer.

2011-12-22

Cloning Oracle Management Agent OEM 11g

Environment
AIX 5.3.0.0
Oracle Enterprise Manager (OEM) Grid Control 11.1

Agent Installation
Create oracle user, groups and prepare .profile in UNIX.
Install agent by any method, e.g. agentDownload script.

Download file agentDownload.aix from OMS to target host.
wget http://omshost:4889/agent_download/11.1.0.1.0/aix/agentDownload.aix

Optionally change file agentDownload.aix:
doDiscovery=FALSE
startAgent=FALSE

Install agent:
./agentDownload.aix -b /oracle/oem -r 4889
Port number 4889 is necessary otherwise it will try to use HTTPS and port 1159, which didn’t work in my case.

Run root.sh script

Patch oracle agent
1. install latest OPatch (6880880)
2. apply proper TZ patch (6672979 for Australia)
3. apply recommended patches (PSU and others)

If you are going to use agent on this host then configure agent
agentca –f
Otherwise we don’t need to configure or start agent.

Prepare master archive file
It can be ZIP or TAR.GZ (or something similar)

Advantage of ZIP: it can be used as source file by Grid Control Cloning Wizard (in GC click Deployments > Install Agent > Clone Agent)
Disadvantage of ZIP: unzip cannot read from pipe or standard input, so zip file is copied to target host and then unzipped by Wizard or manual method. It takes bit extra space (1GB) and time.
Advantage of tar.gz: it can be uncompressed directly from SSH or WGET, see examples below
Disadvantage of tar.gz: it cannot be used by Grid Control Cloning Wizard

Prepare exclude list
# CLONE is any temp location
export CLONE=/oracle/software/clones
cd $ORACLE_HOME
find . -name "*.log" >$CLONE/ExcludeList.txt
find . -name "*.err" >>$CLONE/ExcludeList.txt
vi $CLONE/ExcludeList.txt
Add the following to the exclude list. It is taken from OMS host $OH/sysman/prov/agentpush/resources/scripts/exclude.lst
./sysman/upload/*
./sysman/emd/state/*
./sysman/emd/*
./sysman/log/*
./sysman/j2ee/*
./ccr/hosts/*
./ccr/state/*
./sysman/emd/*/*
./sysman/emd/*/*/*
./sysman/emd/*/*/*/*
./ccr/hosts/*/*
./ccr/hosts/*/*/*
./ccr/hosts/*/*/*/*
./bin/nmo
./bin/nmhs
./bin/nmb

Create tar.gz archive
cd $ORACLE_HOME
tar -X $CLONE/ExcludeList.txt -cvf - . | gzip -c >$CLONE/agent11g_home_11.1.0.1.5.tar.gz

Create zip archive
Attention: when you create the ZIP file, create it from the parent directory of the Oracle home (that’s GC wizard requirement)
cd $ORACLE_HOME
cd ..
zip -ry $CLONE/agent11g_home_11.1.0.1.5.zip agent11g -x@$CLONE/ExcludeList.txt 

Copy archived home (zip or tar.gz) to OMS host, e.g.
$ORACLE_HOME/sysman/agent_download/11.1.0.1.0/clones
You can see the files in Web browser
http://omshost:4889/agent_download/11.1.0.1.0/clones/

Deploying agent from tar.gz
Create oracle user on target host
Prepare .profile

Using SSH (method 1):
cd $ORACLE_HOME
ssh oracle@omshost 'cat /oracle/middleware/oms11g/sysman/agent_download/11.1.0.1.0/clones/agent11g_home_11.1.0.1.5.tar.gz' | gunzip | tar xvf –

Using WGET (method 2):
cd $ORACLE_HOME
wget -q -O- http://omshost:4889/agent_download/11.1.0.1.0/clones/agent11g_home_11.1.0.1.5.tar.gz | gunzip | tar xvf -

Run Installer:
cd $ORACLE_HOME/oui/bin
./runInstaller -clone -forceClone ORACLE_HOME=/oracle/oem/agent11g ORACLE_HOME_NAME=OH_agent11g -noconfig -silent OMS_HOST=omshost OMS_PORT=4889

As root
/oracle/oem/agent11g/root.sh

Continue as oracle user
Configure the Management Agent by running the following script:
$ORACLE_HOME/bin/agentca –f

Deploying agent from zip manually
You cannot pipe into unzip. So you have to download zip file to target and then unzip.
wget http://omshost:4889/agent_download/11.1.0.1.0/clones/agent11g_home_11.1.0.1.5.zip
Then run Installer and etc. as in example above.

Deploying agent from zip by Grid Control Wizard
Attention: in this method Oracle Home Name is assigned automatically; it looks something like AGT3561027

In Grid Control click Deployments > Install Agent > Clone Agent
Well, the rest is trivial.

2011-11-28

Editors handy commands

Insert TEXT at beginning of a line
Notepad++
Search mode – regular expression
Find:   
^(.)
Replace with:   
TEXT\1

Vi
:%s/^/TEXT/

Append TEXT to end of a line
Notepad++
Search mode – regular expression
Find:
(.)$
Replace with:   
\1TEXT

Vi
:%s/$/TEXT/

Delete blank lines
Notepad++
Menu: TextFX -> TextFX Edit -> Delete blank lines

vi
:g/^$/d
Blank line with spaces (there is a space after backslash):
:g/^\ *$/d

Find “db.world” and replace with “db, db.world”
Notepad++
Search mode – regular expression
Find:   
^(\w*).world
Replace with:   
\1, \1.world

2011-10-27

Time Zone DST patch for Oracle grid control agent 11g on AIX


Patch 6672979 has to be applied. Product: CORE (not agent!).
This patch installs TZ DST version 7, which includes Australian TZ changes in 2008.
Grid control agent 11.1.0.1.0 has Core Files 11.1.0.7.0

To see Core files for agent run:
opatch lsinventory -detail | grep "Oracle Core Required Support Files"

To see the current time zone info:
head $ORACLE_HOME/oracore/zoneinfo/readme.txt

Proper $TZ for AIX in NSW is:
echo $TZ
EET-10EETDT,M10.1.0/02:00,M4.1.0/03:00

To validate TZ:
echo $ORACLE_HOME
export EMDROOT=$ORACLE_HOME
export EMSTATE=$ORACLE_HOME
emdctl validateTZ agent Australia/Sydney

With TZ DST versions 10 and 14, I had the following errors:
emdctl validateTZ agent Australia/Sydney
tzOffset for Australia/Sydney is 0(min), but agent is runnning with tzOffset 660(min)
trying again after waiting for 1 sec to account for daylight transition
tzOffset for Australia/Sydney is 0(min), but agent is runnning with tzOffset 660(min)

Check the TZ settings in the Operating System environment:
emctl config agent getTZ

Reset time zone:
emctl resetTZ agent
grep TZ $ORACLE_HOME/sysman/config/emd.properties

sqlplus SYSMAN@OMS_repository
exec mgmt_target.set_agent_tzrgn('agenthost.gov.au:3872','Australia/Sydney');
commit;


Start agent
emctl start agent

Useful documents:
DST: Is your Grid Control ready for the next Daylight Saving Time - second half 2010? [ID 739116.1]
Grid Agent Configuration: How to Troubleshoot Timezone Issues in Enterprise Manager Grid Agent Setup? [ID 330737.1]

Recommended patches for agent 11.1.0.1.0 on AIX on 2011-10-26
1. 6880880 - OPatch version: 11.1.0.8.5
2. 6672979 - CORE: Patch DST CHANGES FOR SOME AUSTRALIAN REGIONS IN 2008 - NEED DATABASE FIX (this is TZ DST version 7)
3. 9345921 - ENTERPRISE MANAGER AGENT 11.1.0.1.5 PSU
4. 12424139 - PATCH BUNDLE REQUEST FOR MW MANAGEMENT CUMULATIVE MLR-APRIL 2011 - AGENT

2011-09-07

Oracle Goldengate SQLEXEC output parameters

Environment
AIX 5.3.0.0
Oracle database 10.2.0.5
Goldengate 11.1.1.1

Problem
Replicat failed and the report file contains:
ERROR OGG-00353 Could not find stored procedure param (parameter does not exist in sp (seqnumout))

Solution
When using SQLEXEC with SELECT statement, make sure that alias in SELECT statement is the same as output parameter in GETVAL. It is seqnumout in the example below.

MAP HOU.HOUSEHOLD_PERS1, TARGET STG.HOUSEHOLD_PERS1,
SQLEXEC (ID seqnum, QUERY "select STG.HOUSEHOLD_PERS1_SEQ.nextval seqnumout from dual", NOPARAMS),
COLMAP (USEDEFAULTS,
GG_OPERATION = @GETENV ("GGHEADER","OPTYPE"),
GG_BEFORE_AFTER = @GETENV ("GGHEADER","BEFOREAFTERINDICATOR"),
GG_COMMITTIME = @GETENV ("GGHEADER","COMMITTIMESTAMP"),
SEQ# = @GETVAL(seqnum.seqnumout),
TKN_SCN = @TOKEN ("TKN_SCN"),
TKN_RSN = @TOKEN ("TKN_RSN")
);

2011-09-05

Oracle Goldengate installation on AIX

Environment
AIX 5.3.0.0 (command oslevel)
Oracle database 10.2.0.5
GoldenGate 11.1.1.1

Version 11.1.1.1 OGGCORE_11.1.1_PLATFORMS_110421.2040
AIX 5L, ppc, 64bit (optimized), Oracle 10.2 on Apr 22 2011 02:17:48

Problem
After GoldenGate installation, ggsci cannot start.

ggsci
exec(): 0509-036 Cannot load program ggsci because of the following errors:
        0509-150   Dependent module libclntsh.a(shr.o) could not be loaded.
        0509-022 Cannot load module libclntsh.a(shr.o).
        0509-026 System error: A file or directory in the path name does not exist.
 
pwd
/oracle/goldengate/11.1.1
ldd ggsci
ggsci needs:
         /usr/lib/libc.a(shr_64.o)
         /usr/lib/libC.a(shr_64.o)
         /usr/lib/libC.a(shr2_64.o)
         /usr/lib/libC.a(ansi_64.o)
         /usr/lib/libpthreads.a(shr_xpg5_64.o)
         /oracle/goldengate/11.1.1/libicuuc38.a(libicuuc38.1.so)
         /oracle/goldengate/11.1.1/libicui18n38.a(libicui18n38.1.so)
Cannot find      /oracle/goldengate/11.1.1/libxerces-c.a
         /unix
         /usr/lib/libcrypt.a(shr_64.o)
         /usr/lib/libC.a(ansicore_64.o)
         /usr/lib/libC.a(shrcore_64.o)
         /usr/lib/libC.a(shr3_64.o)
         /oracle/goldengate/11.1.1/libicudata38.a(libicudata38.1.so)
         /usr/lib/libpthread.a(shr_xpg5_64.o)
         /usr/lib/libc_r.a(shr_64.o)
 
ls -l *a
-r-xr-xr-x    1 orax122  oinstall   11360230 Mar 29 10:42 libicudata38.a
-r-xr-xr-x    1 orax122  oinstall    9302329 Mar 29 10:42 libicui18n38.a
-r-xr-xr-x    1 orax122  oinstall    6302602 Mar 29 10:42 libicuuc38.a
-r-xr-xr-x    1 orax122  oinstall    9209080 Mar 29 10:42 libxerces-c.a
 
Solution
echo $LIBPATH
/oracle/goldengate/11.1.1

$LIBPATH must include $ORACLE_HOME/lib

export LIBPATH=${OGG_HOME}:$ORACLE_HOME/lib
echo $LIBPATH
/oracle/goldengate/11.1.1:/oracle/rdbms/10.2.0/orax122/lib

2011-06-09

Database Character Set Conversion

Environment
Oracle 10.2.0.3, AIX 5.3

Requirements
Change database character set from AL32UTF8 to WE8ISO8859P1.

To see the current set:
select * from database_properties where property_name='NLS_CHARACTERSET';
select * from nls_database_parameters where parameter='NLS_CHARACTERSET';


Prerequisites
1. Install CSSCAN (Oracle support note ID 745809.1)
csscan \"sys as sysdba\" full=y
CSS-00107: Character set migration utility schema not installed
Scanner terminated unsuccessfully.

sqlplus / as sysdba
SQL> @?/rdbms/admin/csminst.sql

2. Apply Oracle patch 5879179 (to fix bug 5879179, specific to version 10.2.0.3 64bit)
It should ok for versions higher than 10.2.0.3
Before patching CSSCAN returns multiple errors:
ORA-22925: operation would exceed maximum size allowed for a LOB value

Solution
Character set conversion is done using Oracle utilities CSSCAN and CSALTER.
The main steps are:
1.    Clean the database
2.    CSSCAN
3.    Database backup
4.    Dealing with Truncation and Lossy data
5.    Dealing with Convertible data
6.    CSSCAN
7.    Conversion
8.    Post conversion steps

1. Clean the database. Delete unneeded schemas and tables. Purge database recycle bin.
PURGE DBA_RECYCLEBIN;

2. Run CSSCAN as SYSDBA user.
csscan \"sys as sysdba\" full=y

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

Current database character set is AL32UTF8.

Enter new database character set name: > WE8ISO8859P1

Enter array fetch buffer size: 1024000 >

Enter number of scan processes to utilize(1..32): 1 > 4

Enumerating tables to scan...

The output goes into 3 files: scan.err, scan.out, scan.txt
Detailed description can be found in Oracle Support document "Csscan output explained [ID 444701.1]".

3. Backup database if it has not been done yet.

4. Dealing with Truncation and Lossy data
Check file scan.txt
With some lossy data, I had the following summary:
[Scan Summary]
All character type data in the data dictionary are convertible to the new character set
Some character type application data are not convertible to the new character set

There was no Truncation data in this DB.
Lossy data were found in one table (TOAD_PLAN_TABLE) and I’ve just dropped it.
More info about dealing with Lossy and Transaction data can be found in Oracle document " Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) [ID 260192.1]"

5. Dealing with Convertible data
"Convertible" Data Dictionary CLOB data is handled by CSALTER. No action required.
"Convertible" Application Data has to be exported and deleted!
When there are application Convertible data without Truncation/Lossy data, scan summary in scan.txt looks like:
[Scan Summary]
All character type data in the data dictionary are convertible to the new character set
All character type application data are convertible to the new character set

In this case there were two application tables with convertible data.
[Application Data Conversion Summary]
Datatype         Changeless  Convertible   Truncation  Lossy
---------- ---------------- ------------ ------------ ------
VARCHAR2     15,045,735,123          280            0      0
CHAR                      0            0            0      0
LONG                      0            0            0      0
CLOB                      0            0            0      0
VARRAY                    0            0            0      0
---------- ---------------- ------------ ------------ ------

[Distribution of Convertible, Truncated and Lossy Data by Table]
USER.TABLE                Convertible  Truncation  Lossy
------------------------ ------------ ----------- ------
EDWSTG_HM.JOBS                     21           0      0
EDWSTG_HM.TRANSACTIONS            259           0      0

Export and truncate
expdp \"/ as sysdba\" DUMPFILE=t01_%u.dmp LOGFILE=t01.log tables=EDWSTG_HM.JOBS,EDWSTG_HM.TRANSACTIONS parallel=4

SQL> truncate table EDWSTG_HM.JOBS;
SQL> truncate table EDWSTG_HM.TRANSACTIONS;

6. Run CSSCAN again.
csscan \"sys as sysdba\" full=y

To run CSALTER the following output of CSSCAN (scan.txt) is required:

[Scan Summary]
All character type data in the data dictionary are convertible to the new character set
All character type application data remain the same in the new character set

[Data Dictionary Conversion Summary]


The data dictionary can be safely migrated using the CSALTER script

7. Conversion
Shutdown listener and make sure nothing else connects to the database.

sqlplus / as sysdba
show parameter job_queue_processes
show parameter aq_tm_processes
-- assuming spfile is in use
alter system set job_queue_processes=0;
alter system set aq_tm_processes=0;
shutdown immediate;

startup restrict
spool convert.log
@?/rdbms/admin/csalter.plb

Restart the database and listener.

8. Post conversion steps
Restore altered parameters
alter system set job_queue_processes=10;
alter system set aq_tm_processes=1;

Import exported tables
impdp \"/ as sysdba\" dumpfile=t01_%u.dmp logfile=t01.imp.log table_exists_action=append parallel=4

Useful Oracle support notes
Installing and configuring Csscan in 10g and 11g (Database Character Set Scanner) [ID 745809.1]
Csscan output explained [ID 444701.1]
Changing the Database Character Set ( NLS_CHARACTERSET ) [ID 225912.1]
Changing the Database Character Set - Frequently Asked Questions [ID 227337.1]