Author: digitaleagle

Getting Oracle 10.2.0.1 to Start Automatically

I previously blogged about installing PeopleSoft HRMS 9 on a VMWare Image. One of the problems I had was getting the database to start automatically with the service when the image boots. We constantly boot and shutdown the image since we can only have one copy of it running at a time.

In my case, the problem appears to be an Oracle bug. Installing a patch fixed the problem. But, here is everything I learned on the issue.

Patch

Downloading the Patch:

  • Log into http://metalink.oracle.com
  • Go to Patches and Updates
  • Click on Simple Search
  • Search for Patch “4547817“, Platform Microsoft Windows (32-bit)
  • Download (543M)

Installing the Patch:

  • Unzipped it
  • Stopped the Web Server, App Server, Process Scheduler, and the Database
  • Ran the setup.exe
  • See the log below, I had to run catupgrd.sql

After Upgrading the oradim log said this:
Tue Jun 12 17:16:50 2007
c:\oracle\db10g\bin\oradim.exe -startup -sid hcm90 -usrpwd * -pfile c:\oracle\db10g\database\initHCM90.ora -log oradim.log -nocheck 0
Tue Jun 12 17:17:09 2007
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option

So, I used the upgrade option as describe here.

sqlplus /nolog
connect / as sysdba
startup upgrade
@c:\oracle\db10g\rdbms\admin\catupgrd.sql

Logs to Check

Specific to the Service:

%oracle_home%\database\oradim.log

Tue Jun 05 15:28:13 2007
c:\oracle\db10g\bin\oradim.exe -startup -sid hcm90 -usrpwd * -pfile c:\oracle\db10g\database\initHCM90.ora -log oradim.log -nocheck 0
Tue Jun 05 15:28:18 2007
ORA-12560: TNS:protocol adapter error

%oracle_home%\database\sqlnet.log

***********************************************************************
Fatal NI connect error 12560, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oraclehcm90)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))’))(CONNECT_DATA=(SID=hcm90)(CID=(PROGRAM=c:\oracle\db10g\bin\oradim.exe)(HOST=PSQA895)(USER=SYSTEM))))

VERSION INFORMATION:
TNS for 32-bit Windows: Version 10.2.0.1.0 – Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 – Production
Time: 05-JUN-2007 15:28:18
Tracing not turned on.
Tns error struct:
ns main err code: 12560
TNS-12560: TNS:protocol adapter error
ns secondary err code: 0
nt main err code: 530
TNS-00530: Protocol adapter error
nt secondary err code: 2
nt OS err code: 0

Specific to the Listener

%oracle_home%\network\log\listener.log

TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 – Production on 05-JUN-2007 15:28:09

Copyright (c) 1991, 2005, Oracle. All rights reserved.

System parameter file is c:\oracle\db10g\network\admin\listener.ora
Log messages written to c:\oracle\db10g\network\log\listener.log
Trace information written to c:\oracle\db10g\network\trace\listener.trc
Trace level is currently 0

Started with pid=348
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=psqa895)(PORT=1521)))
Listener completed notification to CRS on start

TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
05-JUN-2007 15:29:23 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=orcl)) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.150.25)(PORT=1040)) * establish * orcl * 12514

Other

&oracle_home%\sqlnet.log

The Service and the Registry

Deleting the Service:

At the command prompt> oradim -delete -sid <SID>

If either that doesn’t work or you have uninstalled, you have to open regedit and delete the following key:

HKLM\System\CurrentControlSet\Services\OracleService<SID>

Recreating Your Service:

At the command prompt>
oradim -new -sid <SID> -intpwd <password> -startmode AUTO -pfile <oracle_home>\database\init<SID>.ora

Other Registry Settings:

HKLM\Software\Oracle\Key_<Oracle Home Name>\ORA<SID>_AUTOSTART
Start the database when the service starts

