Monday, December 28, 2009

DB Wizard 8.50 for Oracle on Linux

I should start this article by saying DB Wizard is not usually my cup of tea, especially for Oracle database.
I already used it for DB2 database on Peopletools 8.48 and 8.49, and it worked smoothly, eventhough I'm not a DB2 guy ! But DB Wizard for Oracle had always screwed me up, just by seeing the number of manual modifications before to be able to run the Wizard. Honestly, I've never had the patience to go through the DB Wizard till the end of the process, in comparison it was so easy (and most probably faster) for me to create the database manually.
But thing can changed, and why not check this within the latest Peopletools version.

Here we go.

Note, I'm working on OEL5.3 64-bit and Oracle 11.2.0.1.

1. The user to be used :
Since we create an Oracle database, manage starting it up, use Oracle user (owner of Oracle software) is more than recommanded.

2. The init.ora and password files :
First, we need to have a valid init.ora file, let's follow the doc word by word on this, and create the file under $ORACLE_HOME/dbs with the minimum required :
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ more initO2H91WZD.ora
DB_NAME = O2H91WZD
DB_FILES = 1021
CONTROL_FILES = /oradata/O2H91WZD/O2H91WZD_ctl1.ora,/oradata/O2H91WZD/O2H91WZD_ctl2.ora
OPEN_CURSORS = 1000
db_block_size = 8192
NLS_LENGTH_SEMANTICS=CHAR
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$
Then create the password file as well :
[oracle@orion2:/apps/oracle/admin/o2h91wzd/pfile]$ cd $ORACLE_HOME/dbs
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ orapwd file=pwdo2h91wzd.ora entries=5 password=oracle
3. The directories to be created :
Under $ORACLE_BASE :
[oracle@orion2:/apps/oracle/admin]$ mkdir -p o2h91wzd/bdump
[oracle@orion2:/apps/oracle/admin]$ mkdir -p o2h91wzd/adump
[oracle@orion2:/apps/oracle/admin]$ mkdir -p o2h91wzd/udump
[oracle@orion2:/apps/oracle/admin]$ mkdir -p o2h91wzd/cdump
[oracle@orion2:/apps/oracle/admin]$ mkdir -p o2h91wzd/pfile
And for the datafiles :
[oracle@orion2:/apps/oracle/admin/o2h91wzd/pfile]$ mkdir /oradata/o2h91wzd
4. tnsnames.ora modification :
Add the tns entry for the new database :
more $ORACLE_HOME/network/admin/tnsnames.ora
[...]

o2h91wzd =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orion2.phoenix-nga)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = o2h91wzd)
)
)
5. start the listener :
lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-DEC-2009 16:45:05

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

Starting /apps/oracle/product/11.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Log messages written to /apps/oracle/diag/tnslsnr/orion2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orion2.phoenix-nga)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 27-DEC-2009 16:45:06
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /apps/oracle/diag/tnslsnr/orion2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orion2.phoenix-nga)(PORT=1521)))
The listener supports no services
The command completed successfully
6. Run the psconfig.sh :
Be sure the Oracle user has enough rights against the PS_HOME you are running the Wizard from (especially $PS_HOME/log, $PS_HOME/modifiedscript and $PS_HOME/scripts).
And invoke the psconfig.sh shell script :
[oracle@orion2:/apps/psoft/ptools850]$ . ./psconfig.sh
7. Scripts modifications :
Before running the DB Wizard, we need to be sure the mount points will be the right ones. Three scripts have to be modify according to your configuration. By default, the datafiles of the database are going to /mount_point_chosed_in_Wizard/oradata/SID.
The simplest way is to remove the "/oradata" from the files createdb10.sql, hcddl.sql and utlspace.sql under $PS_HOME/scripts.

8. Run the Wizard :


8.1 Wrong rights :
[oracle@orion2:/apps/psoft/ptools850]$ cd $PS_HOME/setup/PsMpDbInstall
[oracle@orion2:/apps/psoft/ptools850/setup/PsMpDbInstall]$ ./setup.sh
Setting temporary directory /tmp/IA.4774
Executing setup.linux -DPS_UMASK=0022
Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

Preparing CONSOLE Mode Installation...

===============================================================================
Peoplesoft Database Configuration (created with InstallAnywhere by Macrovision)
-------------------------------------------------------------------------------



===============================================================================
Welcome
-------

Welcome to the PeopleSoft Database Configuration Wizard 8.50

This Wizard will assist you in configuring and loading a PeopleSoft database.



PRESS TO CONTINUE:
===============================================================================


Please enter an installation location or press to accept the default
(DEFAULT: /apps/psoft/ptools850):
You do not have write permissions to the chosen installation destination.
Please choose a different location for installation
=> Note, nowhere in the doc it is saying that, but if you got this error, be sure you have write right against the folder containing the PS_HOME, in my case, I changed the rights on /apps/psoft regarding the Oracle user.
Once it is changed, go back to the Wizard, and press enter to continue :

8.2 DBName in upper case
Please enter an installation location or press  to accept the default
(DEFAULT: /apps/psoft/ptools850):

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :



===============================================================================




For a database platform of 'Oracle', are you installing a:


