You are on page 1of 10

Archivos de configuracin de la red Oracle

En este documento vamos ver los posibles archivos existentes de configuracin de la red de oracle, dependiendo de la configuracin que se utilice se pueden configurar unos archivos u otros. Vamos a ver la configuracin de los siguientes archivos: # listener.ora # tnsnames.ora # sqlnet.ora # names.ora # ldap.ora

1. listener.ora
Archivo ubicado en el servidor de base de datos. Es el archivo de configuracin del listener de la base de datos. Este archivo tendr que estar ubicado en $ORACLE_HOME/network/admin/listener.ora. El comando para gestionar el listener es lsnrctl. Este ejecutable lo podemos encontrar en $ORACLE_HOME/bin/lsnrctl.

Ejemplo de configuracin del listener.ora: LISTENER9 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 193.168.4.220)(PORT = 2484)) ) ) ) SID_LIST_LISTENER9 = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orasite) (ORACLE_HOME = /oracle9/product/9.2.0) (SID_NAME = orasite) ) )

Parmetros del archivo: HOST: Direccin ip del servidor de base de datos PORT: Puerto de escucha de la base de datos ( por defecto suele ser el 1521 ) CLOBAL_DB_NAME: Nombre de la base de datos ORACLE_HOME: Directorio de instalacin de ORACLE ( ORACLE_HOME ) SID_NAME: SID de la base de datos ( muchas veces coincide con el GLOBAL_DB_NAME )

Este archivo incluye: * Direcciones de protocolo en las que acepta solicitudes de conexin. * Servicios de base de datos * Parmetros de control utilizados por el listener. (Ver seguridad del listener)

2. tnsnames.ora
Archivo ubicado en los clientes, contiene los nombres de servicio de red, asignados a descriptores a travs de los cuales se nos permite acceder Ejemplo de configuracin del tnsnames.ora: CNNORASITE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 193.168.4.220)(PORT = 2484)) ) (CONNECT_DATA = (SERVICE_NAME = orasite) ) )

Parmetros del archivo: HOST: Direccin ip del servidor con el cual queremos conectar PORT: Puerto donde escucha la base de datos SERVICE_NAME: Nombre del servicio de base de datos al que queremos conectar DESCRIPTOR DE CONEXION: En este caso el descriptor para conectarnos es CNNORASITE Podemos comprobar si la conexin es correcta mediante el comando TNSPING $TNSPING nb_descriptor_de_red

3. sqlnet.ora
Archivo ubicado en el cliente y en servidores de base de datos Ejemplo de configuracin del sqlnet.ora: NAMES.PREFERRED_SERVERS = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = onames.orasite.com)(PORT = 1640)) ) NAMES.DIRECTORY_PATH= (ONAMES,TNSNAMES)

Parmetros del archivo: Este ejemplo de archivo sqlnet, es una archivo configurado para que en un principio resuelva resuelva por ONAMES y en segundo lugar por TNSNAMES. Esta configuracin busca primero el descriptor en ONAMES y si no existe busca la configuracin de conexin en el TNSNAMES. NAMES.PREFERRED_SERVERS: Indica la direccin del servidor ONAMES junto con su puerto NAMES.DIRECTORY_PATH: Orden de archivos a mirar para resolver el descriptor de servicio

4. names.ora
Archivo ubicado en el servidor de ORACLE NAMES. Este archivo incluye la ubicacin y la informacin de dominio y los parmetros de configuracin opcionales para un servidor de ORACLE NAMES

5. ldap.ora
Archivo ubicado en el servidor de base de datos y en el cliente configurados para que funcionen como gestin centralizada. Contiene los parmetros necesarios para acceder al servidor de directorios.

Forms: How to Configure Forms Builder to run forms locally

Introduction
I wrote this document because so many people in the Oracle Technology Network (OTN) Forms Forum have asked How do I run a form from the Forms Builder? or I just installed Forms 10g and all I get is a blank browser window when I run a form. After I responded to numerous posts (always writing the instructions from scratch) I decided to write this document. As they say, It is always better to reuse then to recreate!

Disclaimer
First and foremost, this document targets the following Oracle Developer Suite (Forms/Reports) versions: 10g R1 (9.0.4.x.x) and 10g R2 (10.1.2.x.x). Many of the concepts apply to the Oracle Fusion Middleware (FMw) 11g suite (Forms and Reports), but this document is not intended to help you with FMw configuration. The information in this document could be adapted to Oracle Forms 9i, but I do not currently have access to this version of Forms so there is no guarantee that these methods will work for Forms 9i. Secondly, this document is NOT all inclusive meaning it is not a full reference to all setup options available. This document is meant only to get you up and running. If you need to use features that are not listed in this document, please refer to the appropriate Oracle document available at the Oracle Technology Network (OTN).Lastly, this article assumes you have successfully installed the Oracle Developer Suite (ODS) 10g R2 (10.1.2.x.x). If you have not already installed the ODS then you will need to do this before you can proceed.

