Tuesday, November 11, 2008

Oracle Forms - REP-56048: ENGINE RWENG-0 CRASHED

If your Oracle forms crash due to error REP-56048: ENGINE RWENG-0 CRASHED. The problem is due to a large records retrieved. Then there are several solution:-

1) Restrict the number of records return by the reports. To less than 20000 for 4M java memory options.(solution 2)

2)Changed your report.conf at 10.1.2.0/reports/conf by adding the java memory as below. Example , i increase the jvmoptions to 4096k

class="oracle.reports.engine.EngineImpl" id="rwEng" maxengine="1" initengine="1" jvmoptions="-Xoss4096k" callbacktimeout="90000" maxidle="30" englife="1" nengine="0"

3) Remove the "Remove & from Report" in the reports at the report builder. The causes is due to the the report need to process the number of page and this requires a lot of resources.

Working with Oracle Forms and NLS Language/Globalization issues

Recently, we have problem in displaying thai language fonts in the Report builder (windows) and the Oracle Forms servers (unix).

To solved the problem at the Report Builder, first we need to set the language support at the registry .

In the HKLM/Software/OracleDeveloper then at NLS_LANG, we set from the western code "AMERICAN_AMERICA.WE8MSWIN1252" to the unicode ENGLISH_UNITED_KINGDOM.UTF8.

Then we need to change the NLS_LANG at the file default.env , C:\oracle\product\developer\forms\server. Ame thing add the NLS_LANG at this file.


In the Oracle Forms server,
1) First , you need to determine which PPD file you are using. by using the following to test it,
http://:/reports/rwservlet?report=test.rdf&destype=file&desname=/tmp
/test_rep.ps

The content of this file should contain the output:
% NOTE: This file was generated with the PPD file .ppd

2) Then you need to add your fonts into the PPD file, in my case is the screenprinter.ppd at the guicommon/tk/admin/PPD
at the "*DefaultFont: Courier" add the font name.
*Font ArialUnicodeMS: Standard "(001.004)" Standard ROM

add the below, to use the Arial style (bold, italic) fonts
*Font ArialMT: Standard "(001.004)" Standard ROM
*Font Arial-ItalicMT: Standard "(001.004)" Standard ROM
*Font Arial-BoldMT: Standard "(001.004)" Standard ROM
*Font Arial-BoldItalicMT: Standard "(001.004)" Standard ROM


3) Convert the fonts from windows truetypefont, ttf to the AFM type by using ttf2pt1 gnuwin32 tool. Do this for Arial if you want to use this font. Rename the AFM, to just the font name. e.g. the file will be ArialUnicodeMS and ArialUnicodeMS.pfa

Open the file and changed the FontName to the correct short font name. In my case is from Arial Unicode MS to ArialUnicodeMS.

Remember to convert the file from windows to unix format. using dos2unix. To find out if the font still is in msdos format try this. od -a arial.ttf grep cr . If there is output then it is still in msdos format.

4) Copy the AFM and the PFA file to the guicommon/tk/admin/AFM folder.


5) We then need to change the uifont.ali, in the guicommon/tk/admin folder. You can set it in the common uifont.ali or make a copy of the file then set it into a new folder e.g. font_test and then set the environment at /reports/conf/opmn.conf under your Ias-Componentss , and the PATH e.g.


variable id="TK_FONTALIAS" value="/ApplTop/product/10.1.2.0/guicommon/tk/admin/Arial"/

In the uifont.ali
Comment out the the item in the #Mapping from MS Windows and # Mapping from Macintosh

Then goto the end of the file, in the [ PDF:Subset ] section add the following. This will add the Arialunicode ms as pdf font subset and also used the Arial as bold and italic format when the report needed.

"Arial Unicode MS"..... = "ARIALUNI.ttf"
"ArialUnicodeMS"..... = "ARIALUNI.ttf"

# Replace normal Arial fonts with the Arial Unicode MS fonts
"arial"...Bold.. ="arialbd.ttf"
"arial"..Italic.Bold.. ="arialbi.ttf"
"arial"..Italic... ="ariali.ttf"
"Arial"..... ="ARIALUNI.ttf"

6) Copy the .ttf fonts to the path that is inside the opmn.conf. variable id="PATH" value=""

