Friday, February 26, 2010

Cisco Router As A VPN Server Part II

Tuning Oracle 10g AS Reports Server

Lets take a swift walk-through over how to tuneup oracle 10g AS Reports server

We shall be focusing on the following aspects of reports engine/server

•Accepting the report request from various clients.

•Scheduling the jobs to run.

•Managing Oracle Reports engines

•Managing the cache

•Managing various destinations

•Security check

•Managing the jobstore (persistent job data)

Ok folks, here we go

1. Finding out the values for the following elements initEngine, maxEngine, and minEngine in the server configuration file:

maxIdle="30" callbackTimeOut="90000">

Calculation and calculations and calculations :(
lets assume:

a) average time in seconds to run a report = 10
b) minimum and maximum numbers of requests to run reports per minute = 5 to 50

now lets convert average run time in minutes = 10/60 = 0.16666

•initEngine = ( average time to run report) * (minimum report requests input rate) = 0.16666 * 5 = 1

•maxEngine = (average time to run report) * (maximum report requests input rate) = .016666 * 50 = 8

•minEngine = Depending on the kind of load, anything between 0 to initEngine

minEngine=1 and maxEngine=8 ensures that whenever a job arrives, it gets an idle engine immediately.

Note:
If you are not using the URL engine, comment the engine element with ID="rwURLEng" in the server configuration file.


2.Lets talk about cacheSize, maxQueueSize, and the EXPIRATION.

EXPIRATION: Cache to hold jobs for certain number of minutes. If EXPIRATION=480, jobs will keep in cache for 4 hours (480 minutes). Therefore, maxQueueSize should be set to accommodate all the jobs for 4 hours. Thus, at a rate of 10 jobs per minute:

maxQueueSize = (report requests input rate) * (expiration period) = 480 * 10 =4800.

The value of cacheSize also should be set sufficiently high to accommodate 4800 jobs. Suppose the average size of each report is 100K:

cacheSize = (maxQueueSize) * (average size of report) = 4800*100/1000 = 480MB



3.Setting up the engineResponseTimeOut

maxEngine="8" minEngine="1" engLife="50" maxIdle="30"
callbackTimeOut="90000" engineResponseTimeOut="10">

The value of engineResponseTimeOut should be set to the maximum time a report takes in the set of reports you have. For example, if you have set of reports that takes 10 seconds to 10 minutes to run, you can set engineResponseTimeOut="10" (10 minutes).


Note:

It is always better to run batch reports on a separate server with different engineResponseTimeOut values. Do not submit interactive and batch reports to same server.


4.Set the maxConnect attribute of the connection element in the server configuration file;



Simple, make the value a little higher than simultaneous clients, say expected simultaneous clients are about 150, you can set maxConnect to any value above 150. You can use a safety factor of 10% to 20%, as follows:

maxConnect = 150 + 150 * 0.2 = 180

5.Set the HTTP timeout value (applicable to AS only).

The HTTP timeout value should be set based on the time required to run the longest report in the system. If longest-running report takes 20 minutes to run, HTTP timeout should be more than 20 minutes. Otherwise, an HTTP timeout error will display when the report is still running in the server. This parameter can be set in the ORACLE_HOME/Apache/Apache/conf/httpd.conf file.

Thanks to OTN

Monday, February 22, 2010

Get rid of quotes signs ' with Oracle 10g and 11g

Hi,

Recently i have posted this topic on my blog with Oracle 10 and 11g you can avoid the use of additional quotes signs when creating any Literal string ...

Like in reports it is common for us to write something similar to this

e.g  ' where hiredate between '||''''||p_from_date||''''||' and '||''''||p_to_date||''''

Click here for more info 

Now u can follow me on Twitter as well 

Have a nice day,
Baig
http://baigsorcl.blogspot.com/

View Data in Row

Data
EMPID
DEPT
------------
1
A
B
C
Required
EMPID DEPT
------------
1 A, B, C

Can write SQL for above.
CREATE TYPE varchar2_table_t AS TABLE OF VARCHAR2(32767);SELECT empid, CAST(MULTISET(SELECT dept FROM emp WHERE empid = e.empid) ASvarchar2_table_t) FROM emp e GROUP BY empid;

Thursday, February 18, 2010

ISO 27002 Mind Map

ORACLE 10 G Webutil Configuration

First of all thanks to invite me on this blog. This is my first post on ORIXOOMIT. I have learned a lot here in ORIX LEASING PAKISTAN and its my pleasure to share some research work that i have done when we were in the migration process of ORACLE 10g from 6i. For the time being i m sharing webutil configuration issues through which we can get into the client side for file creation, uploading to databse and extract information such as IP Address and File System etc. Hope this will help u.


WEBUTIL CONFIGURATION Pre-Requisite

ORACLE 10G R2 AS & DEV_SUITE (10.1.2.0.2 OR 10.1.2.3)


Follow this documentation only if you have AS / DEV_SUITE If you have another version of AS / DEV_SUITE backup each of the file referenced in this document before applying any modification.

Note: DEV_SUITE is used as an alias for your real Oracle 10g installation directory
Feel free to copy this note to a text editor, and do a global find/replace on
DEV_SUITE with your actual value (no trailing slash). Then it is easy to
copy/paste actual commands to be executed from the note copy.

