domingo, 22 de septiembre de 2013

Configure Forms/Reports/Discoverer (Install Discoverer 11g Parte V)


Luego de instalar Weblogic Server y Middleware con sus respectivas actualizaciones ahora nos queda configurar Discoverer, también se puede configurar Forms y Reports.
Ingresamos a la ruta donde están los binarios de FMW, y luego ejecutamos el asistente.
[oracle@disco ~]$ cd /u01/app/oracle/product/fmw/pfrd_binaries/bin
[oracle@disco bin]$ ./config.sh

Presione Next.

Seleccionamos la opción “Create Domain” luego ingresamos los campos “User Name”, “User Password”, “Confirm Password” y “Domain Name”.

Presione Next.

Ingresamos el nombre de la instancia, luego presione Next.

Seleccionamos “Oracle Discoverer”, “Enterprise Manager” y “Oracle Web Cache”.
 
De-seleccionamos la opción “Clustered”, luego presione Next.

Seleccionamos la opción “Auto Port Configuration”, luego presione Next.
 
En el string de conexión debemos ingresar los datos del servidor de base de datos luego ingresamos el esquema para discoverer que fue configurado en anterioridad con el utilitario RCU, luego presione Next.
 
De seleccionamos la opción “Use Aplication Level Identity Store”, luego presione Next.

Presione Configure.
Presione Next.
 
Fin de la configuración de discoverer, ahora podemos ingresar a los link de discoverer plus y a de weblogic:
Discoverer Plus: http://disco:8090/discoverer/plus
Discoverer Viewer: http://disco:8090/discoverer/viewer
http://disco:7001/em/
http://disco:7001/console/

 
Ahora aplicaremos los pasos según la nota de metalink 1074326.1 desde la sección 4:
 
Section 4: Configure Oracle Business Intelligence Discoverer 11g for Oracle E-Business Suite Integration
4.4.3. Copy Database Connection File
Luego de configurar el servidor de discoverer debemos copiar el archivo dbc del servidor de aplicaciones de la ruta $FND_SECURE al directorio donde se instaló discoverer $ORACLE_INSTANCE/config/Discoverer/Discoverer_<ias-instance>, renombrar el archivo en minúscula.
4.2. Update tnsnames.ora File
Debemos configurar el archive tnsnames.ora usando una ya existente podemos utilizar la del servidor de aplicaciones.
vi $ORACLE_INSTANCE/config/tnsnames.ora
TIC_PROD=
        (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(HOST=r12.ticservice.com)(PORT=1521))
            (CONNECT_DATA=
                (SERVICE_NAME=PROD)
                (INSTANCE_NAME=PROD)
            )
        )  
4.6. Create new Discoverer 11.1.1 End User Layer
Se recomienda crear un TableSpace para EUL
Seteamos las variables de entorno en el servidor de base datos.
                    [oracle@r12 ~]$ . /u01/app/oracle/product/11.2.0/db_1/PROD_cr12.env
Creamos el tablespace discoverer
[oracle@r12 ~]$ sqlplus / as sysdba
create tablespace DISCOVERER datafile 
'/u01/oracle/PROD/db/apps_st/data/discoverer01.dbf' size 200M reuse 
extent management local uniform size 128K;
 
4.6.4. Create the Discoverer End-User Layer
Antes de ejecutar el script debemos setear las variables de entorno:
source $ORACLE_INSTANCE/Discoverer/Discoverer_<ias-instance>/util/discenv.sh
[oracle@disco ~]$ . /u01/app/oracle/product/fmw/asinst_1/Discoverer/Discoverer_Dis_inst/util/discenv.sh
[oracle@disco ~]$ $ORACLE_HOME/bin/eulapi -CREATE_EUL -APPS_MODE -CONNECT system/manager@lab -USER EUL_US -PASSWORD EUL_US -DEFAULT_TABLESPACE discoverer -TEMPORARY_TABLESPACE temp -EUL_LANGUAGE US -APPS_GRANT_DETAILS apps/apps  
Section 5: Configure Oracle E-Business Suite for Oracle BI Discoverer 11g Integration
Debemos aplicar los parches para integración con EBS en el nodo de aplicación, se debe aplicar según el siguiente orde:
p7461070_R12_LINUX.zip
p9394002_R12.AD.B_R12_GENERIC.zip
Parche 7461070
Debemos crear el directorio /u01/app/oracle/product/11.2.0/db_1/appsutil/admin 
[oracle@r12 7461070]$ cd /u01/app/oracle/product/11.2.0/db_1/appsutil/
[oracle@r12 appsutil]$ mkdir admin

Ahora debemos copiar el archive adgrants.sql en el directorio Nuevo. 
                    [oracle@r12 admin]$ cp adgrants.sql $ORACLE_HOME/appsutil/admin