7) Changed the guicommon/tk/admin/US/Tk2Motif.rgb. Add this entry after the
!Tk2Motif*fontMapCs: iso8859-2=EE8ISO8859P2
add this k2Motif*fontMapCs: iso8859-1=UTF8

8) Changed the reports.sh in the $ORACLE_HOME/bin folder. changed this
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
into
NLS_LANG=AMERICAN_AMERICA.UTF8; export NLS_LANG

9) To test the report, after you restart the opmn services
rwrun.sh report= destype=file desname=/tmp/test.pdf desformat=pdf batch=yes userid=test/test@test


Follow the metalink guide, if you need to configure it properly

Note 356221.1: A Practical Methodology on Porting Reports from Windows to Unix with Different Fonts
Note 726205.1: Step By Step To Generate Arabic PDF Reports on Unix
Note 350971.1: Troubleshooting Guide for Font Aliasing / Font Subsetting / Font Embedding Issues
Note 414803.1: How to Display 'Multiple Designed Fonts' in PDF Outputs of Reports Designed Using Multiple Fonts?

Wednesday, October 15, 2008

Transfer login to different server

IN Sql server 2000, To transfer the login with password to another sql server , you need to run the below sql

print ''
print '-- Script for restoring standard sql logins.'
print '-- As found on ' + @@servername + ' per ' + cast(getdate() as char)
select cast('exec sp_addlogin ''' + upper(a.loginname) + ''', ' as varchar(40)),
convert(varbinary(64),b.password),
cast(',''' + 'YOURDBSNAME' + ''', ' +
'''' + 'us_english' + ''', ' as varchar(35)),
convert(varbinary(64),b.sid),
',''skip_encryption'' '
from master.dbo.syslogins a,
master.dbo.sysxlogins b
where a.isntname = 0
and a.sid = b.sid
and b.name not in ('sa','repl_publisher','repl_subscriber')
order by b.name
Print ''

IN SQL server 2005, you use this SP_HELP_REVLOGIN

to create this sp, follow this microsoft link http://support.microsoft.com/kb/918992/

Sunday, September 14, 2008

SQL Server - changing password of replication

To change password for the subscriber , use the below sql 2000 command,

exec sp_helpsubscriberinfo
exec sp_changesubscriber @subscriber ='abcd', @password 'abcd'

Tuesday, August 19, 2008

Changing SQL Server Network Connetivity Protocol priority using registry

Without using the SQL network client tools or SQL server client tool, to changed the client pc sql network protocol you can use the below to register. This registry will add a Protocol order and set the "tcp np" as the values. That's means the tcp will be priority over the name pipes.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib]
"ProtocolOrder"=hex(7):74,00,63,00,70,00,00,00,6e,00,70,00,00,00,00,00
"Encrypt"=dword:00000000

Tuesday, July 29, 2008

Favicon's in a SharePoint 2007


There are many ways to add Favicons in the sharepoint , one of the way you can do that is by changing the Default Master Page. Follow this link to the guide on doing this.
http://www.sharepointblogs.com/mossman/archive/2008/01/18/favicon-s-in-a-sharepoint-master-page.aspx

Another way, is to add the Favicons, to the root directory of your website. e.g. in the C:\Inetpub\wwwroot\wss\VirtualDirectories\80 , where this is the virtual directories of the 80.

For some sharepoint website that you have difficulty in doing the above, another way is to changed the default.asp of your sharepoint which is not recommended.
To changed the page , goto C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\PMD . where the PMD is my directory website that i want to add the favicons. e.g. www.test.com/PMD

Backup the default.aspx and add the following in the asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" after the script tag and put the favicon image into your C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\PMD\IMAGES


link rel="icon" href="/_Layouts/PMD/Images/favicon.ico" type="image/png">
link rel="shortcut icon" href="/_Layouts/PMD/Images/favicon.ico" type="image/png">


Sunday, July 20, 2008

Problem :Communication from the Oracle Management Service host to the Agent host failed.

When the oracle enterprise manager able to see the agent is up and you can see that the performance metric but with some error "Communication from the Oracle Management Service host to the Agent host failed."

You need to reconfigure the agent to rediscover the OEM.

In windows , agentctl -d (rediscover)

Amended :-
it should be agentca -d