HKLM\Software\Oracle\Key_<Oracle Home Name>\ORA<SID>_PFILE
Location of the Configuration File

HKLM\Software\Oracle\Key_<Oracle Home Name>\ORA<SID>_SHUTDOWN
Shutdown the database when the service stops

HKLM\Software\Oracle\Key_<Oracle Home Name>\ORA<SID>_SHUTDOWNTYPE
type of shutdown to do when stopping the server

Helpful Links

Windows Service Not Starting Your Database?

ORA-12560 on NT

Thread: ORACLE not available problem 10g release 2

Thread: DB not open, with Windows Service

Installing HCM90

I am in the process of installing PeopleSoft HR 9.0 in a VMWare instance for development. I hope to give more details later in case I ever need to do any of this later on.

Here is what I started with:

  • Windows 2003 Server installed in VMWare
  • PeopleSoft HR 8.9/PeopleTools 8.46 installed
  • Oracle 9.2 installed
  • Weblogic

I uninstalled the PeopleSoft, Weblogic, and Oracle database to get back to just a basic Windows installation.

Everything is installed on the same virtual computer because this is just for testing and development. So, I am not worried about connections to/from any other computers with this instance. The PeopleSoft is a demo database so that we have some test data.

Here is what I have installed:

  • Oracle 10g
  • PeopleTools 8.49
  • PeopleSoft HR 9.0
  • Tuxedo 9.1
  • Oracle SOA Suite

Here are some of the problems that I have had:

  • Hard drive space — originally, the PeopleSoft fit on a 25 Gigabyte hard drive; I had to add another 80 Gigabyte drive for this version.
  • Tuxedo Version: PeopleTools 8.48 will install with Tuxedo 8.1; PeopleTools 8.49 requires Tuxedo 9.1
  • Services automatically starting: still working on this one (database, application server, process scheduler)
  • Creating the PeopleSoft database (modifying scripts, running out of hard drive space, restarting the install, etc.)

I will try to blog what I have learned as I get time and as I work through the problems I still have left. Please let me know if there is anything in particular you are interested in in the meantime.

COBOL Stored Statements

Problem:

Application Program Failed

Action Type : SQL SELECT

In Pgm Section : SQLRT: SQL-STMT-GET

Error Message : Stored Statement PSPCKSGD_S_PRMPGRP not found

Stored Stmt : PSPCKSGD_S_PRMPGRP

Viewing the Statement
SELECT * FROM PS_SQLSTMT_TBL
WHERE PGM_NAME || ‘_’ || STMT_TYPE || ‘_’ || STMT_NAME = ‘PSPCKSGD_S_PRMPGRP’

In my case, the statement did not exist. So, I ran the DMS Script through data mover:
<PS Home>/src/cbl/base/pspcksgd.dms

Resources
Re: GLPJEDIT error.

Windows Tip: Windows Activation

One of the problems with using virtual computers is that the hardware is virtual and somewhat easy to change, but the Windows registration is based on the hardware. Sometimes copying the WPA.DBL file can fix the problem.

I didn’t keep good notes on this, but I think the problem was caused the updating the Vmware tools in an image. After those changes, the activation screen displayed and I could not login. So, I copied the wpa.dbl file from an old copy of the Vmware Image and overwrote the file in the new image. After that, I never saw the activation screen again.

I tried this same approach when I attempted to migrate a Windows image to a VMWare image. It did not work that time, and I ran out of time to figure out why.

File Location: c:\windows\system32\wpa.dbl

Resources

Windows Tip of the Day: Avoid Re-Activate Windows XP After a Reinstallation

Windows Product Activation (WPA) for Windows XP

Windows Product Activation (WPA) on Windows XP

Service Administration Tip: Environment for Change Assistant

This tip helps with getting Change Assistant to run. You have to get all the pieces talking together in order to use Change Assistant.

Start with the Hub

Log into URL http://<server>:<port>/PSEMHub/hub

This page will tell you what processes are connected to the hub.

