English

WebFOCUS with ORACLE 9i/10g    [Back]

Make sure you have the power to install, and run Oracle on your computer. From command prompt "cmd" enter 'dxdiag' to see how much RAM, and Processor speed you have. At the very least have 1.6GHz processor Pentium III, and 512MB RAM. If you run with VMware use no less than 2-4GB RAM


Oracle commands

Checking system properties with :
uname -a

Checking for TABLE names under logged in user.
select table_name from tabs

Checking the description of a table; its fields, and their formats
desc tablename

Creating ORACLE table with the DBCS kanji table name.
create table dbcs_kanji_table_name
(ssn char(7) not null,
sect varchar(2) not null,
items number(3,1) not null);

Inserting data into ORACLE table.
insert into dbcs_kanji_table_name
(ssn,sect, items)
values
('7111111', 'HO',0.5) ;

Saving newly created table.
Commit;


Oracle client setup:

C:\oracle\ora92\network\admin\tnsnames.ora
OR C:\oracle\product\10.2.0\client_1\network\admin\tnsnames.ora

# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
# NOTE! always include the full domain such as IBI.COM, or use IP

UTF8ORCL.IBI.COM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = mol5)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = utf8orcl)
    )
  )



C:\oracle\ora92\network\admin\sqlnet.ora
OR C:\oracle\product\10.2.0\client_1\network\admin\sqlnet.ora

# SQLNET.ORA Network Configuration File: C:\oracle\ora92\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DEFAULT_DOMAIN = ibi.com

#SQLNET.AUTHENTICATION_SERVICES= (NTS)
SQLNET.AUTHENTICATION_SERVICES= (NONE)

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)





WebFOCUS NLS:


1)
West European characters should display fine.
Please have them issue "? LANG" from their client. This will tell us what code
pages they have on their Server, and Client. It should be 137, and Lang should
ofcourse be German. This is set from the WFClient, and WFServer console.

2)
Then they should test a synonym on the server to make sure it works there
before debugging their client app.

3)
Double check that the nlscfg.err of both the Server and Client has the following:

LANG = GERMAN
CODE_PAGE = 137

in both ibi/srv71/wfs/etc and ibi/WebFOCUS71/client71/wfc/etc

4)
If using UNIX Solaris then its default JVM encoding is "UTF-8".
But our WFServlet expects ISO encoding "LANG=en_US.ISO8859-1".

To remedy this please put the following UNIX command into your Tomcat's startup
shell (your app server). If Tomcat is started up with the Apache WebServer
startup, please add the following line into the WebServer's startup shell.

export LANG=en_US.ISO8859-1

If a Sun One App Server is used you might also need to add another LANG command to your .profile and restart the specific user instance from command line.

export LANG=en_US.ISO8859-1

export LC_ALL=en_US.ISO8859-1


If you still have a problem, please issue "locale -a" command against Solaris.
The "locale -a" shows you the list of available locale modules of the UNIX
system. You will be able to see entries like "xx_XX.yyyyyyy" listed.
The "xx_XX" is locale ID of UNIX and the "yyyyyyy" is the encoding string of
the UNIX system. The value of LANG environment has to have "xx_XX.ISO8859-1".

Note ! that if this is started by a different user.profile the settings might
revert back to a non NLS configuration. If you didn't restart the user instance of the app server you will also not get the locale setting changed.


5)
If an Oracle DB is going to be used then the NLS_LANG also need to be set:

SET NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1

The environment variable NLS_LANG needs to be set in the startup shell of the iWay/WF Report Server (not the app server). This can also be done in the Oracle registry. In Windows it would look like this:


From dos command prompt, in the same directory as the srv edastart, issue after bringing down the server using "edastart -stop", and edastart -clear"
SET NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
Then restart the server with "edastart -start"


This is also needed from the client machine before connecting via the Oracle Client to the destination database table. Otherwise the synonym on the WebFOCUS Server will be display erranously.

Unicode concerns:


If an Oracle Unicode DB is going to be used then the NLS_LANG also need to be set:
The environment variable NLS_LANG needs to be set for Unicode. This can be done in the Oracle registry, or from the current Windows session:
From dos command prompt, in the same directory as the srv edastart, issue after bringing down the server using "edastart -stop", and edastart -clear"
SET NLS_LANG=AMERICAN_AMERICA.UTF8
Then restart the server with "edastart -start"
This is also needed from the client machine before connecting via the Oracle Client to the destination database table. Otherwise the synonym on the WebFOCUS Server will be display erranously.


Windows:

WebFOCUS WEB.XML need to be changed to allow the Servlet to display Unicode characters. C:\IBI\WebFOCUS71\webapps\webfocus71\WEB-INF\web.xml needs to change the IBI_NLS_ENCODING from "DEFAULT" to "UTF8" as follows:

<context-param>
     <!-- Used as UNICODE support for the encoding value of JVMs default overridden -->
     <param-name>IBI_NLS_ENCODING</param-name>
     <param-value>DEFAULT</param-value>
  </context-param>
 
to
 
  <context-param>
     <!-- Used as UNICODE support for the encoding value of JVMs default overridden -->
     <param-name>IBI_NLS_ENCODING</param-name>
     <param-value>UTF8</param-value>
  </context-param>


UNIX:

Start up the Application Server with "LANG=en_US.UTF-8"



Unicode fonts:
Note that for the data outside the DB environment to display correctly you need to change the BROWSER FONT to a Unicode supported font such as "Arial Unicode" or "Lucinda Sans Unicode". This is also true for the WebFOCUS HEADINGS, and FOOTERS that need to be typed, and saved with a Unicode font. Since Arial Unicode have problems with East Asian scripts (e.g., Traditional Chinese) Lucinda Sans Unicode is the preferred Unicode font.

Also all applications that display the data need to have their internal Fonts set to the same Unicode Font, or set to default to the Browser Font.

Of course you need the Windows OS to have the Fonts necessary to display the glyphs used. Those are selected under the Windows Regional Settings (control panel).
Unicode FAQ


Oracle 9i Unicode DB
Need Oracle 9.i (9.2 or later). Create DB as a Unicode DB. Input characters with:
isqlplus
config details from:
Oracle Advice on isqlplus

Create a table with CHAR(50) field type (CHAR, VARCHAR2, CLOB, LONG are all allowed field types when DB was created as Unicode).

NCHAR SQL datatypes (NCHAR, NVARCHAR2, NCLOB) have been exclusively defined as a Unicode UTF-16. If you are using NCHAR remember to use only UTF-16 source data to avoid UTF-8 (which is variable length) overhead.

You can use NCHAR in a non-unicode DB to allow for Unicode data!!!

Oracle Unicode FAQ
Oracle Globalization PDF
Oracle NCHAR


MS SQL2K Unicode DB
Create NCHAR field type, and SQL2K will create Unicode data by default for this data type. The Collation is only for sorting.

You can use NCHAR in a non-unicode DB to allow for Unicode data!!!

MSSQL client test:
Just like Oracle has a default port of 1521, MSSQL has a default port of 1433. Test that your machine can connect to the Server by using "telnet MSSQLHOST 1433".

All text and images are Copyright
© 2004-2011, Wildbirdgallery.com. All rights reserved.