1- Non-Unicode Database
->2- Unicode Database

To select an item enter its number, or 0 when you are finished [0] :

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :


Oracle - UNICODE


===============================================================================




Select Character Set:


->1- AL32UTF8
2- UTF8




To select an item enter its number, or 0 when you are finished [0] :


Database Create Type:


->1- Demo
2- System
3- PeopleTools System

To select an item enter its number, or 0 when you are finished [0] :

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :

===============================================================================




Select PeopleSoft Application:


->1- PeopleSoft HRCS Database - US English

To select an item enter its number, or 0 when you are finished [0] :

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :



===============================================================================



Specify the directory path for 'sqlplus' [/apps/oracle/product/11.2.0/bin]
:

Specify the location for ORACLE_HOME [/apps/oracle/product/11.2.0]
:

Location of modified scripts: /apps/psoft/ptools850/modifiedscripts

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :



===============================================================================




Do you want to create a new SID or use existing one?


->1- Create new SID
2- Use existing SID

To select an item enter its number, or 0 when you are finished [0] :

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :



===============================================================================



Oracle SID [HC]: o2h91wzd

DatabaseName [HC]: o2h91wzd

Mount Point 1( for SYSTEM and REDO LOGS file in createdb.sql, ex: NT 'C' ,
UNIX 'u01') [c]: oradata

Mount Point 2 ( for PSTEMP and PSDEFAULT file in utlspace.sql, ex: NT 'C' ,
UNIX 'u01') [c]: oradata

Mount Point 3 ( for all files in xxddl.sql, ex: NT 'C' , UNIX 'u01') [c]
: oradata
Here be careful, be sure about the mount points, no extra slashes are needed.

Enable AutoExtend for Peoplesoft Tablespaces?


->1- Yes
2- No

To select an item enter its number, or 0 when you are finished [0] :

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :



===============================================================================
Error
-----

Invalid entry: Database Name has to be within 8 characters and all upper cases

PRESS TO ACCEPT THE FOLLOWING (OK):

=> well, as mentionned in the document, the database name must ne in upper case, it is dispointing me, most of customers I work for refuse to use dbname in upper case in Linux/Unix systems.
So, right now, we have to change everything in upper case :
[oracle@orion2:/home/oracle]$ cd $ORACLE_BASE/admin
[oracle@orion2:/apps/oracle/admin]$ ls
DMOCRM9 DMOFSCM9 DMOHRMS9 o2h91wzd
[oracle@orion2:/apps/oracle/admin]$ mv o2h91wzd O2H91WZD
[oracle@orion2:/apps/oracle/admin]$ cd O2H91WZD/pfile
[oracle@orion2:/apps/oracle/admin/O2H91WZD/pfile]$ ls
inito2h91wzd.ora
[oracle@orion2:/apps/oracle/admin/O2H91WZD/pfile]$ mv inito2h91wzd.ora initO2H91WZD.ora
[oracle@orion2:/apps/oracle/admin/O2H91WZD/pfile]$ vi initO2H91WZD.ora
[oracle@orion2:/apps/oracle/admin/O2H91WZD/pfile]$ more initO2H91WZD.ora
DB_NAME = O2H91WZD
DB_FILES = 1021
CONTROL_FILES = /oradata/O2H91WZD/O2H91WZD_ctl1.ora,/oradata/O2H91WZD/O2H91WZD_ctl2.ora
OPEN_CURSORS = 1000
db_block_size = 8192
NLS_LENGTH_SEMANTICS=CHAR
[oracle@orion2:/apps/oracle/admin/O2H91WZD/pfile]$ cd $ORACLE_HOME/dbs
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ ls
hc_DMOCRM9.dat hc_DMOHRMS9.dat init.ora lkDMOFSCM9 pwdDMOCRM9.ora pwdDMOHRMS9.ora spfileDMOCRM9.ora spfileDMOHRMS9.ora
hc_DMOFSCM9.dat inito2h91wzd.ora lkDMOCRM9 lkDMOHRMS9 pwdDMOFSCM9.ora pwdo2h91wzd.ora spfileDMOFSCM9.ora
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ rm inito2h91wzd.ora
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ rm pwdo2h91wzd.ora
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ ln -s /apps/oracle/admin/O2H91WZD/pfile/initO2H91WZD.ora .
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ orapwd file=pwdo2h91wzd.ora password=oracle entries=5
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$
[oracle@orion2:/apps/oracle/product/11.2.0/dbs]$ more $ORACLE_HOME/network/admin/tnsnames.ora
[...]
O2H91WZD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orion2.phoenix-nga)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = O2H91WZD)
)
)

[oracle@orion2:/oradata]$ ls
DMOCRM9 DMOFSCM9 DMOHRMS9 lost+found o2h91wzd
[oracle@orion2:/oradata]$ mv o2h91wzd O2H91WZD
[oracle@orion2:/oradata]$

Here, you need to restart the Wizard from scratch.

8.3 ORACLE_SID need to be set :
Restart from the dbname :
...
Oracle SID [o2h91wzd]: O2H91WZD

DatabaseName [o2h91wzd]: O2H91WZD

