Category: Uncategorized

Basic Steps to Create an Application Engine in PeopleSoft

In reviewing my statistics, I found that one common search was “basics steps to create an appengine in PeopleSoft”.  I hope the person(s) found what they were looking for on my blog.  Nonetheless, that gave me the idea to write a simple overview on creating a new Application Engine program.

This post can’t cover everything but I do plan to cover:

  • Creating a new Application Engine definition
  • Setting program properties
  • Understanding program flow
  • Inserting new sections, steps, and actions
  • Loops/logic
  • State records
  • Adding programs to projects
  • Where to go from here

Read More

Oracle DBA: Public Synonyms

Recently, I wrote about granting read only access to the database for developers.  Tim Hall commented that my solution was insecure and granted too much, possibly allowing a loophole.  At the same time, I recently wanted to provide public synonyms to users.

So, the following role, procedures, and trigger attempt to accomplish those two goals:

  • Allow for securely granting readonly access
  • Automatically create public synonyms

Moodle Update/Information

In catching up on my blog reading, I came across this link:

e-Literate: The Blackboard Announcements, Part 2: Can Open Source Be Bought?

Apparently, I have been out of the loop a little in the LMS arena.  This article was a great explanation of how things work in the open source world of LMS.

Here’s some of the other reading that I did to catch up.  First, I started with the official announcement from Blackboard itself:

Blackboard Press Releases: Blackboard Acquires Moodlerooms, Netspot

The following article was pretty interesting.  It made me wonder if this is similar to the situation with Oracle and Open Office.  The community didn’t like Oracle and moved to Libre Office.  I haven’t followed that situation very closely other than the fact that my Ubuntu installation uses Libre Office now instead of Open Office, but it sounds like the same process could happen  in the LMS world if Blackboard isn’t careful.

Hack Education: You Can Acquire Open Source Companies, But You Can’t Buy Open Source Community

This article caught my eye also.  How necessary is the LMS?  This article explores how Google Apps is meeting the needs for what users were using LMS systems for.  This may be something that Blackboard is trying to fight.

e-Literate: Google Apps for Education: When Will It Replace the LMS?

Campus Technology seems to be going down this route.  They are integrating with Google Apps.

Campus Technology: Pearson Debuts Free LMS with Google Apps Integration

Another thing that is obvious is how controversial these announcements/actions are.  This forum gives you a small glimpse:

Moodle Forum: Blackboard acquires Moodlerooms and NetSpot

The one thing that stood out to me from multiple articles is the recognition of Blackboard swinging toward the service end of LMS.  To me, the idea makes sense.  I have worked with enough professionals in the Education arena enough to know that they can be very opinionated in the software they use.  Furthermore, they don’t always agree on what is best.  I have run across a number of Universities that offer multiple LMS options and the instructors can choose what they want to use.  If I were Blackboard, I think I could easily come to the decision: why fight it?  Instead of trying to build the best LMS system, let’s just support all of them and make money on the support side.

For me, the big thing to watch is the PeopleSoft integration to Moodle.  I know that PeopleSoft has been working on the Student Administration Integration Pack.  I am curious to see if Blackboard’s entry into the Moodle world furthers the cause for Moodle and PeopleSoft integration.

Oracle Support: New Format

I’ve been a little bit late on getting this written up and proofread.  If you haven’t noticed recently, Oracle Support is rolling out a new format.  The HTML option gets rid of the Flash requirement.  You can choose it on the Sign In page.

You can skip the option part and go directly to:

http://supporthtml.oracle.com

I am a Chrome fan on Linux, and I have always had problems with the flash version.  So far, this new version works great with my browser and OS.

It sounds like this is the way of the future:

Further enhancements to the HTML-based user interface are planned for the comming months, at which time we will transition users of the standard Flash-based interface.

You can check this article to keep up to date with these changes:

Oracle Support: The New My Oracle Support User Interface [ID 1385682.1]

The look is slightly different, but it looks like everything is there.  Here’s the old set of tabs:

Here’s the new set:

I guess I need to do a little research and figure out where the Collector is in the new version.

Other posts:

Oracle DBA: Running DBVerify on all files

One of the steps to a PeopleTools Upgrade is running a database verify.  In Oracle, that means using the dbv program.

Unfortunately, I didn’t see a “check the whole database” option.  So, I had to create a way to run it for each file…

I ran this in the database:


select 'dbv file=' || file_name
 || ' blocksize='
 || (select value from v$parameter where name = 'db_block_size')
 || ' logfile=E:\psca\output\dbv\' || tablespace_name || '.txt'
from SYS.dba_data_files;

Note: you will have to change the path for the logfile.

Then, you can copy the contents of that file and run it on the command line.

Please comment if you have a better suggestion!

Resources

Oracle: semget failed!

I had an issue with starting a database a while back.  Basically, I ran out of resources on the server, and I had to adjust the kernel parameters.  Here are the details…

Error message:

ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpcreates

Read More

Script: Check Flash Recovery Usage

I’ve been trying to monitor the archive log usage for our databases, and I came up with this little script.  I thought I would share in case it would help anyone, but also, please correct me if there is a better way or you see anything wrong.

Here’s the basic version.  You can change the database names in the for loop.


tmpfile=/tmp/$(whoami)sql.txt
echo "DB_NAME FILE_TYPE PERCENT_SPACE_USED NUMBER_OF_FILES" > $tmpfile
echo "------- -------------------- ------------------ ---------------" >> $tmpfile
for e in FN91DMO FN91CFG FN91DEV FN91TST
do
 export ORACLE_SID=$e
 sqlplus -s / as sysdba >> $tmpfile <<!
 set head off
 set feedback off
 select '$e' DB_NAME, FILE_TYPE, PERCENT_SPACE_USED, NUMBER_OF_FILES
 from v\$flash_recovery_area_usage
 where PERCENT_SPACE_USED > 0;
 exit;
