Wednesday, 25 September 2013

database enhancements continued - PDBs

The list of database options continues to grow, but so does the price of oracle Enterprise Edition.  Multitenant databases is another database option that can only be licensed under enterprise edition.

Enterprise Edition Options: 
Multitenant
350
77.00
17,500
3,850.00
Real Application Clusters
460
101.20
23,000
5,060.00 
Real Application Clusters One Node
200
44.00
10,000
2,200.00
Active Data Guard
230
50.60
11,500
2,530.00
Partitioning
230
50.60
11,500
2,530.00
Real Application Testing
230
50.60
11,500
2,530.00 
Advanced Compression
230
50.60
11,500
2,530.00
Advanced Security
300
66.00
15,000
3,300.00
Label Security
230
50.60
11,500
2,530.00
Database Vault 
230
50.60
11,500
2,530.00
OLAP
460
101.20
23,000
5,060.00
Advanced Analytics
460
101.20
23,000
5,060.00
Spatial and Graph
350
77.00
17,500
3,850.00
In-Memory Database Cache 
460
101.20
23,000
5,060.00

See the image above for the new options and the new prices.

Multitenant is an exciting option that has created the concept of container databases and pluggable database - PDB.  The container database is able to have multiple PDB's within in.  This lets you have separate security and management of the PDB's within a single container database.

This would be great for hosting and for cloud provisioning.  This would suit JD Edwards use, but not necessary.  If you were provisioning JD Edwards in the cloud, then this would be a great option.

This is licensed at 17.5K per core, as the above table states.

Tuesday, 24 September 2013

In-Memory Database options

This is a great announcement that has come out of #oow13.  I was lucky enough to attend the keynote that made this announcement, unlucky enough to spend 30 mins leaving the venue...

So the data is being stored in columnar format "in-memory", so this allows for you to drop indexes and reap the benefits of some incredible performance gains.  When your architecture is up to it, you can get benefits way in excess of the 100's times claim.  This is technology that is really going to test your architecture.  It's relying on the solid CPU / memory backbone, therefore the more tightly coupled this is with the database - the better the performance gains might be.  Note also that the closer oracle are getting to putting DB instructions on silicon will mean the benefits from this type of technology are only going to get more "real".  

Traditionally a heterogeneous database ERP like JD Edwards does NOT stress the database out that much.  The database is too busy doing reads (waiting for the IO) to be stressed.  Choosing the right tables to cache and having a lot of memory (remember, this is in-memory - you are going to need a lot of memory) might start putting some more stress on the JD Edwards database - nice!

"Oracle In-Memory Database Cache (IMDB Cache) enables database applications to selectively cache performance-critical subsets of the Oracle Database tables into the TimesTen In-Memory Database to improve application response time. "

The above statement indicates that there are two products in play here.  The "TimesTen In-Memory" database and the Oracle In-Memory database cache.  The TimesTen is the engine, this is generally deployed at the application teir.  Note also that because this is on the application tier, it would need to be kept "up-to-date" in an OLTP environment. 

The in-memory database cache is the "poor mans" implementation of the TimesTen database.  This is putting your data into a virtual TimesTen database without changing the application logic - everything through tnsnames.

In a JD Edwards environment, I'd guess that the in-memory database cache is your best option.

http://docs.oracle.com/cd/E21901_01/doc/timesten.1122/e21631/img/findingrecords.gif

The above diagram shows the totally different path to the data.

