Pages

Friday, February 13, 2015

Integrating BI Publisher with Enterprise Manager using the configureBIP Script

As we know, Oracle has deprecated Information Publisher (IP) Reports for Enterprise Manager 12c and introduce new report tool BI Publisher (BIP) Enterprise Reports. Here, I am going to configure BIP after OEM 12c (12.1.0.4) has been installed and used for a while.

Configure environment and set ORACLE_HOME to OMS installation path:
$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/oms12104/oms
$ export PATH=$ORACLE_HOME/bin:$PATH
$ which emctl
/u01/app/oracle/product/12.1.0/oms12104/oms/bin/emctl

Backup OEM using command: emctl exportconfig oms
$ emctl exportconfig oms -dir /u01/app/oracle/OMS_BACKUP -oms_only -keep_host
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
ExportConfig started...
Backup directory is /u01/app/oracle/OMS_BACKUP
Performing OMS backup...
Exporting emoms properties...
Exporting secure properties...

Export has determined that the OMS is not fronted
by an SLB. You have chosen to export the local
hostname. The exported data may ONLY be imported
on a host with the same hostname. Please see the
EM Advanced Configuration Guide for more details.

Warning: Could not export files for module bip: Unable to read file /u01/app/oracle/product/12.1.0/gc_inst/em/EMGC_OMS1/embip.properties for exporting
Exporting configuration for pluggable modules...
Preparing archive file...
Backup has been written to file: /u01/app/oracle/OMS_BACKUP/opf_OMS_20150210_111433.bka

The export file contains sensitive data.
You must keep it secure.

ExportConfig completed successfully!

Configure BIP using script configureBIP
$ cd $ORACLE_HOME/bin
$
$ ./configureBIP
Configuring BI Publisher Version "11.1.1.7.0" to work with Enterprise Manager
Logging started at /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/bipca_20150210111722.log.
Before this command is run, a backup of Enterprise Manager should be performed using the :emctl exportconfig oms: command. Have you made a valid backup of Enterprise Manager (yes/no) [no] ? yes
Enter sysdba user name (sys):sys
Enter sysdba user password:
Enter Administration Server user password:
Configuring BI Publisher in Oracle Home located in /u01/app/oracle/product/12.1.0/oms12104/Oracle_BI1 ...
Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 0
Percent Complete: 10
Percent Complete: 30
Percent Complete: 50
Percent Complete: 50
Percent Complete: 100
Repository Creation Utility: Create - Completion Summary
Database details:
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.dbaplus.ca)(PORT=1521)))(LOAD_BALANCE=ON)(CONNECT_DATA=(SERVICE_NAME=OEMREP)))
Connected As : sys
Prefix for (prefixable) Schema Owners : SYSMAN
RCU Logfile : /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/emBIPLATFORM.log
Component schemas created:
Component Status Logfile
Business Intelligence Platform Success /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/biplatform.log

Repository Creation Utility - Create : Operation Completed
Successfully created SYSMAN_BIPLATFORM schema...
Enter an integer between 9701 and 49152 for the BI Publisher HTTP server port. (9701):
Enter an integer between 9702 and 49152 for the BI Publisher HTTPS server port. (9702):
Extending domain with BI Publisher. This operations can take some time. Do not interrupt this command while it is running...
Locking Enterprise Manager ...
OMS Console is locked. Access the console over HTTPS ports.
Restart OMS.
Restarting Enterprise Manager ...
Stopping Enterprise Manager, this can take some time ...
Failed to stop Enterprise Manager. Diagnostic code 1.
See log at /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/bipca_20150210111722.log for details.
Error extending domain
See log at /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/bipca_20150210111722.log for details.

OMG, a bad luck! Check log file for what happened,
$ tail -20 /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/bipca_20150210111722.log