!
done
sed '/^$/d' $tmpfile
rm $tmpfile

This next version calls a script to get the database names.  For example, I have the databases stored in an XML file, and I built a perl script that would read the XML file and print the database names.


tmpfile=/tmp/$(whoami)sql.txt
echo "DB_NAME FILE_TYPE PERCENT_SPACE_USED NUMBER_OF_FILES" > $tmpfile
echo "------- -------------------- ------------------ ---------------" >> $tmpfile
for e in $(buildDBList)
do
 export ORACLE_SID=$e
 sqlplus -s / as sysdba >> $tmpfile <<!
 set head off
 set feedback off
 select '$e' DB_NAME, FILE_TYPE, PERCENT_SPACE_USED, NUMBER_OF_FILES
 from v\$flash_recovery_area_usage
 where PERCENT_SPACE_USED > 0;
 exit;
!
done
sed '/^$/d' $tmpfile
rm $tmpfile

Finally, this version calls a script to check the status of the database.  If the database is down or temporarily off, it skips that database.


tmpfile=/tmp/$(whoami)sql.txt
echo "DB_NAME FILE_TYPE PERCENT_SPACE_USED NUMBER_OF_FILES" > $tmpfile
echo "------- -------------------- ------------------ ---------------" >> $tmpfile
for e in $(buildDBList)
do
 export ORACLE_SID=$e
 checkDBStatus $e 2>&1 > /dev/null
 if [ $? -eq 0 ]; then
   sqlplus -s / as sysdba >> $tmpfile <<!
   set head off
   set feedback off
   select '$e' DB_NAME, FILE_TYPE, PERCENT_SPACE_USED, NUMBER_OF_FILES
   from v\$flash_recovery_area_usage
   where PERCENT_SPACE_USED > 0;
   exit;
!
 fi
done
sed '/^$/d' $tmpfile
rm $tmpfile

Resources

Creating a Readonly Database User

Here’s a common task: You need to create a database user with read only access.  You have some power users who know how to use SQL, and they are allowed to see all of the data in the system.  You can use these commands to create such a user (in Oracle):

create user PSRO identified by PSRO;
grant create session, select any table, select any dictionary to PSRO;

Note: You can probably find this all over the web, but I wanted to capture it on my blog so that I could find the syntax easier.

Resources

Finding Data in Temp Tables

Here’s a simple little trick for Application Engines that have Temporary Tables assigned.

When you have temporary tables, you don’t know for sure which Temporary Table it is using.  You could write a quick select and change the number on the end until you find the one you are looking for, but here is a slightly quicker method.

Note: This is designed for Oracle, but you could easily change it up to work with SQL Server.

First, build a select statement that will list all of the tables.  We’ll assume our Temporary Table Record is MY_TEMP_TAO.  You can substitute with your specific record.

SELECT 'UNION SELECT ''' || TABLE_NAME || ''' TBL, A.* FROM SYSADM.' || TABLE_NAME || ' A'
FROM DBA_TABLES
WHERE table_name LIKE 'PS_MY_TEMP_TAO%';

Update (thanks to Nicolas): You can avoid having to remove the first UNION if you use something more like this:

SELECT 'SELECT ''' || TABLE_NAME || ''' TBL, A.* ' ||
 'FROM SYSADM.' || TABLE_NAME || ' A' ||
 case when count(*)over()=rownum
 then ';' else ' UNION ' end
FROM ALL_TABLES
WHERE table_name LIKE 'PS_MY_TEMP_TAO%';

The output should look something like this:

UNION SELECT 'PS_MY_TEMP_TAO' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO A
UNION SELECT 'PS_MY_TEMP_TAO1' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO1 A
UNION SELECT 'PS_MY_TEMP_TAO2' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO2 A
UNION SELECT 'PS_MY_TEMP_TAO3' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO3 A
UNION SELECT 'PS_MY_TEMP_TAO4' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO4 A
UNION SELECT 'PS_MY_TEMP_TAO5' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO5 A
UNION SELECT 'PS_MY_TEMP_TAO6' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO6 A;

You just simply need to delete the first Union to make something like this:

SELECT 'PS_MY_TEMP_TAO' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO A
UNION SELECT 'PS_MY_TEMP_TAO1' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO1 A
UNION SELECT 'PS_MY_TEMP_TAO2' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO2 A
UNION SELECT 'PS_MY_TEMP_TAO3' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO3 A
UNION SELECT 'PS_MY_TEMP_TAO4' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO4 A
UNION SELECT 'PS_MY_TEMP_TAO5' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO5 A
UNION SELECT 'PS_MY_TEMP_TAO6' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO6 A;

If you know your temp table has the process instance as the key and you know the one you are looking for, you could do something like this:

SELECT * FROM (
     SELECT 'PS_MY_TEMP_TAO' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO A
     UNION SELECT 'PS_MY_TEMP_TAO1' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO1 A
     UNION SELECT 'PS_MY_TEMP_TAO2' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO2 A
     UNION SELECT 'PS_MY_TEMP_TAO3' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO3 A
     UNION SELECT 'PS_MY_TEMP_TAO4' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO4 A
     UNION SELECT 'PS_MY_TEMP_TAO5' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO5 A
     UNION SELECT 'PS_MY_TEMP_TAO6' TBL, A.* FROM SYSADM.PS_MY_TEMP_TAO6 A;
) Z WHERE PROCESS_INSTANCE = 12345