This is a true database option that is easy to enable on a table by table basis.  You initialise your 12c database to enable this option (note that you'll need to get your cheque book out too), initial RRP indications have it at about 23K per "oracle processor" [or core].

The Oracle In-Memory Database Cache option supports Oracle Database 12c, Oracle Database 11g Release 2, and Oracle Database 11g Release 1.

A good answer to try and explain what you need to run this option is found at:


2. Can Oracle TimesTen In-Memory database be used as an in-memory cache to the Oracle database?
Yes, this is the Oracle database option ' Oracle In-Memory Database Cache". This database option includes the TimesTen In-Memory Database, and caching technologies to enable TimesTen to be deployed as  an in-memory cache database  with automatic data synchronization between TimesTen and the Oracle database.
So this says that when you enable the "in-memory" option for your database, it deploys TimesTen to be deployed as a in-memory database cache.
3. Can I run Oracle In-Memory Database Cache on a different platform from the Oracle database server?
Yes, since In-Memory Database Cache runs as an Oracle client, it can be running on a different platform from that of the Oracle database server. Typically, In-Memory Database Cache resides on the application tier, whereas the Oracle Database sits on the database tier.
If you refer to the oracle price list, you'll also see that this is an "enterprise edition" enhancement only too.  You'll not be able to enable this without EE licences.  




Monday, 16 September 2013

Media objects gotcha–upgrade / deployment server rename

Too many times we forget to update all of the records in F00165 when you change out your deployment server and you’ve been using it for media object storage.  Remember that when you rename the MO queue in the P98MOQUE, this does not change the location of all the records that you may have saved against the MO.

image

So you will need to run update statements in SQL to ensure that once you’ve copied the directory structure to your new deployment server you also change all of the internal pointers.

Different media object types have different requirements for pointing to the final file name, you’ll need to look into the F00165 to work it all out.

Wednesday, 24 July 2013

Structure member alignment for client and server programming with JDE

Quick note to self:

When writing an OSA to work on a windoze (windows) server, use a structure member alignment of 4, /Zp4 .  If you are testing your OSA on the client then ensure that the struct member alignment is 1, or /Zp1.  It's easy too look at the command in various iterations of visual studio to ensure that the struct member alignment is correct.

Highlight the project (not the solution) and fork project, properties

Open general menu item
Then c/C++ then code generation.  Under there you'll find "Struct Member Alignment" - set this.

Then goto command line under the c/c++ window and you're command will look something like:

/Od /I "D:\E910_1\DV910\include" /I "D:\e910_1\system\includev" /I "d:\e910_1\system\include" /D "_WINDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Zp1 /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt

What is that for?  windows CLIENT of course!

Note also (to help you if you're struggling), the link command looks like:

/OUT:"C:\Users\shannonm\Documents\Visual Studio 2008\Projects\myBIGPDF\Debug\myBIGPDF.dll" /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"Debug\myBIGPDF.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"c:\Users\shannonm\Documents\Visual Studio 2008\Projects\myBIGPDF\debug\myBIGPDF.pdb" /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Ensure that you include jde.h (you'll need this).  You'll need to include dirs like "include and include) under system and you'll also need to include lib and libV dirs.  Also the specific resource files for functions that you call will need to be added to the project.

Friday, 12 July 2013

JDE BSFN Return Values

It might defy logic, but the following is true:


#define ER_SUCCESS   0L
#define ER_WARNING   1L
#define ER_ERROR   2L

as defined in jdekdfn.h

So, when you read things like:


Jul 12 15:47:41.167618  jdeobj.c2711     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    **********************************************************************************
Jul 12 15:47:41.167629  jdeddapi.c315    - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Entering jdeCloseDictionary
Jul 12 15:47:41.167642  jdeddapi.c349    - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Exited jdeCloseDictionary with DDType 0
Jul 12 15:47:41.167657  jdeobj.c2404     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Return value is 2 for ApproveOrRejectOrder. (BSFNLevel = 2)
Jul 12 15:47:41.167674  jdeobj.c3189     - 3900/-258356336 WRK:POAPPROVE_EF810FD0_DConnector    Entering AddObjectCache

The 2 means Error, simple!

Friday, 14 June 2013

EM12C will not start Could not initialize class oracle.dfw.impl.common.TempFileManager

em12c will not start!

It just won't start.

generally, my recommended EM12C start sequence is:




  1. listener
  2. database
  3. oms
  4. wls
  5. agent

but my OMS would fail and take ages to do so.

I was getting in /u01/app/oracle/middleware/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/logs/EMGC_ADMINSERVER.out

java.lang.NoClassDefFoundError: Could not initialize class oracle.dfw.impl.common.TempFileManager

Of course, this is not the first log to look at, generally you start with:

/u01/app/oracle/middleware/gc_inst/em/EMGC_OMS1/sysman/log/emctl.log

This gave me double barreled 404's!!


2013-06-14 14:50:35,974 [main] DEBUG oms.StatusOMSCmd processStatusOMS.240 - console page status code is 404
2013-06-14 14:50:36,022 [main] DEBUG oms.StatusOMSCmd processStatusOMS.242 - pbs page status code is 404
2013-06-14 14:50:36,022 [main] DEBUG oms.StatusOMSCmd processStatusOMS.245 - console header is null
2013-06-14 14:50:36,023 [main] DEBUG oms.StatusOMSCmd processStatusOMS.247 - pbs header is null
2013-06-14 14:50:36,023 [main] DEBUG oms.StatusOMSCmd processStatusOMS.285 - Both Console and PBS are down. Status codes are: Console - 404 and PBS - 404

Which means nothing

What I must say at this stage is that I did notice someone had tried to run weblogic as root, as I had to change permissions on some of the log files that WLS wanted to write to.  It's a dead give-away with WLS, but not so with EM12C layers.


Then, I got to oracle support and used my search string: 
java.lang.NoClassDefFoundError: Could not initialize class oracle.dfw.impl.common.TempFileManager


I got a direct hit:
https://support.oracle.com/epmos/faces/DocContentDisplay?_afrLoop=128932762907641&id=1498363.1&_afrWindowMode=0&_adf.ctrl-state=8pjmggysh_351


It seems that there is something dodgey in the /tmp dir.  It was really weird, I had a directory called:
oracle-dfw-5069570897830055595.tmp in /tmp, but oracle could not even list it.  When I tried to use root, it could not see it?? Anyways, without investigating much further I deleted the dir /tmp/oracle-dfw-5069570897830055595.tmp and was able to start oms first go!


Seconds later I was getting my alerts and I felt better about EM12C







Monday, 3 June 2013

Printing from JD Edwards, tray selection, BIP to PCL etc

I was recently onsite for a client trying to solve a fairly simple printing issue - tray selection for BIP output.  Surely, very simple...  This was a windows enterprise server, not too sure if this makes it easier or harder.

Of course, let's do some simple analysis first to know where we are at with our capabilities.

I create a couple of local printers on my workstation and share them.  Easy, then I can create JD Edwards printer definitions to \\workstation\printer and see the output.  Great.  I can toggle between PCL, PDF and PS and see what is coming out and what works and what does not and then build some working scenarios from there.

I pause my windows printer and then look in the C:\Windows\System32\spool\PRINTERS

standard report output: (1 page PDF)
PDF - 55K
PCL - 4K (I love PCL)
PS - 55K

Then I run a BIP job, two pages
PDF - 67K (rename the .spl and you can open it as a PDF - nice)
PS - 67K (rename the .spl as a PDF and you can open it - weird!!)
PCL - 8K (does not have any graphics!!!)

So, the analysis from above might be as you expect.  ALL outputs work from both BIP and standard, but BIP cannot put graphics into the PCL output.  This is important.  If you have PCL printers, you cannot print immediate from BIP and have the reports look great (or can you?).

All of the above is good to know, but does not help me with my main problem, printing to a particular tray of a particular printer.

What options do I try:

  • Create a windoze printer definition that defaults the correct tray and address this from E1.  Does not work.  Default paper tray is used - this is annoying.
  • Force the printer definition in E1 to use the tray that you want - no - does not work
  • Write my own "JDE conversion program" and have that do the printing - too complicated at this stage, although seems possible
  • Use OSA's to grab the output and then print to the printer that I want.  BUT - OSA does not get called from BIP output - Doh!
    • As a side note, I did write this code as an OSA and got everything printing fine from E1 with my OSA.  All tray selection working perfectly.
    • Note that this is quite difficult, as you cannot run an interactive program from a windows service.  I was dabbling in "createProcessW", "shellExecuteEx" I could not bring myself to use "system" - but I probably could have.
    • The long and hard lesson out of this is that you cannot run any processes from a windows service (as all of the kernels run as a service) to execute a program that requires a desktop  / interactive session.  My idea was to run acrord32.exe with the /T option to print the adobe document to my printer of choice.  Hey, this would be nice and neat and get my out of my PCL limitations too...  But, adobe wants desktop resources, so this will not work.  I did get it working with the Fox-It viewer.  This is a really nice viewer and performs a great job with the printing in this scenario.  http://www.foxitsoftware.com/Secure_PDF_Reader/ I recommend this software, it also closes the exe when the print is done, not like Adobe that just likes to hang around for nothing!!
To reduce my compile and build and deploy times, I started just calling a script from the OSA, this worked like a treat.

The command that the script runs to print a PDF to a specified printer looks like the below:

C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe" /t "D:\JDEdwards\E910\ddp\PrintQueue\R0010P_XJDE0001_55464_PDF.pdf" "\\svfpr04\OPS CENTRAL RICOH MP 7001 -T2"

But, this would not work from BIP, as BIP does not use OSA functionality when writing the PDF - which is the ULTIMATE pain!!!

So, back to the drawing board after a lot of code has been written and is working.  My final solution is a work-around until BIP tray selection logic is going to catch up.  I cannot retrofit all the printers in the organisation with PS drivers or PDF drivers!

I finally decided to script once again, but a different angle.

As you know BIP output is written only to the database by default, so it's not like you can just grab the output from the tables and send it to the printer, BIP does a lot of magic there to do that stuff for you - BUT you can enable BIP archiving, which will write all output to a dir on the enterprise server (I can feel a script coming on!!!).

Then a simple WMI based vbscript to listen for createFile events in teh BIP archive dir can be written.  Do some testing on filename and we have a solution!  We can also query the database from the script and get all of the printer information from the job and actually direct the output to the proper E1 printer - nice!

But, lets be honest.  It's not that nice.  Sure I can avoid replacing all my PCL printers (hey - maybe that is NICE).  Reprint from E1 is still dodgy for tray selection, but the end users can do it from Adobe - workaround when the script breaks.  But it's just another thing to go wrong with printing, which should be super simple and should just work.

At the end of the day, there is about 40 lines of script (20 doing debugging and logging) to print BIP output to PCL printers.