subota, 11. svibnja 2013.

Oracle IAS (FORMS) memory mapped file I/O

When running forms on application server as a production everyone is setting FORMS_MMAP=TRUE or leave it unassignet to relieve memory demands on a server. The rule is to put new or updated forms to server at designeted time (I am doing that at midnight when restarting Forms services). But what happened when programmer need to update some forms immediately during peek time.
Suppose that we have multiple forms (100+) from different enviroments. The problem is how to copy requested forms on form server.
One idea is to put FORMS_MMAP to FALSE but that could be too heavy on server memory demands for Forms services. Another idea is to stop OC4J_BI_FORMS through enterprise management but than we hace to disconnect all users, not only that use particular form.
I made a solution in form of a VBS script which create batch file (Windows) to kill only those processes that uses enviroment of a form i need to replace:


'First input name of Forms server (could use InputBox if more than one server)  
strComputer = "server_name"

'Define arguments
Dim arg
Dim pass
Dim argpass

'Define passwords
pass="******"

'Get user to write a password 
argpass=InputBox("Unesite Password:")

'Define output file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("output.bat", True)

'Set WmiService
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 

'Get frmwebprocesses
Set colItems = objWMIService.ExecQuery("Select * from Win32_Process where name='frmweb.exe'")

If pass = argpass Then  

'Get the name of env file
arg = InputBox("What application you need to stop?")
arg=LCase(arg)

'Fill the output.bat file
For Each objItem in colItems
        proc=objItem.ProcessID
     'Get command line 
                     '(actually you get webfile=HTTP-0,0,1,name_of_app_from_env,ip_address)
                     line = objItem.CommandLine
    linesplit=Split(line,",",5) 'Extract the name of aplication from command line
    app=linesplit(3)
    app=LCase(app)
    If arg=app Then     
    objFile.WriteLine "pskill.exe " & proc 'Write the output.bat file
    End if
Next
End if

Output of a VBS script is a batch file output.bat which consists:
pskill.exe 1345
pskill.exe 1328
pskill.exe 1479
pskill.exe 1511

Pskill can be downloaded from: http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx


srijeda, 27. veljače 2013.

The remote session was disconnected because there are no Terminal Server client licenses available for this computer" in Windows XP


Windows XP and Windows  7 users sometimes encounter the error:



"The remote session was disconnected because there are no Terminal Server client licenses available for this computer" in Windows XP"

To work around this problem, follow these steps.
Click Start –> Run
Type regedit and press Enter
Browse to the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing
close registry editor.

četvrtak, 24. siječnja 2013.

Installation OC4J standalone

To configure Apex FOP printing first step is installation of OC4J Standalone (or using BIP Publisher).
To install OC4J Standalone you need:

  • Oracle OC4J Standalone Version 10.1.3.5.0  (http://www.oracle.com/technetwork/middleware/ias/downloads/utilsoft-090603.html)
  • Java SDK 6u38 (http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html)
Define two system variables
  • ORACLE_HOME = C:\ORACLE\OC4J
  • JAVA_HOME=C:\Program Files\Java\jdk1.6.0_38
Unpack OC4J standalone zip to directory c:\oracle\oc4j:



To start OC4J manually go to %ORACLE_HOME%\bin\oc4j -start
When you start first time it will ask you for OC4J password

To stop OC4J manually go to %ORACLE_HOME%\bin\oc4j -shutdown -port "xxxxx" -password "pass"
where:
         "pass" is OC4J password
         "port" is 23791 and is found in: C:\ORACLE\OC4J\j2ee\home\config\rmi.xml (port="23791")

To start OC4j automatically define variable J2EE_HOME=C:\ORACLE\OC4J\j2ee\home
         cd %J2EE_HOME%
         java -jar oc4j.jar
         or with custom configuration script: java -jar oc4j.jar -config /mypath/server.xml

When you are done you should get response on web page:
http://%server_name%:8888 (or any other port you configured)
and OC4J Enterprise Manager at:
http://%server_name%:8888/em

Oracle Forms and Reports Services 10.1.2.0.2 - FRM-92101 - addendum

After some more investigation i found Oracle note about this problem.

"FRM-92101, FRM-92050, FRM-93552 and FRM-93000 Error When Running Forms After a Relatively Small Number (50 - 80) of Concurrent Connections and No New Connection Possible [ID 187455.1]"

Oracle indicates that this solution with ticking "Allow to interact with Desktop" is just for a testing purposes and Microsoft and Oracle did not recommend it as a permanent solution.

Permanent solution will be to edit Windows registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems

Double click on the Windows node value in the right frame.  Increase the  appropriate SharedSection parameter which will be the third one.

Example Setting ->  SharedSection= 1024,3072,512
Solution on my server is SharedSection= 1024,3072,2048

I have problems when third value is greater than second one. Also there is a Microsoft note which says that sum of second and third value could not be more than 48MB on windows 2003 server.

subota, 29. prosinca 2012.

Oracle Forms and Reports Services 10.1.2.0.2 - FRM-92101

After some time i get weird error FRM-92101 at long time installed application server. For a long time configuration of AS did not changed and only difference is that i put some new applications. Before that action total number of users at a peak time was around 20-30 and now its 70+ (top number is 110).

Oracle Errror is : FRM-92101: There was a failure in te Forms server during startup. This could happened during invalid configuration. Please look into web-server log file for details.

I have installed Oracle Forms and Reports Services (standalone) 10.1.2.0.2 on Windows Server 2003 SP2 (full updated).

First step was to look on metalink and there i found few notes about the error itself and most common things to do when error occurs. But all that generalization did not help at all as always when Oracle started generalizing.

After reading many posts on OTN i found a solution. On windows server i go to Services (in command prompt type services.cmd). Then i found OPMN service:


Double click on OracleWINFRSProcesManager, select tab "Log On" and then check "Allow Service to interact with Desktop. After that error never shows again:



nedjelja, 30. rujna 2012.

ESX - Enable SSH support

From time to time there is a need to access ESX beside Vsphere Client. One way is to connect with SSH protocol. To enable SSH protocol you need to go directly to sever console and click "Troubleshooting Options":



and then "Enable Remote Tech Support (SSH)":

ponedjeljak, 20. kolovoza 2012.

A problem is preventing Windows from accurately checking the license for this computer. Error Code: 0x80070002

Check if the following files are present in the System32 Folder

%SystemRoot%\System32\secupd.dat
%SystemRoot%\System32\oembios.dat 
%SystemRoot%\System32\oembios.bin

If any of these files are missing, restore these files, from the setup disk, I386 folder or from another system.


d:\I386>expand oembios.bi_ %SystemRoot%\System32\oembios.bin
d:\I386>expand oembios.da_ %SystemRoot%\System32\oembios.dat

where %SystemRoot% is your windows installation folder (eg. C:\Windows)
Reboot the system.

Your problem must be solved. After rebooting some messages about MS software licenses may pop up. Just ignore and reboote once more. If problem with licenses persist than re-register them.