Mount Point 1( for SYSTEM and REDO LOGS file in createdb.sql, ex: NT 'C' ,
UNIX 'u01') [oradata]:

Mount Point 2 ( for PSTEMP and PSDEFAULT file in utlspace.sql, ex: NT 'C' ,
UNIX 'u01') [oradata]:

Mount Point 3 ( for all files in xxddl.sql, ex: NT 'C' , UNIX 'u01')
[oradata]:


Enable AutoExtend for Peoplesoft Tablespaces?


->1- Yes
2- No

To select an item enter its number, or 0 when you are finished [0] :

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :



===============================================================================



Peoplesoft owner ID (ex: 'SYSADM') [SYSADM]:

Peoplesoft owner password (ex: 'SYSADM') [SYSADM]:

Peoplesoft connect ID [people]:

Peoplesoft connect password [peop1e]:

Peoplesoft default tablespace (ex: 'PSDEFAULT') [PSDEFAULT]
:

Location of init.ora file complete path
[/apps/oracle/product/11.2.0/dbs/initO2H91WZD.ora]:

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :
===============================================================================




Select Base Lanaguage


->1- ENG - US English




To select an item enter its number, or 0 when you are finished [0] :

Press 1 for Next, 2 for Previous, 3 to Cancel or 5 to Redisplay [1] :



===============================================================================
Pre-Installation Summary
------------------------

Please Review the Following Before Continuing:

Product Name:
Peoplesoft Database Configuration

Install Folder:
/apps/psoft/ptools850

Database Platform:
Oracle - Unicode

Oracle SID:
O2H91WZD

Application:
PeopleSoft HRCS Database - US English


Database Name:
O2H91WZD

Please type 'back' to go to previous panels




PRESS TO CONTINUE:
===============================================================================
Installing...
-------------

[==================|==================|==================|==================]
[------------------|------------------|------------------|------------------]



===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/runCreatedb10.sh.
=> This script should create the database, but if you forget to set the ORACLE_SID before running the DBWizard, this step will hang...

8.4 More parameters to be set :
Once the ORACLE_SID is set, of course, restart again the DB Wizard from the beginning. Everything run fine till the next failure :
Installing...
-------------

[==================|==================|==================|==================]
[------------------|------------------|------------------|------------------]



===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/runCreatedb10.sh.



===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/runUtlspace.sh.


===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/hcddl.sql.


===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/dbowner.sql.



===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/psroles.sql.


===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/psadmin.sql.




===============================================================================
Please Wait...
--------------

Executing.. /apps/psoft/ptools850/modifiedscripts/connect.sql.



===============================================================================


Executing DM: -CT ORACLE -CS orion2.phoenix-nga -CD LOCAL -CO SYSADM -CP SYSADM
-CI people -CW peop1e -FP /apps/psoft/ptools850/modifiedscripts/dbsetup.dms
Console Mode: true

Initializing Data Mover ... please wait

Console DM Mode: /apps/psoft/ptools850/bin/psdmtx
/apps/psoft/ptools850/setup/parm1
ExitCode: 0
Error: false

Initializing Data Mover ... please wait

ExitCode: 0
Error: false



===============================================================================
Error
-----

The following error occurred while running data mover .
Error: File not found: /apps/psoft/ptools850/scripts/o2h91wzdora.dms
Please select OK to exit installer.

PRESS TO ACCEPT THE FOLLOWING (OK):
Ok, the file does not exists, eventhough Oracle user got all the rights.
After looking more, the Oracle user is not able to run the psdmtx at all (it is invoked by the DB Wizard) :
[oracle@orion2:/apps/psoft/ptools850]$ $PS_HOME/bin/psdmtx
/apps/psoft/ptools850/bin/psdmtx: error while loading shared libraries: libtmib.so: cannot open shared object file: No such file or directory
=> We need to set few more parameters before running the DB Wizard to be able to run psdmtx :
oracle@orion2:/home/oracle]$ export TUXDIR=/apps/bea/tuxedo/10gR3
[oracle@orion2:/home/oracle]$ export PS_HOME=/apps/psoft/ptools850
[oracle@orion2:/home/oracle]$ export LD_LIBRARY_PATH=$TUXDIR/lib:$LD_LIBRARY_PATH
[oracle@orion2:/home/oracle]$ . $PS_HOME/psconfig.sh
[oracle@orion2:/home/oracle]$ $PS_HOME/bin/psdmtx
PeopleTools 8.50.02 - Data Mover
Copyright (c) 2009 PeopleSoft, Inc.
All Rights Reserved

PSDMTX Error: invalid command line argument list!
PSDMTX Error: open file /apps/psoft/ptools850/log/psdmtx.log
Usage: psdmtx [-CT DB2|DB2ODBC|DB2UNIX|INFORMIX|MICROSFT|ORACLE|SYBASE]
[-CS server name]
[-CD database name]
[-CO user id]
[-CP user pswd]
[-CI connect id]
[-CW connect id pswd]
[-I process instance]
[-FP filename]
or
psdmtx [parmfile]
[oracle@orion2:/home/oracle]$
9. End of process :
Right now, we can re-run the DB Wizard and that'll will be till the end of the process.