Determining the port —
check the configuration file: <weblogic home>\config.xml
Domain tag > Server tag > ListenPort attribute

or check the weblogic administration console
Click on Servers under Domain Configurations — Network Configuration
The port number should be listed in the Listen Port column.

If the hub is not running
change directory to <PIA home>/
one time startup:
startManagedWebLogic PSEMHUB
(all capitals for the PSEMHUB)
or install as a service
installNTService PSEMHUB
(make sure to also start the service)
Update: In Tools 8.49, the path is changed to <PIA home>/peoplesoft/bin

Resources
“Running the Hub on Multiple Servers”

Agent

Configure:
change the file — <ps home>/PSEMAgent/envmetadata/config/configuration.properties
Change property hubURL to the valid URL for the Hub discussed above
Change the windowsdriverstocrawl or the unixdriverstocrawl to the locations where PeopleSoft is installed

Start the agent
change directory to: <ps home>/PSEMAgent
run StartAgent
or
change directory to: <ps home>/bin/server/WinX86
run psemAgentService /install <ps home>/PSEMAgent

Resources
“Running an Agent”
“Automatically Starting an Agent in Windows”

File Layout Order

One problem with the file layout editor in Application Designer is that you cannot see the fields in order in which they appear in the file. For XML files, this does not matter, but for CSV files or flat files, the order is very important, especially in troubleshooting.

Here is some SQL that will show you the fields in the correct order (Just replace the <File Layout Here>):

SELECT * FROM PSFLDFIELDDEFN
WHERE FLDDEFNNAME = '<file Layout Name>'
ORDER BY FLDSTART

Server Administration Tip: Logging Into the Weblogic Console

URL:
http://<hostname>:<port>/console
Note: the port may or may not be the same port number as the port you use for PeopleSoft.

Directories
web logic is generally installed in <ps home>\webserv\
generally there is only 1 folder in <ps home>\webserv and that is the domain name

Determining the host name and port
look in: <weblogic home>\setEnv.cmd
SET ADMINSERVER_PROTOCOL=HTTP
SET ADMINSERVER_PORT=<port number>
SET ADMINSERVER_HOSTNAME=<server name>
SET ADMINSERVER_SERVERNAME=WebLoginAdmin

or you can look in: <weblogic home>\config.xml
Domain tag > Server tag > ListenPort attribute

Default Login
user: system
password: password

Starting the Console
if it doesn’t connect, you may have to start it manually
startWebLogicAdmin
same directory as setEnv.cmd

Installing as a service
installNTService
with no parameters

Object Type View

To my knowledge, the PeopleSoft catalog has no way of providing descriptions for its object type and object ID fields. So, I have created these two custom views. They are handy for joining to tables like PSPROJECTITEM.

View of Object Types

Fields

  • OBJECTTYPE
  • DESCR

SQL:

