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;

REP-56048 When Generating Large PDF Using Font Subsetting And UTF8 Character Set


Generating a PDF file from a large report, causes engine crash:

REP-56048: Engine rwEng-0 crashed job id xxThe issue occurs in the following environment:

1.Server Platform : Microsoft Windows Server 2003 
2.Oracle Reports 10.1.2.3 
3.PDF font subsetting is used 
4.NLS_LANG=_.UTF8 
Checking the option "Install files for complex script and right-to-left language" in Regional and Language Options > Languages does not help

Trying different values for jvmOptions does not help:

-Xmx512M -Xms128M -Xss512k 
-Xmx1024M -Xms128M -Xss512k 
......

When PDF subsetting is commented out, the issue does not reproduce. 
When using different NLS_LANG rather UTF8, the issue does not reproduce.

Cause
Bug 7133555 - REPORTS SERVER(ENGINE) HANGS WHEN RUNNING PDF REPORT WITH MANY PAGES ON WIN2003

Solution
Download and Apply one-off Patch 7133555 on top of reports 10.1.2.3


Source : Oracle Metalink: Doc ID 888222.1

PDF Report Output Fails with REP-56048 when Using a GIF Image


Running a PDF report that includes a GIF image file in the layout model and using the Oracle Reports parameter "outputimageformat=gif" is causing the report engine to crash and the following error is being displayed:

REP-56048: Engine rwEng-0 crashed., job Id

Cause
GIF Image format file not being recognized or is corrupted. 

Solution
If the original GIF image file is available, then open it with an Image Editor and save it as JPG image format file and then replace the GIF image in the report definition file with the new JPG image format one.

If the original GIF image file is not available, then following steps can be done to retrieve the image from the original report and then save it as JPG image format.

1.Open the report in Reports Builder.
2.Go to Paper Layout where you can see the image.
3.Type on keyboard shift+PrtScn.
4.Open mspaint.exe (Microsoft Paint - Windows Image Editor).
5.Paste the screenshot from step 3 with ctrl+v.
6.Select the image area and do ctrl+c.
7.Open a new mspaint.exe and do ctrl+v and resize image if needed.
8.Save the image as JPG format.
9.Now you can insert the new image in your report to replace the GIF one.


Source : ORacle Metalink Doc ID: 987009.1

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