The DMS should process entirely, if not, then it's coming back to the standard troubleshoting database load.
At the end we got :
...
Ended: Mon Dec 28 23:48:43 2009
Successful completion
ExitCode: 0
Error: false



===============================================================================
Installation Complete
---------------------

Congratulations. Peoplesoft Database Configuration has been successfully
installed to:

/apps/psoft/ptools850

PRESS TO EXIT THE INSTALLER:
[oracle@orion2:/apps/psoft/ptools850/setup/PsMpDbInstall]$
Exit 0 and error : false... hmmm, could be more friendly, but it was working fine.

We can verify all the log from $PS_HOME/log, especially the last two ones :
[root@orion2:/apps/psoft/ptools850/log]# more verifyToolsVer.log verifyAppsVer.log
::::::::::::::
verifyToolsVer.log
::::::::::::::

TOOLSREL
------------------------------------------------------------
8.50

::::::::::::::
verifyAppsVer.log
::::::::::::::

RELEASELABEL
--------------------------------------------------------------------------------
Core 5.10.00.000
Core 5.11.00.000
Core 5.12.00.000
Core 6.00.00.000
Core 6.01.00.000
Core 7.00.00.000
Core 7.01.00.000
Core 7.02.00.000
U.S. Federal Govt 7.00.00.000
Core 7.50.00.000
Core 7.51.00.000

RELEASELABEL
--------------------------------------------------------------------------------
Education and Government 7.50.00.000
U.S. Federal Govt 7.50.00.000
Public Sector 7.02.00.000
Education and Government 7.51.00.000
U.S. Federal Govt 7.51.00.000
HRMS 8.00.00.000
HRMS 8.00.01.000
Learning Solutions 8.00.00.000
Learning Solutions 8.00.01.000
HRMS 8.30.00.000
HRMS 8.80.00.000

RELEASELABEL
--------------------------------------------------------------------------------
HRMS 8.30.01.000
HRMS 8.80.01.000
HRMS and Campus Solutions 8.90.00.000
HRMS and Campus Solutions 9.00.00.000
HRMS 9.10.00.000

27 rows selected.

[root@orion2:/apps/psoft/ptools850/log]#
To confirm, from a client machine, you can open AppDesigner, and verify tables against the database directly (keep in mind, 11g is password case sensitive) :
[oracle@orion2:/apps/psoft/ptools850/setup/PsMpDbInstall]$ sqlplus sysadm/sysadm

SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 29 00:01:07 2009

Copyright (c) 1982, 2009, Oracle. All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name:
[oracle@orion2:/apps/psoft/ptools850/setup/PsMpDbInstall]$ sqlplus sysadm/SYSADM

SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 29 00:01:12 2009

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from psaccessprfl;

SYMBOLICID VERSION
------------------------ ----------
ACCESSID
------------------------------------------------
ACCESSPSWD ENCRYPTED
------------------------------------------------ ----------
O2H91WZD 1
sBzLcYlPrag=
sBzLcYlPrag= 1


SQL> select * from psdbowner;

DBNAME OWNERID
------------------------ ------------------------
O2H91WZD SYSADM

SQL>
Note the SYMBOLICID is the DBNAME, usually it is SYSADM1 (when you're doing it manually).

10. Conclusion :
Well, I cannot say I'm convinced by the DBWizard, still too much restrictive, starting by the dbname in UPPER case. If someone can explain why is that mandatory, I'll be happy to know.
Second reason is when something is going wrong, like hanging or error out, then you have not many things in your hands to debug it.
Third, still too many tasks have too be done manually up front...

The only reason I can see so far to use it is... hmmm... you don't care about the order of running all the different scripts which need to be run when you're doing it manually. But they are not a lot and rightly descfribed in the doc.

Enjoy,

Nicolas.

Saturday, December 26, 2009

Old env, current env, new env

I have mutilple environments in my lab, based on new softwares' version (Oracle, Peoplesoft, Peopletools), OS (Oracle Entreprise Linux) and Peoplesoft certification paths.
Each time I create a new env, basically a new virtual machine, I re-start from scratch to try all the new installer.
But I also try to keep the "old" env alive for a while to be able to test different combinations and upgrade. Unfortunately, that take time and disk space.
Now, within Peopletools 8.50 and Peoplesoft 9.1, it is time for testing, but most of the customer are still using Peopletools 8.49 and Peoplesoft 9.0, so need to keep a copy of it somewhere awaiting a future upgrade. I'm trying to keep each env consistency, same version of softwares for all db, but it is rather difficult, especially when upgrade have to take place (see orion2 description below).

orion1 :

Almost two years ago, Jan'2008, I created my first lab orion1, based on OEL4.6 32bit, Oracle 10.2.0.3, Peopletools 8.49 and Peoplesoft application 9.0 (HRMS and CRM). Note, all the links about installation on the right side of this blogs are based on this one.
orion2 :
Later, in Feb'2009, following the new software versions and new Peoplesoft certification paths, I "upgraded" this lab to a new one, orion2, based on OEL5.3 64bit, Oracle 11.1.0.7, Peopletools 8.49.14 (min. required for a Linux 64bit OS), and Peoplesoft application 9.0 (HRMS, CRM and added FSCM).
Lately, FSCM 9.0 has been upgraded to Peopletools 8.50 and Oracle 11.2.0.1. This FSCM database will also be used for an application upgrade test to 9.1.
orion3 :
For few months now we have Peopletools 8.50 and most of the Peoplesoft applications in version 9.1. It's time to create this new lab, orion3 (from scratch). This will also be a good opportunity to update the links on the right side of this blog to the latest version.

There are also the very interesting Peoplesoft Oracle VM templates which must need (must) be maintained. So far only HRMS is there, but hopefully other applications will follow.

Well, a lot of work are coming out, and a lot of docs have to be (re)write as well.

Enjoy,

Nicolas.

Saturday, November 28, 2009

Polls results

Few months ago, I initiated two polls here on my blog, since I'll remove them from the right side, I paste here below to keep reference.
That's interesting results (keep in mind, more than one response was allowed) :
Thanks to all of you who voted.
If someone have some references provided by Oracle,
I'd be intersting to have some official percentage regarding these questions.

Tuesday, November 24, 2009

Peopesoft OVM in VMWare : start/stop script

Working on virtual machine is nice but that multiply dramatically the number of IP addresses, server names, etc.
Peoplesoft VM on Oracle VM comes with 3 templates. If you add one Oracle VM Manager (optional), that makes one more, in total in that simple configuration :
* 1-3 IP address for Oracle VM Server (depending how many running images you want in one)
* 1 IP address for Oracle VM Manager
* 3 IP address for the servers (one for each running Oracle VM image)
And you need to start each one before doing anything you want to do.
Then, and only then you have to start the database, application server, batch server and web server.
And eventually you'll have the connection to your front end application.

But if you install all this on top of VMWare as I described here, that obviously does not make the picture more simple, you'll also have to start the VMWare image in front. And a lot of manual tasks to achieve before to be able to work within the front end application.
So, that becomes obvious to script the start and stop of all the compenents.

Here are all the steps required to use the script given below, and the description of the script itself.

1. VMWare tools
First step, install the VMWare tools on every single VMWare image, it is required to stop the VMware image through the command line.



Mount the CD-ROM drive, untar the gz file in /tmp, and run the VMWare tools installation script vmware-install.pl.
You should open the VMWare console to do so, not through a telnet connection (the tools stop and restart the network service), before running the tools installation script :

On the VMWare image hosting Oracle VM Server, a couples of messages about C-libraries, ignore them, just answer no, we don't want it, they are not required for what we want to achieve :
Finally, it is done, and the tools are running :


2. Authorized key
2.1 On the host OS
Generate a rsa public key on the host, as root :
ssh-keygen -t rsa
That'll create a file under /root/.ssh/rsa.pub.

2.2 On every single remote server
According to my picture, on the 3 VMWare images (2 Oracle VM Server, 1 Oracle VM Manager), on the 3 Peoplesoft VMs (the database server, the App/Batch server and the PIA server), create the file authorized_keys2 under /root/.ssh, and copy the content of the /root/.ssh/rsa.pub from the host create at the step 2.1.
Add the reference of the host into the /etc/hosts file as well (IP address and host server name).

3 The script
The script will take place onto the host, within no modification on the remote servers (except the point 2 above).
It has been tested with the following configuration :
=> host OS : CentOS5.4
=> VMWare 2.0.2
=> Oracle VM ServerManager 2.2.0
=> Peoplesoft VM images 1.0.0

Here a brief description of the script :

3.1 Variables settings
You'll see in the script a lot of parameters, everything is doing to make it the most flexible as possible, there are 3 mains part :
* variables regarding the VMWare installs and images
* variables regarding the Oracle Server and Manager images
* variables regarding the Peoplesoft VM images
You MUST change all the values according to YOUR own environment.

3.2 Functions
There are some functions used to manage the startup and shutdown of the the components.
* check_availability()
This one check if the given server (IP address or name) is up or down with a ping server.
* xm()
This function start and stop the Peoplesoft VM images.
To start the Peoplesoft VM images, after connected onto the Oracle VM Server, it uses the Xen command, xm, available on Oracle VM server hosting the Peoplesoft VM image, e.g. :
xm create /OVS/running_pool/*${remote_image}/vm.cfg
To stop the Peoplesoft VM images, it is simply connect onto the server, and run a shudown :
shutdown -h now
There is also an xm command line option to stop Oracle VM image, but somehow, that does not work inside a ssh connection. It needs to be investigate further.
* vmware_vmrun()
Use to start and stop the VMWare images through the vmrun command line from VMWare 2.0.2.
* startup_psovm()
Main function to start all the environment. Firstly, start the VMWare images, then the Peoplesoft VM images within the functions xm() and vmware_vmrun() described above, and finally the database, the application server, the web server and the batch server.
* shutdown_psovm()
Main function to start all the environment. Firstly, stop batch server, the web server, the application server, then the Peoplesoft VM images and VMWare images within the functions xm() and vmware_vmrun() described above.
* main
The main of the script is small, check the valid input parameter (startupshutdown) and call the corresponding function.

3.2 The main commands used
As a remember, here are the main commands used in the script (of course, all the parameters need to be set in front) :
* This one return 0 if the server ${remote_server} is not available, 1 otherwise
count=$(ping -c 1 ${remote_server}  grep 'received'  awk -F',' '{ print $2 }'  awk '{ print $1 }')
* This one start the ORacle VM image ${remote_image}
xm create /OVS/running_pool/*${remote_image}/vm.cfg
* This one start the VMWare image ${vmware_image} :
${vmware_bin}/vmrun -T server -h https://${vmware_ip}:${vmware_port}/sdk -u ${vmware_user} -p ${vmware_pwd} start "[${datastore}] ${vmware_image}/${vmware_image}.vmx"
* This one return a number > 0 if the VMWare image${vmware_image} is up :
count=`${vmware_bin}/vmrun -T server -h https://${vmware_ip}:${vmware_port}/sdk -u ${vmware_user} -p ${vmware_pwd} listgrep "${vmware_image}/${vmware_image}.vmx"wc -l`
* Shutdown the VMWare image ${vmware_image} :
${vmware_bin}/vmrun -T server -h https://${vmware_ip}:${vmware_port}/sdk -u ${vmware_user} -p ${vmware_pwd} stop "[${datastore}] ${vmware_image}/${vmware_image}.vmx" soft
* Start the application domain ${ovs_apps} :
./psadmin -c boot -d ${ovs_apps}
* Start the batch domain ${ovs_prcs} :
./psadmin -p start -d ${ovs_prcs}
* Stop the batch domain ${ovs_prcs} :
./psadmin -p stop -d ${ovs_prcs}
* Stop the application domain ${ovs_apps} :
./psadmin -c shutdown -d ${ovs_apps}
* Note, start and stop the database are, well, standard for Oracle (startup, shutdown immediate)
* Note, start and stop the web server are,again standard for Weblogic (startPIA.sh, stopPIA.sh)

Now, you can find the script here : PSOVM_HR.sh

Enjoy,

Nicolas

Monday, November 16, 2009

FSCM9.1 is available

After Peopletools 8.50 released earlier in September'09.
After HRMS9.1 (Peopletools 8.50 based) released in September'09.
After CRM9.1 (Peopletools 8.50 based) released in October'09.
Peoplesoft FSCM9.1 (Peopletools 8.50 based) has been released last Friday, November the 13th, you can download all the required softwares on http://edelivery.oracle.com

And of course, the corresponding documentation is also available online http://docs.oracle.com

Nicolas.

Sunday, November 15, 2009

Peoplesoft VM : about the App/Batch image - PRCS (in VMWare)

On a previous step, I described the App/Batch server settings and some modifications to be done. If the application server and process scheduler are starting well, the process scheduler is not able to post the reports of the processes. Actually there are many reasons, and we need to update few things before starting the process scheduler (if it is already started, shut it down, and purge the cache) : 1. There is no distribution report node defined for the process server. Note, the name of the process server is NOT PSUNX - as we could wait - but like your dbname. So let's create one : 2. The distribution report node needs to be attached to the process server : 3. The local node is not password authentication, need to be set : 4. The user which is used to start the process scheduler (PS) needs the ReportDistAdmin role : 5. The Gateway is not defined, we need one : And define the local node to be able to ping it : 6. The /etc/hosts on App/Batch server needs to contain the PIA server IP address and name :
[psadm2@psovmab appserv]$ more /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.135 psovmab.phoenix.nga psovmab
192.168.1.136 psovmpia.phoenix.nga psovmpia
[psadm2@psovmab appserv]$
The PIA server needs the App/Batch server IP address and name :
[psadm2@psovmpia bin]$ more /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.136 psovmpia.phoenix.nga psovmpia
192.168.1.135 psovmab.phoenix.nga
[psadm2@psovmpia bin]$
7. Check if the Domain status (messaging domain) is active, purge all, the non-required will be gone, and the truly active one will remain :

And finally, you can run standard report (e.g. DDDAUDIT, SYSAUDIT, AEMINITEST), they will run successfully and posted as well :
At the end of this long process of installing Peoplesoft templates on VMWare, take backup of the VMWare images before playing around and modify and/or break something. It is very useful, if something is going wrong because of unfortunate modification, restore your set of VMWare images, and restart from a clean install.


Enjoy !

Peoplesoft VM : about the PIA image (in VMWare)

I created an virtual machine from the PIA server template downloaded from edelivery (OVM_EL5U2_X86_64_PIA85002_PVM), here are my first screenshots and comments.

On the first start of the VM, go to the console, then you should see the following, and fill the requested data (fixed IP address, netmask, gateway...) :
Note the warning in the first screenshot above :
********************WARNING******************************************************
Hard limit value of the file descriptors on this system is set to 1024
In order to run the server process with 4096 file descriptors,
increase the hard limit on the system equal or higher than the number
MAX_FILE_DESCRIPTORS in setenv.sh
*******************************************************************************

This warning is raised by startPIA.sh and stopPIA.sh scripts.

This is because the file /etc/security/limits.conf is wrongly configured. Connect onto this server as root (password is as usual on Peoplesoft templates, ovsroot), edit the file, it is like this :
*    nofile  65536
* nofile 65536
* nproc 65536
* nproc 65536
* core unlimited
* core unlimited
* memlock 50000000
* memlock 50000000
It should be like that :
#*    nofile  65536
* - nofile 65536
#* nproc 65536
* - nproc 65536
#* core unlimited
* - core unlimited
#* memlock 50000000
* - memlock 50000000
The webserver is owned by psadm2 user, to stop and start the webserver, go to /opt/oracle/psft/pia/tools/webserv/peoplesoft/bin.

Finally, you can access to the front end application with the URL http://192.168.1.136:8000/psp/ps/EMPLOYEE/HRMS/?cmd=login
Be careful, if your browser is not configured in English, you can receive the following error message (because only English is loaded into the database) :

You have to select the English language to be able to connect as PS/PS :
And enjoy the application entirely build from the Peoplesoft templates :Enjoy,

Nicolas.

Peoplesoft VM : about the App/Batch image (in VMWare)

I created an virtual machine from the App/Batch server template downloaded from edelivery (OVM_EL5U2_X86_64_AB85002_HCM91_PVM), here are my first screenshots and comments.

On the first start of the VM, go to the console, then you should see the following (be careful, I noticed some timeout if you're too slow to connect and enter a value, the DHCP configuration will be taken in account by default, sigh), and fill the requested data (fixed IP address, netmask, gateway...) :


Unfortunately, it is not working as we could expect. Indeed, the application server won't start, the process scheduler won't start neither.
Eventhough, you filled all the correct data, that won't work without manual modifications.

The App and Batch domains are owned by psadm2 user, and files located under ~/ps/pt/8.50/appserv, default app domain name is APPDOM, default prcs domain name is PRCSDOM.

Well, looking in the log file, we can see the following :
PSADMIN.2190 (0) [11/14/09 18:21:21](0) Begin boot attempt on domain APPDOM
PSAPPSRV.2242 (0) [11/14/09 18:21:49](0) PeopleTools Release 8.50.02 (Linux) starting. Tuxedo server is APPSRV(99)/1
PSAPPSRV.2242 (0) [11/14/09 18:21:49](0) Cache Directory being used: /home/psadm2/ps/pt/8.50/appserv/APPDOM/CACHE/PSAPPSRV_1/
PSAPPSRV.2242 (0) [11/14/09 18:21:53](3) File: SQL Access ManagerSQL error. Stmt #: 2 Error Position: 0 Return: 12154 - ORA-12154: TNS:could not resolve the connect identifier specified
PSAPPSRV.2242 (0) [11/14/09 18:21:53](1) GenMessageBox(200, 0, M): SQL Access Manager: File: SQL Access ManagerSQL error. Stmt #: 2 Error Position: 0 Return: 12154 - ORA-12154: TNS:could not resolve the connect identifier specified
PSAPPSRV.2242 (0) [11/14/09 18:21:53](1) GenMessageBox(0, 0, M): Database Signon: Could not sign on to database H91TMPLT with user PS.
PSAPPSRV.2242 (0) [11/14/09 18:21:53](0) Server failed to start
PSADMIN.2190 (0) [11/14/09 18:22:00](0) End boot attempt on domain APPDOM


Checking the database, from the database server point of view, whether the database name is the one you gave - here H91TMPLT, the service name is slightly different, it is postfixed by the domain name .corp.peoplesoft.com, see below :
[oracle@psovmdb ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 15-NOV-2009 12:39:08

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=psovmdb)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production
Start Date 15-NOV-2009 01:57:15
Uptime 0 days 10 hr. 41 min. 52 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/psovmdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=psovmdb)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "H91TMPLT.corp.peoplesoft.com" has 1 instance(s).
Instance "H91TMPLT", status READY, has 1 handler(s) for this service...
Service "H91TMPLT_XPT.corp.peoplesoft.com" has 1 instance(s).
Instance "H91TMPLT", status READY, has 1 handler(s) for this service...
Service "XDB.corp.peoplesoft.com" has 1 instance(s).
Instance "H91TMPLT", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@psovmdb ~]$


Let's check the tnsnames.ora file, and here what surprise, very strange to me, the Oracle client installation is owned by root... and the tnsnames.ora file in use is located under /etc/tnsnames.ora.
It is an unfortunate configuration of this file, using SID instead of SERVICE_NAME, finally, the modification give this :
[psadm2@psovmab LOGS]$ more /etc/tnsnames.ora
H91TMPLT=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.133)(PORT=1521)))
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=H91TMPLT.corp.peoplesoft.com))
)
[psadm2@psovmab LOGS]$


After that change, we can connect onto the database from the App/Batch server, then go to $PS_HOME/appserv, run ./psadmin and reconfigure the application server domain and process scheduler.
Finally, everything should start and work fine.

Next step, PIA server.

Enjoy,

Peoplesoft VM : Oracle VM install/config (in VMWare)

To continue my serie about "Peoplesoft VM in Oracle VM in VMWare", after describing the architecture, the VMWare 2.0.2 install on CentOS 5.4, and the different VMWare images configuration to be used, time to install Oracle VM Manager/Server as VMWare images.

1. Oracle VM Manager installation :
This is obviously the easiest part, most of the Oracle VM Manager installation is standard regardless the fact it is inside VMWare images.
Before installating the Oracle VM Manager, you need to install an OS. I'm using OEL5.4 (downloadable on http://edelivery.oracle.com/linux, note Oracle VM Manager is also downloadable from there). The installation of OEL5.4 I followed is very stanadard. Nothing special to be installed, except : you must use fixed IP address, disable firewall and SELinux.
Following the OEL5.4 installation, you need to follow the documentation of Oracle VM Manager installation, it is very well explained in the documentation, including "screenshots" (that's why I won't reply then here).
Please, read http://download.oracle.com/docs/cd/E15458_01/doc.22/e15439/toc.htm

2. Oracle VM Servers installation :
This is obviously the easiest part, most of the Oracle VM Server installation are standard regardless the fact it is inside VMWare images.
The software is downloadable on http://edelivery.oracle.com/linux.
The documentation is also very good and clear enough, even for people who never did it before, please read : http://download.oracle.com/docs/cd/E15458_01/doc.22/e15442/ovsig.htm
Note, you must use fixed IP address, apart from that, nothing special to be done.
You'll need to do it two times, once for each Oracle VM Servers, as I described in the previous post.

3. Oracle VM configuration :
Now, configuration needs to be done from Oracle VM Manager.

3.1 Memory configuration :
Before doing any configuration from the Oracle VM Manager side, we need to set the proper memory size used by the OS.
We declare 2560Mb RAM size for each Oracle VM Server, but the size used by the OS is about 553Mb :
[root@psovmdb-host ~]# free
total used free shared buffers cached
Mem: 566272 202640 363632 0 9764 56448
-/+ buffers/cache: 136428 429844
Swap: 1052216 0 1052216

From the output above, the Xen OS use 566272Kb=553Mb, added to 2048Mb defined for the VMWare images, that makes 2601Mb (>2560Mb defined), the Oracle VM image won't start.
We can reduce the OS reserved memory till 10% of the total RAM amount, 250Mb.
Edit the file /boot/grub/grub.conf and change the size defined for dom0_mem (4 lines), and reboot the Oracle VM Server box.
Confirm the memory size has been droped down :
[root@psovmdb-host ~]# free
total used free shared buffers cached
Mem: 256000 197460 58540 0 9792 57072
-/+ buffers/cache: 130596 125404
Swap: 1052216 0 1052216


3.2 OVS folder :
On the Oracle VM Server, by default the OVS folder is a symbolic link to a local partition /dev/sda3. OVS hosts the templates as well as the running images you created from the templates.
Since I'm using a NFS server to host the templates as well as the running images, I'll change the mount point by following the steps below.
Add a new repository :
[root@psovmabw ~]# /opt/ovs-agent-2.3/utils/repos.py -n 192.168.1.1:/ovs-hcm-abw
[ NEW ] f0423499-3b4b-4276-beac-8d3ec1be1402 => 192.168.1.1:/ovs-hcm-abw

List of the repositories :
[root@psovmabw ~]# /opt/ovs-agent-2.3/utils/repos.py -l
[ R ] 45e89d11-9f0a-43b9-901f-b03439aef697 => /dev/sda3
[ ] f0423499-3b4b-4276-beac-8d3ec1be1402 => 192.168.1.1:/ovs-hcm-abw

Delete the previsou repository defined by default :
[root@psovmabw ~]# /opt/ovs-agent-2.3/utils/repos.py -d 45e89d11-9f0a-43b9-901f-b03439aef697
[ DEL ] 45e89d11-9f0a-43b9-901f-b03439aef697 => /dev/sda3

[root@psovmabw ~]# /opt/ovs-agent-2.3/utils/repos.py -r f0423499-3b4b-4276-beac-8d3ec1be1402
Make the new repository as the new default one :
[ R ] f0423499-3b4b-4276-beac-8d3ec1be1402 => 192.168.1.1:/ovs-hcm-abw
[root@psovmabw ~]#
Whatever method you choose, you should copy the Peoplesoft templates in the /OVS/seed_pools (that'll be take automatically when you'll import them from Oracle VM Manager).

3.3 Server pool :
Connect onto the Oracle VM Manager web server (with admin user, and password set during the Oracle VM Manager installation), go to the tab "Server Pools", and create two new server, one for each VM image you created earlier (each one correspond to one VMWare image and one Oracle VM Server) :

Then, you'll got two also servers ("Servers" tab) :


3.4 Import the templates from server pool :
On the "Resources" tab, from the server pool dedicated to the db server, import the template relative to the database, from the other one, import the two templates for App/Batch and PIA servers. You should obtain something like the following :

3.5 Create the image from templates :
Go to the "Virtual Machines" tab, and create the virtual machine, you can name them as you want (not necessarly like the templates). Do it for every single template (the three of them).
That can take a while, it is copying the files from /OVS/seed_pools to /OVS/running_pools, then you should obtain such screen :
Next step, start the VMs.
You could see for the Database server I already post here.

Enjoy,