DEV_SUITE is used as an alias for your real Oracle 10g Developer Suite installation directory.
----------------------------------------------------------------------------------------------------------------------
PRE-REQUISITE FOR APPLICATION SERVER (Usually Webutil is not installed with ORACLE 10G Application Server)

1- Copy webutil folder from DEV_SUITE/Forms to APP_SERVER/Forms

2- Copy frmwebutil.jar, forms_ie.js, forms_base_ie.js file from DEV_SUITE /Forms/Java folder to APP_SERVER/Forms/Java

3- Copy webutil.cfg, WebutilBase.htm, webutiljini.htm, webutiljpi.htm files from DEV_SUITE/Forms/Server folder to APP_SERVER/Forms/Server

4- Copy webutil.olb,Webutil.pll,webutil.plx files from DEV_SUITE/Forms folder to APP_SERVER/Forms

Webutil Configuration

How to get up and running with WebUtil included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform, I also tested it on Linux and it works well (after of course taking care of the differences in PATH format)

Solution
Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
here are steps to get a small test form running
Download JACOB_!8.zip
and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.

1) Copy jacob.jar to DEV_SUITE\forms\java\
2) Copy jacob.dll to DEV_SUITE\forms\webutil\

3) Sign frmwebutil.jar and jacob.jar
Open a DOS command prompt.
Add DEV_SUITE \jdk\bin to the PATH:
set PATH=DEV_SUITE \jdk\bin
Sign the files, and check the output for success:
DEV_SUITE\forms\webutil\sign_webutil DEV_SUITE\forms\java\frmwebutil.jar
DEV_SUITE\forms\webutil\sign_webutil DEV_SUITE\forms\java\jacob.jar

4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
you may skip this step. Otherwise,
Create a schema to hold the WebUtil stored code, and privileges needed to
connect and create a stored package. Schema name "WEBUTIL" is recommended
for no reason other than consistency over the user base.
Open DEV_SUITE\forms\create_webutil_db.sql in a text editor, and delete or comment
out the EXIT statement, to be able to see whether the objects were created witout
errors.

Start SQL*Plus as SYSTEM, and issue:
CREATE USER webutil IDENTIFIED BY a
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;
/
GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
/


CONNECT webutil/webutil@rcci
@DEV_SUITE \forms\create_webutil_db.sql
-- Inspect SQL*Plus output for errors, and then
CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
/

Reconnect as SYSTEM, and issue:
grant execute on webutil_db to public;

/

5) Modify DEV_SUITE \forms\server\default.env, and append
DEV_SUITE\jdk\jre\lib\rt.jar; DEV_SUITE\forms\java\jacob.jar;
to the CLASSPATH entry.

(If this entry not exists then add this)

WEBUTIL_CONFIG=/forms/server/webutil.cfg



6) Modify DEV_SUITE \forms\j2ee\orion-web.xml, and append



7) WebUtil needs a single virtual directory to be defined in order to operate. This virtual directory is used to locate various operating system-specific files that WebUtil may need to download.
DEV_SUITE/forms/server/forms.conf

Add the following line to the file
# Virtual path for webutil
AliasMatch ^/forms/webutil/(..*) DEV_SUITE /forms/webutil/$1"



8) Modify DEV_SUITE \forms\server\formsweb.cfg insde [default] add :
(Note these line should be in this order to run webutil properly)

[webutil]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
#baseHTMLjinitiator=webutiljini.htm (UnMark this to use JINITIATOR instead of JRE)
baseHTMLjinitiator=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm
baseHTML=webutilbase.htm
archive_jini=frmall_jinit.jar,icons.jar (For Jinitiator)
archive=frmall.jar,icons.jar (For JRE)
lookAndFeel=oracle

9) DEV_SUITE\forms\server\webutil.cfg

transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE


10) Start the OC4J instance

11) Start Forms Builder and connect to a schema in the RDBMS used in step (4).

12) Copy frmWebUtil.fmb to DEV_SUITE \forms\ folder from this documents directory open it in the form builder then
Connect to webutil schema then webutil/webutil@connectstring
Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K). If any runtime error occurs re-attach webutil.pll library then
Compile-All (Shift-Control-K).

Note: For Oracle Application Server, on all platforms, you must regenerate webutil.pll before using it; otherwise you’ll encounter error
ORA-06508 when running a form with the attached library. To recompile, use the following command:

frmcmp module=ORACLE_HOME\forms\webutil.pll
userid= module_type=library compile_all=yes


13) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
the "Application Server URL" is empty.
Then append "?config=webutil" at the end, so you end up with a URL of the form
http://server:port/forms/frmservlet?config=webutil

14) Run your form.






If you want to use JRE instead of JINITIATOR follow these steps;

DEV_SUITE\forms\server\formsweb.cfg

Change this line
baseHTMLjinitiator=webutiljini.htm
to this
baseHTMLjinitiator=webutiljpi.htm




One more thing you cannot use webutil functions/procedure in pre-form and when-new-form-instance. Because library/java beans need to loaded before using. It can be accomplished by running timer until the bean loaded and calling the functions/procedure when timer expired.

To run Aplication from Intranet allow popup from intranet site.

Following are the steps

In Internet Exporer
Open Tools>Popup-Blocker>Popup-Blocker Settings
Add Both entries
http://192.168.0.1 (Application Server IP)
http://192.168.0.2 (DEV_Suite Developer IP)




Best Regards,
M. Wasi Uddin Qureshi