Background
If you have used Oracle Forms long enough, you will remember the day when you could run a Form locally from the Forms Builder with the Forms Runtime. This was a very nice feature that enabled you to perform incremental development and testing; the Forms Debugger utility; not to mention the Forms Runtime Diagnostics (FRD). With the advent of Forms 9i when Oracle made Forms web deployed only many developers thought the ability to run a form from the Forms Builder was lost. This is not true; it is just a little harder to do now and requires some configuration setup on your workstation to make it work. Forms 10g use the OC4J Forms Servlet to emulate a Forms Service web process on your workstation that allows you to serve a web form from the Forms Builder. This is a very generic description of what OC4J is and what it does, but it will suffice for the purpose of this document. In order to run a form from the Forms Builder, Oracle has included two new program items (among others) in Oracle Developer Suite Program group of the installed Oracle Developer Suite 10g. These two program items are the Start OC4J Instance and Stop OC4J Instance. Both are critical to the running of forms from the Forms Builder.

Lets get started


There are two parts to configuring Forms Builder to run forms. The first relates to Forms Builder and the second relates to the OC4J Forms Servlet. Most forms developers will be familiar with configuring the Forms Builder as this involves setting up key environment/registry variables so the Forms Builder can find libraries (PL/SQL libraries [.pll] and Forms Object Libraries [.olb]). However, fewer developers are familiar with setting up the OC4J environment variables which enable you to run a form from the Forms Builder. There are two Java Runtimes (JREs) supported by Forms Builder; Oracle Jinitiator and the Oracle (Sun) Java Runtime Environment (Sun JRE). By default, Forms Builder is configured to use the Oracle Jinitiator and in most cases this should be sufficient for your needs. Configuration is simply to install the Oracle Jinitiator (make sure you install the right version because each Forms version defaults to different version. For example, Oracle Forms 10g R2 (10.1.2.0.2) defaults to using Oracle Jinitiator 1.3.1.22. If you install the version found in your Oracle DevSuite home directory (\%DEV_SUITE_HOME%\jinit) you should be OK. If you decide to use the Sun JRE, again, you will need to install the appropriate version as the Forms Builder ships configured to a specific version of the Sun JRE. For example, Oracle Forms 10g R2 (10.1.2.0.2) defaults to Sun JRE version 1.4.2 update 6 (1.4.2_06). Most likely, you will have to update the default settings as you likely do have the Sun JRE installer for 1.4.2 and it is no longer available for download. Therefore, you will likely be installing the latest version of the Sun JRE which is Java 6 (1.6.0). Which JRE you use is also dependent on your Operating System (OS) version and your Internet Browser version. This document focuses on setup for the Microsoft Windows Operating System and Internet Explorer and Mozilla Firefox browsers. The following is the Oracle certified supported configurations.

OS Windows Internet Explorer version 5 version 6 version 7 version 8 FireFox 3.5+

Java Runtime Jinitiator 1.3.1.x+ 1.3.1.22+ 1.3.1.28 1.6.0_16+ NS Sun JRE 1.4.1+ 1.4.2_06+ 1.5.0_06+ 1.6.0_16+ 1.6.0_16+

+ = indicates a higher version can be used NS = Not Supported


This list is an abbreviated list. For a complete list review the appropriate Oracle Certification Matrix document on OTN. Alright, enough background. Its time to get the heart of this document. This document will be focused into three sections: Forms Builder config, OC4J with Jinitiator, and OC4J with Sun JRE.

Forms Builder Configuration


Forms Builder is dependent on the following variables (there are others, but these are the most important): FORMS_PATH FORMS_BUILDER_CLASSPATH TNS_ADMIN FORMS_PATH is used by Forms Builder to record the location of attached libraries (.pll) and subclassed objects (such as items from a Template.fmb or Object Library [.olb]). You can also include your Forms working directory in this variable and Forms runtime will be able to find your compiled Forms binaries when you run a form from the Forms Builder. This saves you having to modify the formsweb.cfg file to include a configuration for each form you develop (Ill include a brief discussion of custom configurations at the end of this document). This variable is mandatory if you use attached libraries or subclassed objects. FORMS_BUILDER_CLASSPATH is used by Forms Builder to record the location of any Java Pluggable Components or Java Beans that are implemented in a form. This variable is optional, but you will receive a Forms Builder error during design time indicating that Forms Builder cant find the implemented Java source. This is a design time error only and does not affect runtime. TNS_ADMIN is used by Forms Builder to find your TNSNAMES.ora and SQLNET.ora files. This variable is handy if you have multiple Oracle Homes installed because it allows you to share a single set of TNS configuration files. This variable is optional, but if you have multiple Oracle homes you will have to maintain separate copies of the TNS files for each Oracle home. These variables can be set in either the Windows Registry (Windows XP) through the Windows System Environment Variables. This document will describe both methods of setting these variables.

Windows Registry
1. Open the Windows Registry Editor (regedit.exe or reged32.exe) 2. Navigate to the appropriate Oracle Home HKEY_LOCAL_MACHINE SOFTWARE Oracle HEY_DevSuiteHome10g 3. FORMS_PATH: In the Key listing, scroll through and find the FORMS_PATH string variable and double-click or rightclick and select Modify to edit the variable. a. DO NOT delete the existing value. Add directory information by separating it with semicolons ;. b. Example: FORMS_PATH=C:\DevSuiteHome10g\cgenf61\admin;C:\Forms_Dev\*; Note: I have found that I can include a wildcard reference in the FORMS_PATH. This allows me organize all of my

Forms development into a single directory. In my Forms_Dev directory, I have a Forms_Lib directory where I store all of my referenced items such as; attached libraries (.pll), object libraries (.olb) and object referenced from a Forms Template file (template.fmb). Additionally, if I am working on different projects, I can

create a subdirectory for each project.

4. FORMS_BUILDER_CLASSPATH: find the existing entry for this key and open the key editor. a. Again DO NOT delete any existing values b. Add to the exiting directory and .jar file listing by separating each entry with a semicolon. 5. TNS_ADMIN: This entry does not exist, you will have to create this entry in each of the Oracle Homes. a. In the key listing, right-click somewhere and New => String Value from the context menu b. This will create an empty string entry. c. Open the editor for the string and enter the full path to your TNS configuration files. Eg: C:\DevSuiteHome10g\NETWORK\Admin

Windows Environment Variables


1. Open the System Properties control panel applet. (Start Menu => Control Panel => System) 2. Click on the Advanced tab. 3. Click on the Environment Variables button towards the bottom. 4. If more than one person uses the workstation, I recommend you add the FORMS_PATH variable to the set of User Variables rather than add it to the list of System Variables. This allows each user to set their own preferences. a. Click on the New button and enter the Variable Name and Variable Value i. Variable Name = FORMS_PATH ii. Variable Value = full path to your working and library directories iii. You do not have to worry about the default value of this variable in the registry as this environment variable augments the registry. 5. Do the same thing for the FORMS_BUILDER_CLASSPATH and TNS_ADMIN variables. This completes the Forms Builder setup.

OC4J Servlet setup


The OC4J Servlet setup is a bit more complex in that all of the variables are stored one of two files. These files are: DEFAULT.ENV FORMSWEB.CFG These file can be found in the \%DEV_SUITE_HOME%\forms\server directory. I strongly recommend you make a back up copy of the original file before you modify these files. Note: These files should only be modified on the application server using the Oracle Enterprise Manager (OEM). The

Developer Suite installation does not include the OEM so modifications must be made manually with a text editor.

DEFAULT.env
This file is used to set Forms runtime environment parameters. There are only two parameters that I have had to modify to enable running a form from the Forms Builder. They are: FORMS_PATH and CLASSPATH. The FORMS_PATH needs to have the same directories listed as stated above for the equivalent Registry or Environment variable. The CLASSPATH only need to be modified if you implement a PJC or Java Bean in your form. You will need to list the full path, to include the file name, in this parameter listing. This parameter has a maximum character length of 256 characters.

FORMSWEB.cfg
This file contains the parameter values used by the Forms Servlet. There are two types of parameters: SYSTEM and USER defined. System parameters are static in that they can not be overridden at run time. User parameters have an entry in the baseHTML file and can be overridden in the URL query string. This file is where the bulk of changes are needed the enable running a form from the Forms Builder. I will not list all of the parameters as there are too many. Refer to the Application Server Forms Services Deployment Guide (see references) for a complete listing of all parameters and more detailed information. Configuration will be separated by Java Runtime used. Ill list Sun JRE first and Jinitiator second. Bear in mind, that Oracle has retired the Jinitiator and no longer supports its use. The formsweb.cfg is broke up into separate defined configurations. Each configuration is named and can be identified by the name in square brackets. For example, the Default configuration is listed as: [default]. This is the configuration that is used unless it is overridden through the URL query string.

Ill list later in the document how you can override a User parameter or specify a custom configuration later in the document. Conventions used: Settings listed in Green are code comments Settings listed in Blue are original settings Settings listed in Red are recommend changes Settings listed in Purple are optional changes Sun JRE Modify the following settings to use a JRE version different from the default if 1.4.2. The following JRE changes instruct the Forms Runtime to use the JRE version 1.6.0 update 22 (1.6.0_22). The following settings are all found in the [default] configuration section.

# System parameter: base HTML file for use with JInitiator client # baseHTMLjinitiator=basejini.htm baseHTMLjinitiator=basejpi.htm
Oracle Forms is hardwired (so to speak) to use the Oracle Jinitiator. Therefore, to instruct the Forms Runtime to use the JRE without passing a URL query string parameter, it is recommended you change the baseHTMLinitiator parameter to point to the Java Plug-In (JPI) html file. You could also expand the existing [jpi] section and instruct the Forms runtime to use this configuration in the URL. Personally, I find this to be the easier solution.

# Page displayed to users to allow them to download Sun's Java Plugin. # Sun's Java Plugin is typically used for non-Windows clients. # (NOTE: you should check this page and possibly change the settings) # Original setting #jpi_download_page=http://java.sun.com/products/archive/j2se/1.4.2_06/index.html # New points to the generic ( non-version specific) JRE download web site jpi_download_page=http://www.oracle.com/technetwork/java/javase/downloads/index. html # Parameter related to the version of the Java Plugin # Original setting #jpi_classid=clsid:CAFEEFAC-0014-0002-0006-ABCDEFFEDCBA # This setting is specific to JRE 1.6.0_22 jpi_classid=clsid:CAFEEFAC-0016-0000-0022-ABCDEFFEDCBA # Optional Generic to any version of JRE 1.6.0. Note the difference between these two settings. jpi_classid=clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA # Parameter related to the version of the Java Plugin # Original setting #jpi_codebase=http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windowsi586.cab#Version=1,4,2,06 # New specific to JRE 1.6.0_22 jpi_codebase=http://java.sun.com/update/1.6.0/jinstall-6-windowsi586.cab#Version=1,6,0,22 # Optional Generic to JRE 1.6.0 jpi_codebase=http://java.sun.com/update/1.6.0/jinstall-6-windowsi586.cab#Version=1,6,0 # Parameter related to the version of the Java Plugin # Original Setting #jpi_mimetype=application/x-java-applet;jpi-version=1.4.2_06 # New specific to JRE 1.6.0_22 jpi_mimetype=application/x-java-applet;jpi-version=1.6.0_22 # Optional Generic to JRE 1.6.0 jpi_mimetype=application/x-java-applet;jpi-version=1.6.0
Oracle Jinitiator Modify the following settings to use a Jinitiator version different from the default if 1.3.1.26. There are no optional settings for Jinitiator.

# # # # #

Page displayed to Netscape users to allow them to download Oracle JInitiator. Oracle JInitiator is used with Windows clients. If you create your own page, you should set this parameter to point to it. jinit_download_page=/forms/jinitiator/us/jinit_download.htm Parameter related to the version of JInitiator

jinit_classid=clsid:CAFECAFE-0013-0001-0026-ABCDEFABCDEF jinit_classid=clsid:CAFECAFE-0013-0001-0028-ABCDEFABCDEF # Parameter related to the version of JInitiator # jinit_exename=jinit.exe#Version=1,3,1,26 jinit_exename=jinit.exe#Version=1,3,1,28 # Parameter related to the version of JInitiator # jinit_mimetype=application/x-jinit-applet;version=1.3.1.26 jinit_mimetype=application/x-jinit-applet;version=1.3.1.28
Default URL Query String and parameters The default URL query string used by the Forms Builder is: http://myhost.mydomain.com/forms/frmservlet? With reference to the aforementioned JPI change for the baseHTMLjinitiator= parameter, alternatively, you could pass the JPI configuration in the URL query string. To do this, simply add config=jpi to the default URL query string. Passing this additional parameter, the default URL would look like: http://myhost.mydomain.com/forms/frmservlet?config=jpi However, I prefer to make the change in the formsweb.cfg file as this is a more permanent change.

Custom Configurations
If you have installed the Oracle Demos you will find that Oracle modifies the formsweb.cfg to add a configuration for each form included in the demo. While this works fine for demos, it is a real pain in everyday development to add a configuration section for each form you work on (which is why I edit all of my forms in a directory that is in my FORMS_PATH). However, there are times when it is good to create a configuration for a specific form. For example, if I want to run a form with the Forms Runtime Diagnostics (FRD) enabled, I have created a configuration that enables this. Then I simply add the parameter to the url to enable FRD (?config=my_frd). To create a custom configuration, open the formsweb.cfg file and scroll to the bottom of the file. Always add additionally configurations to the end of the file. Custom configurations will use all of the variables in the [default] section and then override any you specify in your custom configuration. The following is based on my reference to use Forms Runtime Diagnostics (FRD). The configuration listed below also uses a configuration specific environment file (default.env) as well.

[my_frd] otherparams=record=collect log=my_frd.txt envFile=my_frd.env form=<YOUR_FORM_NAME_HERE.fmb> To create a specific environment file, I simply copied the default.env to my_frd.env and added the following variable: FORMS_TRACE_DIR=C:\DevSuiteHome10g\NETWORK\log

References:
- Oracle Application Server Forms Services Deployment Guide 10g Release 2(10.1.2) (B14032-03 Feb 2006) - Oracle Application Server Certification Information - 10 g Release 2 (10.1.2) (B25703-62 - April 30, 2010) - Using the Java Plug-in (JRE/JPI) with Oracle Forms (ID 794710.1) - How Do the Jinitiator and JPI Parameters Work In a Forms Configuration (ID 444105.1)

Oracle Forms & Reports 11g R2 : Installation Overview and Key Points

This post covers high level overview of Forms & Reports 11g R2 installation

Installation Document of 11g R2 (11.1.2.0) Forms & Reports is available here

1. Oracle Forms & Reports consists of 1.1 Oracle Forms a) Forms Builder required for development and compilation of forms b) Forms Server run-time server used to deploy forms application and execution of forms 1.2 Oracle Reports a) Reports Builder required for development and compilation of reports b) Reports Server run-time server used to deploy reports application and execution of reports 2. Latest release (as of April 2012) of Oracle Forms & Reports is 11g R2 (11.1.2) 3. Installation Type You can install Forms & Reports in two type 3.1 Install & Configure You can install and configure forms & reports at same time using installer 3.2 Install Software Do Not Configure You can install just forms & reports software and do not configure them via installer. You later configure forms & reports by running $ORACLE_HOME/bin/config.sh (bat) 4. Configuration Type You can configure forms & reports in two ways 4.1 Configure for Deployment In this option you configure Forms & Reports and also configure Oracle HTTP Server (OHS) including Enterprise Manager. In this configuration you also get option to integrate Forms & Reports with Identity Management Components (OID, OAM 10g or 11g). Use this option for Production Type installation. 4.2 Configure for Development In this option you configure Forms & Reports but without OHS and Enterprise Manager . You also dont get an option to integrate Forms & Reports with Identity Management Components (OID, OAM 10g or 11g). Use this option for Development Type installation. 5. Integrating Forms & Reports with IDM You can integrate Forms & Reports with OID 11g (for other LDAP types and version check Certification Matrix ). OAM or OSSO can be used to integrate Forms & Reports for Single Sign-On. More on OAM 11g in my book at Amazon 6. Forms & Reports in deployment mode will create a) WebLogic Domain with Admin Sever and two managed servers (WLS_FORMS &

WLS_REPORTS) more on WebLogic domain here b) Oracle Instance managed by OPMN with Forms, Reports, EM, and OHS 7. You will need to install WebLogic Software (10.3.5), this will create Middleware Home (More on MW_HOME, ORACLE_HOME, ORACLE_INSTANCE or DOMAIN_HOME here ) 8. You must install Forms & Reports Software under Middleware Home (MW_HOME) created during WebLogic Installation. This step will create ORACLE_HOME for forms & reports. Use runInstaller (for Unix) and setup.exe (for windows) to install forms & report from Disk1 of software. 9. You can integrate Oracle Identity Management components (OID & OAM) at configuration stage (select configuration type Deployment, select OHS and select Application Identity Store & Access Control)

Note: You can integrate Forms & Reports with Oracle IDM (OID & OAM) later as well using steps mentioned here 10. OAM can be configured in OPEN, SIMPLE or CERT mode (more in my book here ) then you must register OAM Agents manually from Forms & Reports node 11. To check Forms use http://host:port/forms/frmservlet and for Report http://host:port/reports/rwservlet where port is a) For deployment mode port os OHS listen port or WebLogic Managed server listen port of respective servers b) For development mode port is WebLogic Admin Server port Here is little quiz for readers Is it possible to install Forms on one server and reports on different server. If yes what additional configuration is required and if not why not ? Leave your answer under comments

You might also like