SELECT 00, ‘Records’ FROM PS_INSTALLATION UNION
SELECT 01, ‘Indexes’ FROM PS_INSTALLATION UNION
SELECT 02, ‘Fields’ FROM PS_INSTALLATION UNION
SELECT 03, ‘Field Formats’ FROM PS_INSTALLATION UNION
SELECT 04, ‘Translate Values’ FROM PS_INSTALLATION UNION
SELECT 05, ‘Pages’ FROM PS_INSTALLATION UNION
SELECT 06, ‘Menus’ FROM PS_INSTALLATION UNION
SELECT 07, ‘Components’ FROM PS_INSTALLATION UNION
SELECT 08, ‘Record People Code’ FROM PS_INSTALLATION UNION
SELECT 09, ‘Menu People Code’ FROM PS_INSTALLATION UNION
SELECT 10, ‘Queries’ FROM PS_INSTALLATION UNION
SELECT 11, ‘Tree Structures’ FROM PS_INSTALLATION UNION
SELECT 14, ‘Colors’ FROM PS_INSTALLATION UNION
SELECT 15, ‘Styles’ FROM PS_INSTALLATION UNION
SELECT 17, ‘Business Processes’ FROM PS_INSTALLATION UNION
SELECT 18, ‘Activities’ FROM PS_INSTALLATION UNION
SELECT 19, ‘Role’ FROM PS_INSTALLATION UNION
SELECT 20, ‘Process Definitions’ FROM PS_INSTALLATION UNION
SELECT 21, ‘Server Definitions’ FROM PS_INSTALLATION UNION
SELECT 22, ‘Process Type Definitions’ FROM PS_INSTALLATION UNION
SELECT 23, ‘Job Definitions’ FROM PS_INSTALLATION UNION
SELECT 24, ‘Recurrence Definitions’ FROM PS_INSTALLATION UNION
SELECT 25, ‘Message Catalog Message’ FROM PS_INSTALLATION UNION
SELECT 29, ‘Business Interlink’ FROM PS_INSTALLATION UNION
SELECT 30, ‘SQL’ FROM PS_INSTALLATION UNION
SELECT 31, ‘File Layout Definitions’ FROM PS_INSTALLATION UNION
SELECT 32, ‘Component Interfaces’ FROM PS_INSTALLATION UNION
SELECT 33, ‘Application Engine Programs’ FROM PS_INSTALLATION UNION
SELECT 34, ‘Application Engine Sections’ FROM PS_INSTALLATION UNION
SELECT 35, ‘Message Nodes’ FROM PS_INSTALLATION UNION
SELECT 36, ‘Message Channels’ FROM PS_INSTALLATION UNION
SELECT 37, ‘Messages’ FROM PS_INSTALLATION UNION
SELECT 38, ‘Approval Rule Sets’ FROM PS_INSTALLATION UNION
SELECT 39, ‘Message People Code’ FROM PS_INSTALLATION UNION
SELECT 40, ‘Subscription People Code’ FROM PS_INSTALLATION UNION
SELECT 42, ‘Comp Interface People Code’ FROM PS_INSTALLATION UNION
SELECT 43, ‘Application Engine People Co’ FROM PS_INSTALLATION UNION
SELECT 44, ‘Page People Code’ FROM PS_INSTALLATION UNION
SELECT 45, ‘Page Field People Code’ FROM PS_INSTALLATION UNION
SELECT 46, ‘Component People Code’ FROM PS_INSTALLATION UNION
SELECT 47, ‘Component Record People Code’ FROM PS_INSTALLATION UNION
SELECT 48, ‘Component Rec Fld People Code’ FROM PS_INSTALLATION UNION
SELECT 49, ‘Images’ FROM PS_INSTALLATION UNION
SELECT 50, ‘Style Sheets’ FROM PS_INSTALLATION UNION
SELECT 51, ‘HTML’ FROM PS_INSTALLATION UNION
SELECT 53, ‘Permission Lists’ FROM PS_INSTALLATION UNION
SELECT 54, ‘Portal Registry Definitions’ FROM PS_INSTALLATION UNION
SELECT 55, ‘Portal Registry Structures’ FROM PS_INSTALLATION UNION
SELECT 56, ‘URL Definitions’ FROM PS_INSTALLATION UNION
SELECT 57, ‘Application Packages’ FROM PS_INSTALLATION UNION
SELECT 58, ‘Application Package People C’ FROM PS_INSTALLATION UNION
SELECT 59, ‘Portal Registry User Homepag’ FROM PS_INSTALLATION UNION
SELECT 60, ‘Analytic Types’ FROM PS_INSTALLATION UNION
SELECT 61, ‘Archive Templates’ FROM PS_INSTALLATION UNION
SELECT 62, ‘XS LT’ FROM PS_INSTALLATION UNION
SELECT 63, ‘Portal Registry User Favorit’ FROM PS_INSTALLATION UNION
SELECT 64, ‘Mobile Pages’ FROM PS_INSTALLATION UNION
SELECT 65, ‘Relationships’ FROM PS_INSTALLATION UNION
SELECT 66, ‘CI Property People Code’ FROM PS_INSTALLATION UNION
SELECT 67, ‘Optimization Models’ FROM PS_INSTALLATION UNION
SELECT 68, ‘File References’ FROM PS_INSTALLATION UNION
SELECT 69, ‘File Type Codes’ FROM PS_INSTALLATION UNION
SELECT 70, ‘Archive Object Definitions’ FROM PS_INSTALLATION UNION
SELECT 71, ‘Archive Templates( Type2)’ FROM PS_INSTALLATION UNION
SELECT 72, ‘Diagnostic Plug- Ins’ FROM PS_INSTALLATION UNION
SELECT 73, ‘Analytic Models’ FROM PS_INSTALLATION UNION
SELECT 75, ‘Java Portlet User Preference’ FROM PS_INSTALLATION UNION
SELECT 76, ‘WSRP Remote Producers’ FROM PS_INSTALLATION UNION
SELECT 77, ‘WSRP Remote Portlets’ FROM PS_INSTALLATION UNION
SELECT 78, ‘WSRP Cloned Portlet Handles’ FROM PS_INSTALLATION

