Showing posts with label OAS. Show all posts
Showing posts with label OAS. Show all posts

Thursday, August 23, 2012

How to unlock the Super User Account on OAS 10g (on Windows server) ?


Question :
How to unlock the Super User Account on OAS 10g (Windows server) ?

Answer:
Connect to OAS server
from Oracle home directory issue following statement:

oidpasswd connect='oas db name' unlock_su_acct=true

where 'oas db name' is OAS'es database name

Change super user's password by :
log-in to Oracle Directory Manager

go to

Entry Management >> dc=domain >> dc=company >> cn=users >> cn='super user' >> properties >> orclpassword

Oracle AS 10g : how to change schema account from EXPIRED(GRACE) to OPEN ?


Question :
Oracle AS 10g : how to change schema account from EXPIRED(GRACE) to OPEN ?

Answer :
1. find all users with account status equals EXPIRED(GRACE) 
  SELECT s.username,
        s.password
    FROM dba_users s
   WHERE s.account_status LIKE '%GRACE%'
     AND s.account_status NOT LIKE '%LOCKED%'

2. Using values from previous select statement, issue following commands for each user:

alter user username profile DEFAULT;
alter user username identified by values 'password'

BEGIN
  FOR u_rec IN (SELECT s.username,
                       s.password
                  FROM dba_users s
                 WHERE s.account_status LIKE '%GRACE%'
                   AND s.account_status NOT LIKE '%LOCKED%')
  LOOP
    EXECUTE immediate 'alter user '||u_rec.username||' profile DEFAULT';
    EXECUTE immediate 'alter user '||u_rec.username||' IDENTIFIED BY VALUES '''|| u_rec.password ||'''';
  END LOOP;
END;

Executing a Query in Forms 10g Fails With Frm-41838 Unable To Open Temporary Record File


A query executed in a Forms application fails giving the following error:

FRM-41838 Unable to open temporary record file

Cause

Oracle Forms tries to create a temporary file if a query is issued and the number of records returned exceeds the block property 'Records Buffered' value. When using OracleAS Forms Services, the temporary file will be written by default to the directory specified for the TMP variable in:

$ORACLE_HOME/opmn/conf/opmn.xml.

If this directory does not exist, has insufficient space or has restricted read / write privileges the FRM-41838 error can occur.
Solution

Solution A:

1. Edit the Forms Listener Servlet env file. This will be the file referenced by the formsweb.cfg applet parameter envFile. By default, envFile = default.env, default.env is located in $ORACLE_HOME/forms90/server or in $ORACLE_HOME/forms/server

2. Add the line e.g.

TMP=/tmp

(assuming that the directory specified e.g. /tmp has sufficient space and read/write privileges)

3. Stop and restart the OC4J_BI_Forms component for the change to take effect

Solution B:

Change the value for the TMP variable setting in opmn.xml by following all the steps below:

1. Edit $ORACLE_HOME/opmn/conf/opmn.xml where $ORACLE_HOME corresponds to the Oracle Application Server middle tier home (BI & Forms)

2. Look for the line e.g. on Unix

3. Check that the directory specified exists, has sufficient space and read/write privileges. If necessary, change the TMP value e.g.

4. If the directory has been changed in opmn.xml, stop and restart all the middle tier components for the change to take effect.

Source : Oracle Metalink Doc ID: 304004.1

Wednesday, August 22, 2012

How to Automate Splitting OC4J log Files for Web Sites (default-web-access.log)


How to Automate Splitting OC4J log Files for Web Sites (default-web-access.log) [ID 764085.1]

Applies to:
Oracle Containers for J2EE - Version: 10.1.3.0.0 to 10.1.3.4.0
Oracle Containers for J2EE - Version: 10.1.2.0.0 to 10.1.2.3.0

Goal
How to automate log file splitting on text-based OC4J log file default-web-access.log located in $ORACLE_HOME/j2ee//log/_default_group_1 in Oracle Application Server based on period of time?

Solution
To automate log file splitting on default-web-access.log, add the "split" attribute to element in $ORACLE_HOME/j2ee//config/default-web-site.xml

This "split" attribute specifies how often to begin a new access log, supported values are "none" (equivalent to "never", which is the default), "hour", "day", "week", and "month".

To implement this solution:

1. Change the following line in default-web-site.xml
<access-log path="../log/default-web-access.log"/> 

to:
<access-log path="../log/default-web-access.log" split="week"/>

2. OC4J instance restart is required for these changes to take effect.
$ORACLE_HOME/opmn/bin/opmnctl stopproc process-type=home
$ORACLE_HOME/opmn/bin/opmnctl startproc process-type=home

Source : Oracle Metalink Doc Id: 764085.1

Limit the Size of the default-web-access.log


Applies to: Oracle Application Server 10g Enterprise Edition - Version: 10.1.2.0.0

Out of the box, the default-web-access.log will continue to grow until it is removed.

The default-web-site.xml file can be modified to allow for the logs to be cycled automatically and prevent default-web-access.log from growing too large and exhausting the disk storage.

Solution

To allow for the default-web-access.log file to be automatically cycled add the "split" variable to the default-web-site.xml logging parameter.

split: Specifies how often to begin a new access log. Supported values are "none" (never, which is the default), "hour", "day", "week", or "month". For a value other than "none", logs are named according to the suffix attribute. NOTE: the values are case sensitive and must be contained within double quotes. The suffix attribute is not needed if default naming is acceptable.

To make the change, change the final line in your default-web-site.xml

From:
access-log path="../log/default-web-access.log" /

to
access-log path="../log/default-web-access.log" split ="week"/

Note: all greater than and less than symbols have been removed in the example. Please be sure to leave them intact in the file mentioned.

This change will cause a new file to be created each week for the default-web-access.log. Old files can be removed from the directory and archived. Feel free to use the "month" parameter instead, if this meets your needs.

Source : Oracle Metalink Doc ID 572213.1

Sunday, February 5, 2012

PDF Printing slovenian characters problem


PDF Printing slovenian characters problem :

http://www.dba-village.com/village/dvp_forum.OpenThread?ThreadIdA=11031

As I understand the limitation of reports 6i is due to the fact that Reports 6i has builtin support for an older PDF standard V1.1.

It's a documented limitation, see Metalink Note 222663.1.

"PDF output is only supported for latin 1 code pages (US7ASCII, WE8ISO8859P1 and WE8MSWIN1252). "

Thursday, September 16, 2010

Enabling Tracing and Session Information with 10gR2 Enterprise Manager and Forms


ENABLING SESSION DETAILS AND TRACE LOGGING
-------------------------------------------
By default the formsweb.cfg file is set up with session detail and trace 
logging disabled. In order to enable these features, the formsweb.cfg file in 
the ORACLE_HOME/forms90/server ( ORACLE_HOME/forms/server in 10gR2) directory 
must be modified and the middle-tier restarted.


Change the Configuration File
-----------------------------
For session details: 

1) Modify the em_mode parameter to: 
   em_mode=1

For trace logging:

1) Modify the following parameters:
   allow_debug=true

2) If the allowURLConnections parameter appears in formsweb.cfg, ensure that
   the parameter is set to: 
   allowURLConnections=true

   The default for allowURLConnections is true, so if it does not appear in the
   formsweb.cfg file, no modifications are required for this parameter.

3) Run a form

4)  From  EM -> Forms Link -> User Sessions

5)  Select Trace Group -> debug

6)  Select a session.

7)  Click the 'Trace ON' button.

8)  Click the 'View Trace Log' Icon to view it.

9.) Now a Login request comes up. 
    (The documentation does not clearly explain 
    to which "administrators" group is being referenced.  Most would assume the
    EM administrator would have access. This is not true. The "administrators"
    group referenced in the documentation relates to JAZN security and not the
    OS or EM.)

    A default "administrators" group is created with a default user and 
    password.  The default username and password is as follows:
    username = admin
    password = welcome

To change the default or create your own users, refer to the 
Oracle Application Server Containers for J2EE Security Guide or
Java Authentication and Authorization Service Sample.


Restart the Middle Tier
-----------------------

The middle tier must be restarted in order for the changes to the formsweb.cfg
file to take effect. The commands to restart the middle tier: 

1) /bin/emctl stop iasconsole
2) /opmn/bin/opmnctl stopall
3) /bin/emctl start iasconsole
4) /opmn/bin/opmnctl startall

Thursday, July 29, 2010

Forms User Sessions Link Hangs When Using It Through Application Server Control (ASC)


Symptoms

1. Bring up Application Server Control.
2. Click on the Forms link.
3. Click on the User Sessions link.
4.  All that is seen is a an hour glass and no page appears. What should be seen is a page showing information about active forms sessions.  Information such as Process ID, CPU Usage,  Memory Usage, IP Address, etc.
5.  The following tests help identify the problem area:

Test 1

1. Ensure that em_mode is set to one (1) in the formsweb.cfg
2. Run a couple of instances of the test form -> http://machine.domain:port/forms/frmservlet
and ensure the test form comes up.
3. Go to your MIDDLE_TIER_HOME\sysman\admin\scripts and make a backup copy of this file:
formsproc.pl
4. Now, rename ..\formsproc.pl to something else, say formsproc.pl.org
5. Now click on the 'User Session' link and note if you see any different behavior.

Note: What you should normally see is the 'User Session' page that shows Process ID, CPU Usage,
IP  Address, etc but you would not see any session data because formsproc.pl is what provides the
session info data to the page.

6. Rename formsproc.pl.org to it's original name -> formsproc.pl

Test 2. 

This test is to determine if a perl script can be run on your machine as this is needed to
gather the forms 'User Session' data.

1. Ensure you have accomplished steps 1 & 2 from Test 1.
2. Open a command prompt on the middle_tier machine.
3. Set the oracle home. For example, if the middle tier home is 'D:\mid_1012' then issue this
command:

set oracle_home=d:\mid_1012

4. Issue the following command to move to the perl directory:

cd %oracle_home%\perl\5.6.1\bin\MSWin32-x86

6. Now issue this command and note the results: (this is the script that ASC calls to
show forms data)

perl %ORACLE_HOME%\sysman\admin\scripts\formsproc.pl %ORACLE_HOME%\sysman\admin\scripts %ORACLE_HOME%

After a few seconds, depress the 'Enter' key and you may see the message ->

'The system cannot find the path specified'

However, after a few seconds Forms session info should scroll on the screen. If it doesn't you may get an error like the following ->

"cannot connect to Interix subsystem"  (This is an indication of the problem)
Cause
In this case the installation/configuration of the UNIX Interix subsystem is preventing the necessary Forms perl script (formsproc.pl) from running.
Solution

Assuming that the error message "cannot connect to Interix subsystem"  occurred when running Test 2 then de-install the UNIX Interix subsystem.

If an error message related to a different 3rd part software product occurred in Test 2 then de-install it.

Thursday, June 24, 2010

How to close the parent browser window when running Oracle Forms?


When a forms application is web deployed the parent browser window remains opens after exit_form. Is it possible to close the browser window programatically?

Oracle Forms does not provide any default functionality (e.g a built-in, package procedure or function, applet parameter etc) to close the parent browser window.

It is possible to create a work-around using non-Oracle javascript:
(SEE Special chapter for Internet Explorer version 7 ( IE7))

A: Closing the browser window using javascript called via WEB.SHOW_DOCUMENT.

1. Create a html file with the following code e.g.close.html for Internet Explorer:

<html>
<body onload="closeit()">
<script>
function closeit()
{
window.close();
}
</script>
</body>
</html>

2. Place in this html in a directory which can be accessed via a Oracle HTTP Server virtual directory / alias 

3. In the Forms module add the code  

WEB.SHOW_DOCUMENT('http://machinename.domain:portno/mydirectory/close.html','_self');

in a Post-FORM Trigger.

When the form is then run over the web, the trigger will fire calling the close.html which will in turn close the parent browser window.

B: Simulate Oracle Forms separateFrame=True using javascript

Create a HTML file with the following code:

<HTML>
<HEAD>
<TITLE>My HTML</TITLE>
<SCRIPT>
function my_function()
{
    // Replace Oracle.com URL below with typical Forms Servlet URL
window.open("http://machinename.domain:portno/forms/frmservlet?form=test.fmx","_blank","menubar=0, location=0,toolbar=0,personalbar=0,status=0,scrollbars=1
, resizable=1,width=700,height=550");
    
    // These lines close the first browser window after link is clicked.
    
    win = top;
    win.opener = top;
    win.close ();

}

</SCRIPT>
</HEAD>

<body onload="javascript:my_function">
<p align="center"><img border="0" 
src="http://www.oracle.com/admin/images/oralogo.gif" width="175" height="28">
<br>
<p align="center"><a href="javascript:my_function()">
Click me to run the application.</a> </p>
</body>

</HTML>



When this HTML page is run , it will have a link to launch the forms application. The application will display in a separate browser window (separateFrame=false). The javascript will, however, have removed the parent browser menu, toolbar, status bar and scrollbars. This makes it appear to the 
end user as though the forms application is running in it's own 'MDI' window.

Important Notes:

a. If separateFrame is set to true|yes in a config or default section of the formsweb.cfg it needs to be changed to separateFrame=false|no. Otherwise the result will still be the 'appearance' of a second (parent) browser window containing a black / grey rectangle.

b. When copying and pasting the sample code into a text file, remove any carriage returns which might result in the window.open line. Otherwise a javascript error will occur when clicking on the link to launch the forms application

c. FOR XP servicepack 2 users:

   SP2 has tighter security and shows the message despite the opener=top
   To avoid the message:
   1) in the HTMLbeforeForm parameter in formsweb.cfg the line:
     
   2) adding a "synchronize;" in the POST_FORM trigger before the 
      web.show_document

Source : Oracle Metalink Note 201481.1