[2015-02-10T11:30:51.192-05:00] [sysman] [NOTIFICATION] [] [oracle.sysman.bipca] [host: host01.dbaplus.ca] [nwaddr: 10.10.0.34] [tid: 17] [userId: oracle] [ecid: 0000KhoL3KH0rmjrh0r2E41KqYwd000004,0] [SRC_CLASS: oracle.sysman.sdkImpl.core.ip.model.bipca.ProcessOutputReader] [SRC_METHOD: run] Stopping WebTier...[[

]]
[2015-02-10T11:30:55.221-05:00] [sysman] [NOTIFICATION] [] [oracle.sysman.bipca] [host: host01.dbaplus.ca] [nwaddr: 10.10.0.34] [tid: 17] [userId: oracle] [ecid: 0000KhoL3KH0rmjrh0r2E41KqYwd000004,0] [SRC_CLASS: oracle.sysman.sdkImpl.core.ip.model.bipca.ProcessOutputReader] [SRC_METHOD: run] Error Occurred: Cannot run program "/u01/app/oracle/product/12.1.0/gc_inst/WebTierIH1/bin/opmnctl": error=12, Not enough space[[

]]
[2015-02-10T11:30:55.222-05:00] [sysman] [NOTIFICATION] [] [oracle.sysman.bipca] [host: host01.dbaplus.ca] [nwaddr: 10.10.0.34] [tid: 17] [userId: oracle] [ecid: 0000KhoL3KH0rmjrh0r2E41KqYwd000004,0] [SRC_CLASS: oracle.sysman.sdkImpl.core.ip.model.bipca.ProcessOutputReader] [SRC_METHOD: run] Please check /u01/app/oracle/product/12.1.0/gc_inst/em/EMGC_OMS1/sysman/log/emctl.log for error details[[

]]
[2015-02-10T11:30:55.265-05:00] [sysman] [ERROR] [] [oracle.sysman.bipca] [host: host01.dbaplus.ca] [nwaddr: 10.10.0.34] [tid: 10] [userId: oracle] [ecid: 0000KhoI3ci0rmjrh0r2E41KqYwd000000,0] [SRC_CLASS: oracle.sysman.sdkImpl.core.ip.model.bipca.BIPCA] [SRC_METHOD: lockAndBounceEM] Failed to stop Enterprise Manager. Diagnostic code 1.
[2015-02-10T11:30:55.273-05:00] [sysman] [ERROR] [] [oracle.sysman.bipca] [host: host01.dbaplus.ca] [nwaddr: 10.10.0.34] [tid: 10] [userId: oracle] [ecid: 0000KhoI3ci0rmjrh0r2E41KqYwd000000,0] [SRC_CLASS: oracle.sysman.sdkImpl.core.ip.model.bipca.BIPCA] [SRC_METHOD: extendDomainWithBIP] See log at /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/bipca_20150210111722.log for details.
[2015-02-10T11:30:55.274-05:00] [sysman] [ERROR] [] [oracle.sysman.bipca] [host: host01.dbaplus.ca] [nwaddr: 10.10.0.34] [tid: 10] [userId: oracle] [ecid: 0000KhoI3ci0rmjrh0r2E41KqYwd000000,0] [SRC_CLASS: oracle.sysman.sdkImpl.core.ip.model.bipca.BIPCA] [SRC_METHOD: handleFatalError] Error extending domain
[2015-02-10T11:30:55.275-05:00] [sysman] [ERROR] [] [oracle.sysman.bipca] [host: host01.dbaplus.ca] [nwaddr: 10.10.0.34] [tid: 10] [userId: oracle] [ecid: 0000KhoI3ci0rmjrh0r2E41KqYwd000000,0] [SRC_CLASS: oracle.sysman.sdkImpl.core.ip.model.bipca.BIPCA] [SRC_METHOD: handleFatalError] Fatal error:[[
java.lang.Exception: See log at /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/bipca_20150210111722.log for details.
at oracle.sysman.sdkImpl.core.ip.model.bipca.BIPCA.extendDomainWithBIP(BIPCA.java:2370)
at oracle.sysman.sdkImpl.core.ip.model.bipca.BIPCA.main(BIPCA.java:1531)

At the begining of the error, I found messages: 'opmnctl', 'Not enough space', 'Failed to stop Enterprise Manager'. What a familiar look! Yes, it is familiar. Let's try to fix it following "Got ‘Not enought space’ while ‘emctl stop oms’". Then, restart the process. Of course, I have to clean/rollback the failed configuration first before re-running configureBIP.

Clean/rollback failed configureBIP run

Stop BIP server
$ emctl stop oms -bip_only
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
Stopping BI Publisher Server...
BI Publisher Server Successfully Stopped
BI Publisher Server is Down

Unregister BIP from Enterprise Manager
$ emcli login -username=sysman
Enter password :

Login successful
$ emcli sync
Synchronized successfully

$ emcli unregister_bipublisher -force
Warning: BI Publisher was not registered for use with Enterprise Manager, no action taken.

BIP was not registered with Enterprise Manager yet, but it does not really matter, just go ahead.
Drop schema created by script configureBIP from Enterprise Manager repository database
$ sqlplus sys@OEMREP as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Fri Feb 13 08:39:01 2015

Copyright (c) 1982, 2008, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters and Automatic Storage Management options

SQL> drop user SYSMAN_BIPLATFORM cascade;

User dropped.

SQL> select comp_id,COMP_NAME,owner,version,status from system.schema_version_registry where comp_id = 'BIPLATFORM';

COMP_ID COMP_NAME OWNER VERSION STATUS
--------------- ------------------------------ ------------------------------ ------------------------------ -----------
BIPLATFORM OracleBI and EPM SYSMAN_BIPLATFORM 11.1.1.7.0 VALID

SQL> delete from system.schema_version_registry where comp_id = 'BIPLATFORM';

1 row deleted.

SQL> commit;

Commit complete.

SQL> select comp_id,COMP_NAME,owner,version,status from system.schema_version_registry where comp_id = 'BIPLATFORM';

no rows selected

Re-run script configureBIP to configure BIP with Enterprise Manager
$ ./configureBIP
Configuring BI Publisher Version "11.1.1.7.0" to work with Enterprise Manager
Logging started at /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/bipca_20150213084523.log.
Before this command is run, a backup of Enterprise Manager should be performed using the :emctl exportconfig oms: command. Have you made a valid backup of Enterprise Manager (yes/no) [no] ? yes
Enter sysdba user name (sys):
Enter sysdba user password:
Enter Administration Server user password:
Configuring BI Publisher in Oracle Home located in /u01/app/oracle/product/12.1.0/oms12104/Oracle_BI1 ...
Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 0
Percent Complete: 10
Percent Complete: 30
Percent Complete: 50
Percent Complete: 50
Percent Complete: 100
Repository Creation Utility: Create - Completion Summary
Database details:
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.dbaplus.ca)(PORT=1521)))(LOAD_BALANCE=ON)(CONNECT_DATA=(SERVICE_NAME=OEMREP)))
Connected As : sys
Prefix for (prefixable) Schema Owners : SYSMAN
RCU Logfile : /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/emBIPLATFORM.log
Component schemas created:
Component Status Logfile
Business Intelligence Platform Success /u01/app/oracle/product/12.1.0/oms12104/oms/cfgtoollogs/bip/biplatform.log

Repository Creation Utility - Create : Operation Completed
Successfully created SYSMAN_BIPLATFORM schema...
Enter an integer between 9701 and 49152 for the BI Publisher HTTP server port. (9701):
Enter an integer between 9702 and 49152 for the BI Publisher HTTPS server port. (9702):
Extending domain with BI Publisher. This operations can take some time. Do not interrupt this command while it is running...
Locking Enterprise Manager ...
OMS Console is locked. Access the console over HTTPS ports.
Restart OMS.
Restarting Enterprise Manager ...
Stopping Enterprise Manager, this can take some time ...
Starting Enterprise Manager. This operation can take some time. Do not interrupt this command while it is running.
OMS Started Successfully
BI Publisher server named :BIP: running at https://host01.dbaplus.ca:9702/xmlpserver.
Registering BI Publisher with Enterprise Manager and deploying reports...
Performing automatic backup of Enterprise Manager using the command :emctl exportconfig oms:.
Successfully backed up Enterprise Manager. The backup file is located in the INSTANCE_HOME sysman backup directory.
Successfully setup BI Publisher with Enterprise Manager

Now, we can use BI Publisher to do report instead of Information Publisher.

No comments: