Friday, December 27, 2013

Enabling Virus Scan for PT 8.52

OK, so we all know that Oracle documents aren't always as detailed, but when you get it, you suddenly realize that it was really as straight forward as what the docs says.

We had that moment when enabling virus scan for our peoplesoft environment. We were looking for the documentations for when you want to use a different version of a virus scanner. Anyway, long story short, the old version of Symantec protection engine has been replaced by Symantec Protection Engine for Cloud services v12. So use this one instead.

Easy steps:

1. Install Symantec Protection Engine for Cloud services v12 - this has been tested to work with PT8.51 and PT8.53.

2.  Update the VirusScan.xml file on your webserver on its two locations:

<ps_home>/webserv/applications/peoplesoft/PORTAL.war/WEB-INF/classes/psft/pt8/virusscan 
and
<ps_home>/webserv/applications/peoplesoft/PSIGW.war/WEB-INF/classes/psft/pt8/virusscan

3. The entry should be exaclty the same as the one provided in Peoplebooks, you only need to update the IP address with the one where you've installed Symantec

http://docs.oracle.com/cd/E26239_01/pt851h3/eng/psbooks/tmcf/book.htm?File=tmcf/htm/tmcf15.htm#2E3D5C96_132F532B140__18BB

4. bounce your servers and clear the cache.

5. test.

log can be seen in your PIA logs

Monday, November 4, 2013

WINDOWS: Add a script to right-click mouse menu

Yup that's right. I'm lazy like that.

I once created a Menu script in windows that sets the PS_HOME and PS_CFG_HOME variables automatically and calls the psadmin executable. This is useful if you have a multiple PS_HOME installation in one windows server (usually the setup for non-production environments.)

Instead of saving the file to my desktop, I added it to the right-click menu of my mouse so I wouldn't have to double click on the file.heh.

Here's how I did it:

Note: You can change the value of those in red font.

1. Open a new notepad and save with a .reg extension.
2. Paste the following lines and edit as appropriate (make sure the script location has double slash):

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\MENU]
@="MENU script"
"Position"="Top"


[HKEY_CLASSES_ROOT\Directory\Background\shell\MENU\command]
@="E:\\MENU\\menu.bat"


3. Save the .reg file then double click on it to add your script.

 

Saturday, November 2, 2013

UNIX: Crontab

*    *    *    *    *  command to be executed
-    -    -    -    -
¦    ¦    ¦    ¦    ¦
¦    ¦    ¦    ¦    ¦
¦    ¦    ¦    ¦    +----- day of week (0 - 7) (0 or 7 are Sunday, or use names)
¦    ¦    ¦    +---------- month (1 - 12)
¦    ¦    +--------------- day of month (1 - 31)
¦    +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)

Friday, November 1, 2013

Oracle Database: How to Know DB Startup time

Another quick information.

In checking when your database was last started, you can run the following command:

select to_char(startup_time, 'DD-MON-YYY HH24:MI:SS') "Startup time" from v$instance;

This is specially helpful when you do not have visibility on the DB side but has sysadm account (which is the ccase for most support guys out there.)

Thursday, October 24, 2013

UNIX Script: Basic command to create/add users and groups

#create a user and set its password
useradd -m user
passwd user


#create a new group in unix
groupadd group

#create a user and add it to a group
useradd -g groupname -m user
passwd user


#add a user to multiple groups
usermod -G group1, group2, group3 user

#other user/group command
userdel
groupdel
groupmod


#Change name of a user (UID) and ownership of its folders (e.g, PS_HOME is owned by user psoft1, rename the user to psoft and PS_HOME ownership will change as well)
usermod -l <New Name> <Old Name>


#Change ownsership of directory and its subdirectories and files
chown -R user /path/to/dir

Wednesday, October 23, 2013

Windows Batch Scripting: Date format manipulation

Just a quick note on date manipulation.

So what does it mean when you see the following in a script:

set /a y=%date:~-4%
set /a d=%date:~07,2%
set /a m=%date:~-10,2%

easy as pie. First you need to know the date format you will be using:

echo %date%
Tue 10/15/2013

Now, here's what our code above means.
Set /a y - Of course, you set the value for y for year.
%date:~-4% - you call on the date as with the echo command earlier. But only display the value starting from -4 up to the last character. The negative value indicates that you should count from the last character of the date value. from here, -4 lands on the number 2. It will then display from that number up to the last which is 2013.

Set /a d - d is for day.
%date:~07,2% - Similar from the above, it calls the date and counts from the positive 7th character. The number 2 then indicates that you should read 2 characters starting from character 7. From our example, the value is 15.

set /a m - m for month, obviously :)
%date:~-10,2% - lastly, as another example, you count from the last digit up to the 10th character. Display 2 digits from the 10th character which is 10.

The example above shows that we can use either a negative or positive values in setting the date value on a variable.