View of Object IDs

This view may not be complete, but it attempts to map the OBJECTID1, 2, 3, … field to the OBJECTTYPE field.

Fields:

  • OBJECTTYPE
  • DESCR
  • OBJECTID

SQL:

SELECT 0,’Records’,1 FROM PS_INSTALLATION UNION
SELECT 2,’Fields’,6 FROM PS_INSTALLATION UNION
SELECT 3,’Field Formats’,23 FROM PS_INSTALLATION UNION
SELECT 5,’Pages’,9 FROM PS_INSTALLATION UNION
SELECT 6,’Menus’,3 FROM PS_INSTALLATION UNION
SELECT 11,’Tree Structures’,37 FROM PS_INSTALLATION UNION
SELECT 15,’Styles’,35 FROM PS_INSTALLATION UNION
SELECT 17,’Business Processes’,7 FROM PS_INSTALLATION UNION
SELECT 18,’Activities’,18 FROM PS_INSTALLATION UNION
SELECT 19,’Role’,32 FROM PS_INSTALLATION UNION
SELECT 21,’Server Definitions’,33 FROM PS_INSTALLATION UNION
SELECT 23,’Job Definitions’,27 FROM PS_INSTALLATION UNION
SELECT 24,’Recurrence Definitions’,31 FROM PS_INSTALLATION UNION
SELECT 29,’Business Interlink’,64 FROM PS_INSTALLATION UNION
SELECT 31,’File Layout Definitions’,71 FROM PS_INSTALLATION UNION
SELECT 32,’Component Interfaces’,74 FROM PS_INSTALLATION UNION
SELECT 33,’Application Engine Programs’,66 FROM PS_INSTALLATION UNION
SELECT 35,’Message Nodes’,62 FROM PS_INSTALLATION UNION
SELECT 36,’Message Channels’,61 FROM PS_INSTALLATION UNION
SELECT 37,’Messages’,60 FROM PS_INSTALLATION UNION
SELECT 50,’Style Sheets’,94 FROM PS_INSTALLATION UNION
SELECT 53,’Permission Lists’,89 FROM PS_INSTALLATION UNION
SELECT 54,’Portal Registry Definitions’,98 FROM PS_INSTALLATION UNION
SELECT 56,’URL Definitions’,103 FROM PS_INSTALLATION UNION
SELECT 60,’Analytic Types’,109 FROM PS_INSTALLATION UNION
SELECT 64,’Mobile Pages’,111 FROM PS_INSTALLATION UNION
SELECT 69,’File Type Codes’,122 FROM PS_INSTALLATION UNION
SELECT 73,’Analytic Models’,12 FROM PS_INSTALLATION

Registration Reference

In teaching my classes, the component registration has always caused the most trouble. First, the new PeopleSoft programmers have trouble remembering the steps. Second, something always seems to go wrong, and the students don’t know where to start looking. Hopefully, this reference should help.

Three Parts
1. Menu — add the component to the menu
2. Portal — add a link to the online menu system
3. Security — add the component/menu to a permission list


Manual vs. Registration Wizard

PeopleSoft added the “Registration Wizard” to Application Designer to create a quick easy to register a new component. The key concept is that it exists for new registrations and does not help when fixing problems or changing the registration.

You can use the wizard for all three parts, just one part, or any combination in between. The first page of the wizard will ask you which steps you want to perform, and you just check the parts you want.

Things you can do with the wizard:

  • add a component to an existing menu
  • add a component to the portal menu if it is not already on the portal
  • add a component to a permission list

Things you cannot do with the wizard (can be done manually):

  • change or set the label on a menu item
  • move a component from one menu to another
  • create a new menu and add a component
  • change the folder or edit portal content references
  • add a component to a new folder in the portal that does not exist
  • add the component to the portal a second time

Bottom Line: the wizard is for new registrations, not fixing or changing

Registration Wizard Pages
Page 1: Select which parts you want to perfom
Page 2: Select the menu — either the menu to add it to or the menu it is already on
Page 3: Enter the Portal information — for creating the content reference; optional
Page 4: Pick the permission list — adding the component to the permission list; optional
Page 5: Review/add definitions to the project

Part 1 — Menu
Manually, this is done in Application Designer.

  • Add to an existing menu: Ctrl + O, pick menu for the type, and enter the menu name
  • Add to a new menu: Ctrl + N, pick menu for the type

In either case, you drag the component from the project to the menu. Hold the component over the bar item and wait for it to expand, then, drop the component on the box with the dotted line. Or, you can double click on the box with the dotted line, and fill out the information manually.

In the wizard, you much select the menu that you want to add the component to and the bar on that menu where the component should go. The menu must already exist to use the wizard — the wizard will not create a menu and you cannot create an empty menu first (the menu must have at least one component on it).

Also, remember if you use the wizard, but you choose not to add the component to the menu with the wizard, it will still ask you for the menu name. Both the portal registry and the permission list require a menu-component combo. The wizard will only use the menu name on the portal and the permission list rather than add the component to the menu.

Part 2 — Portal Registry
Manually, you must place the component in the registry online.
Navigation: PeopleTools > Portal > Structure and Content
First, navigate to the folder where you want to add the content reference. Then, click “Add Content Reference” at the bottom of the page.

If you are editing a content reference, you must click on the “Edit” link next to the content reference to change any information.

Warning — pay special attention to the spelling of the menu name and the component name. The page will not tell you if you spell it wrong. It just won’t work.

Using the wizard, first you must know the name of the folder where you want to add the component. If you don’t know the name, you must use the manual method to find the folder, and click the “Edit” link to get the name.

The other information in the wizard is the same as the manual method.

Part 3 — Permission Lists

Manually, you must also do this step online.
Navigation: PeopleTools > Security > Permission Lists & Roles > Permission Lists
First, search for the permission list that you want to add to the component to. Then, go to the pages tab (although it shows a list of menus, you will eventually pick the pages the user has access to). Either find the menu in the list, or add the menu to the list. Then, click the “Edit Components” link for that menu. Next, find the component, and click the Pages link. Finally, select the pages and the actions to grant security.

Additional Pieces
Note: none of these can be added with the registration wizard

  • User Profile (user name that the user logs in with):
    PeopleTools > Security > User Profiles > User Profile
  • Role (links the User profile to the permission list):
    PeopleTools > Security > Permissions & Roles > Roles

In the wizard, you simply pick the permission list and choose the actions to give security. The wizard gives access to all pages in the component.