Ejecutamos el archivo adgrants.sql en sqlplus
[oracle@r12 admin]$ sqlplus / as sysdba
SQL> @$ORACLE_HOME/appsutil/admin/adgrants.sql APPS

Bajamos la capa de aplicación y luego cambiamos a modo mantenimiento, para aplicar el parche
6 Change Maintenance Mode
1 Enable Maintenance Mode
[oracle@cr12 7461070]$ adpatch
The default directory is [/u01/install_by_disco_11/parches_Disco11g/7461070] : 
Please enter the name of your AutoPatch driver file : u7461070.drv

Luego de aplicar el parche debemos ejecutar "Re-Create grants and Synonyms" from adadmin.
                    4 Maintain Applications Database Entities menú
                2 Re-create grants and synonyms for APPS schema
Parche 9394002
Se aplica en modo mantenimiento,  no tiene pre requisitos
                    [oracle@r12 9394002]$ adpatch
                    The default directory is [/u01/install_by_disco_11/parches_Disco11g/9394002] : 
                    Please enter the name of your AutoPatch driver file : u9394002.drv
Subimos la capa de aplicación.
5.3. Set Applications Profile Options for Discoverer using AutoConfig
Ahora configuramos la variable s_disco_url en el autoconfig.
Login to Oracle Applications Manager and navigate to Site Map > AutoConfig > Edit Parameters
Para aplicar los cambios debemos ejecutar el autoconfig.
[oracle@r12 ~]$ cd $ADMIN_SCRIPTS_HOME
[oracle@r12 scripts]$ adautocfg.sh
 
5.4. Set Applications Profile Options in Oracle E-Business Suite
Log into E-Business Suite Release 12 with the System Administrator responsibility
Navigate to the Profile > System form
Query the %Discoverer% profile options.
 
Parámetro
Valor
ICX: Discoverer Default End User Layer Schema Prefix
EUL
ICX: Discoverer End User Layer Language Override
American English
ICX: Discoverer Launcher
http://disco.ticservice.com:8090/discoverer/plus?Connect=[APPS_SECURE]
ICX: Discoverer Parameters
exitURL=http://r12.ticservice.com:8000/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE
ICX: Discoverer Release
11
ICX: Discoverer Viewer Launcher
http://disco.ticservice.com:8090/discoverer/viewer?Connect=[APPS_SECURE]
ICX: Discoverer use Viewer
Yes
OKC:Discoverer Reports Enabled
No

5.5.1. Run the "Generate Business Views by Application" Concurrent Program
Regenerate your Business Views by running the "Generate Business Views by Application" concurrent program using the Business View Setup responsibility:
Logon to Oracle E-Business Suite as SYSADMIN
Choose the "Business Views Setup" responsibility
Navigate to Reports > Run > Pick Single Request > "Generate ALL Business Views"

Primero asignamos la responsabilidad  "Business Views Setup"

Ahora procedemos a ejecutar el concurrente.

Debemos revisar si no tiene errores.
Generate all Business Views Errors With ORA-00933 ORA-01792 ORA-00936 on HR Views (Doc ID 1157943.1)
EDWBV_ORGA_OPER_UNIT_LCV
EDWBV_ORGA_ORG_LCV
EDWBV_ORGA_LEG_ENTITY_LCV
SOLUTION 
A workaround is to perform the following: 
1. Go into the responsibility: 'Business Views Setup.'
2. Submit the request 'Generate Business Views by Application.'
3. Enter 'Human Resources' for the parameter 'Application.'
5.5.2. Check for Errors
After regeneration of the Business Views has been completed, check the Business View Generator output file. It should not contain any errors.

5.5.3. Recompile APPS objects
Recompile all objects in the APPS schema using adadmin.
 5.5.4. Check Business Intelligence System Views
Ensure that the Business Intelligence System views exist and all Business Intelligence System views are valid by issuing the following command in SQL*Plus:
select object_name from user_objects
where object_type = 'VIEW' and
status = 'INVALID' and
( object_name like '%FV_%' or object_name like '%FG_%' or
object_name like '%BV_%' or object_name like '%BG_%' )and
object_name in (select sobj_ext_table from eul_us.eul5_objs); 
5.6. Set up E-Business Suite User/Responsibility for EUL Administration: SYSADMIN/System Administrator
The E-Business Suite Release 12 System Administrator account must be granted permission to update and alter Discoverer 11.1.1 content.

5.6.1. Grant End User Layer Administration Privileges
Debemos asignar los permisos para sysadmin, en el servidor de disvoverer, ejecutando el siguiente comando:

$ORACLE_HOME/bin/eulapi -CONNECT EUL_US/EUL_US@lab -GRANT_PRIVILEGE  -USER SYSADMIN  -PRIVILEGE administration  -PRIVILEGE all_admin_privs  -LOG grant_sysadmin.log
 5.7. Access directory $AU_TOP/discover on your E-Business Suite Release 12 instance from your Oracle Business Intelligence Discoverer 11g BI instance
Con el usuario root ejecutar los siguientes comandos para compartir el directorio $AU_TOP/discover

Editamos el archivo /etc/exports y adicionamos la ruta que vamos a compartir
vi /etc/exports 
/u01/oracle/PROD/apps/apps_st/appl/au/12.0.0/discover 192.168.123.133(rw) 
Luego ejecutamos el comando:
                     exportfs -a 
                    service nfs restart

En el servidor cliente ejecutamos el siguiente comando (antes debemos crear el directorio /user1/au_top/discover):
mount -t nfs 192.168.12.233:/u01/oracle/PROD/apps/apps_st/appl/au/12.0.0/discover /user1/au_top/discover 

5.8. Import Discoverer Content for E-Business Suite Release 12 using adupdeul.sh mode=complete
Primero debemos setear las variables de entorno:

source $ORACLE_INSTANCE/Discoverer/Discoverer_<ias-instance>/util/discenv.sh
. /u01/app/oracle/product/fmw/asinst_1/Discoverer/Discoverer_Dis_inst/util/discenv.sh

5.8.4. Start the Import Process

cd /user1/au_top/discover
sh adupdeul.sh \
connect=sysadmin/sysadmin@LAB \
resp="System Administrator" \
gwyuid=APPLSYSPUB/PUB \
fndnam=APPS \
secgroup="Standard" \
topdir=/user1/au_top/discover \
language=US \
eulprefix=EUL \
eultype=OLTP \
mode=complete \
iashome=/u01/app/oracle/product/fmw/pfrd_binaries \
logfile=import_complete_eul_us_cust120.log
 
5.9. Refresh the Discoverer 11.1.1 End User Layer 
Para actualizar las carpetas de EUL ejecutamos el siguiente comando:

sh adrfseul.sh \
connect=sysadmin/sysadmin@LAB \
resp="System Administrator" \
gwyuid=APPLSYSPUB/PUB \
fndnam=APPS \
secgroup="Standard" \
eulschema=EUL_US \
eulpassword=EUL_US \
twotask=PROD \
iashome=/u01/app/oracle/product/fmw/pfrd_binaries \
logfile=refresh_eul_us_mydb.log
5.10. Grant Access to Responsibilities, Users, and Workbooks (Optional)
Example 1: Grant Discoverer User privileges to responsibility "Human Resources Intelligence - Administrator (OLTP)"
$ORACLE_HOME/bin/eulapi \
-CONNECT EUL_US/EUL_US@PROD \
-GRANT_PRIVILEGE \
-ROLE "Human Resources Intelligence - Administrator (OLTP)" \
-PRIVILEGE all_user_privs

Example 2: Grant security access for business area "General Ledger" to responsibility "Human Resources Intelligence - Administrator (OLTP)"

$ORACLE_HOME/bin/eulapi \
-CONNECT EUL_US/EUL_US@LAB \
-GRANT_PRIVILEGE \
-ROLE "Human Resources Intelligence - Administrator (OLTP)" \
-BUSINESS_AREA_ACCESS "General Ledger" \
-log ba_gl.log
 Notas de referencia:
Error: OracleBI Discoverer was unable to complete the connection initialization [ID 564281.1]
Getting "invalid username/password" When Running adupdeul.sh on Discoverer Server 10.1.2 [ID 463268.1]
How To Create An E-Business Suite Connection Trace For Discoverer 10g / 11g Plus / Viewer [ID 370800.1]
Note: 386641.1 - Default Or Specified Schema Containing Eul Tables Is Inaccessible Discoverer 11g (11.1.1.x) Fails At 70% In The "Deploying Discoverer" Phase [ID 1072450.1]
After Applying Weblogic Patch or any CPU Patch, Discoverer Fails To Start From Enterprise Manager (EM) [ID 1335764.1] 
HTTP-500 Internal Server Error When Accessing Public Portal Page With Discoverer Portlet [ID 549216.1]
Unable To Create Discoverer Connections Using Capi.Sh In 11g [ID 1326729.1]
Discoverer Plus 11.1 Launches Blank Screen in Internet Explorer Browser After Java Reinstall [ID 1359376.1]
Discoverer 11g Plus with Java 7 Errors with java.lang.ExceptionInInitializerError [ID 1502903.1]
Using Discoverer 11.1.1 with Oracle E-Business Suite Release 12 (Doc ID 1074326.1)