Quantcast
Channel: Shannon's JD Edwards CNC Blog
Viewing all 541 articles
Browse latest View live

Improvement on JDE environment audit script

$
0
0

I’ve put a number of iterations of this on my blog, but hopefully they keep getting better.  I’m using the current one to devise a script that keeps a couple of “Systems” in sync.  On a nightly basis I want to replicate a number of data changes from one system to the other.

This uses a left outer join, so that you get all of the JDE tables that are in OL910, but also all of the copies and full package table names – which is really handy.

I use this to identify the tables that have data and then use this for my synchronisation logic.

DROP TABLE SY910.DATACOUNTS ;

cREATE TABLE "SY910"."DATACOUNTS"
( "TABLE_NAME" NVARCHAR2(20),
"TABLE_OWNER" NVARCHAR2(20),
"ORACLE_COUNT_E1SYS" NUMBER,
"ORACLE_COUNT_E1SYS2" NUMBER,
"TABLE_DESCRIPTION" NVARCHAR2(256)
)
TABLESPACE "SY910T" ;

--I use the below statement to get me a likely list of JDE owners that have JDE tables. This is using the F% criteria, note that it essentially builds the “IN” clause for you.
SELECT '''' || OWNER || ''',', count(1) FROM ALL_TABLES WHERE TABLE_NAME LIKE 'F%' group by owner;

grant all on SY910.DATACOUNTS to public ;

delete from sy910.datacounts ;

insert into SY910.datacounts select table_name,owner,0,0,simd
from all_tables left outer join ol910.f9860 on ltrim(rtrim(siobnm)) = ltrim(rtrim(table_name))
where owner in ('SVMDV01',
'JDE',
'SVMAP01',
'PD910',
'DD910',
'OL910',
'SVMAP02',
'SY910',
'DVDD910');

commit;

select 'update SY910.dataCounts set ORACLE_COUNT_E1SYS2 = (select count(1) from ' || table_owner || '.' || table_name || ' ) WHERE table_name = ' || '''' || table_name || '''' || ' and table_owner = ''' || table_owner || ''';' from sy910.datacounts
where table_owner in ('SVMDV01',
'JDE',
'SVMAP01',
'PD910',
'DD910',
'OL910',
'SVMAP02',
'SY910',
'DVDD910')
order by table_name desc ;


--update SY910.dataCounts set ORACLE_COUNT_E1SYS2 = (select count(1) from SY910.SHAE ) WHERE table_name = 'SHAE' and table_owner = 'SY910';
--update SY910.dataCounts set ORACLE_COUNT_E1SYS2 = (select count(1) from SY910.F99410 ) WHERE table_name = 'F99410' and table_owner = 'SY910';
--update SY910.dataCounts set ORACLE_COUNT_E1SYS2 = (select count(1) from SY910.F98TMPL ) WHERE table_name = 'F98TMPL' and table_owner = 'SY910';

Cheats way to copy a pathcode, quickly

$
0
0

Quick way to duplicate a pathcode:

Central objects copy, takes about 40 mins.  Honestly, forget import and export and security and indexes and constraints…  Just do this:

select 'TRUNCATE TABLE PP910.' || table_name || ';' from all_Tables where owner = 'PP910' and length(table_name) < 12 and table_name not in ('DATACOUNTS', 'F983051_BAK', 'F98950BK') ;

select 'INSERT INTO PP910.' || table_name || ' SELECT * FROM PD910.' || table_name || '@jde_e1sys ;' from all_Tables where owner = 'PP910' and length(table_name) < 12 and table_name not in ('DATACOUNTS', 'F983051_BAK', 'F98950BK') ;

update pp910.f983051 set vrenhv = 'PP910' ;

Then copy the PD910\include and PD910\source dirs on the dep server to PP910

Fix object librarian

create table jde.f9861srm as select * from ol910.f9861 where sipathcd = 'PD910' ;
delete from ol910.f9861 where sipathcd = 'PP910' ;
commit;
update jde.f9861srm set sipathcd = 'PP910' ;
insert into ol910.f9861 select * from jde.f9861srm ;
commit;

Full build and deploy.

Schedule a basic oracle script

$
0
0

This is for me when I need to do this again in a week…

I keep forgetting

image

c:\windows\syswow64\wscript.exe //e:vbscript d:\myriad\scripts\CheckForCorruptVersionsInProd.vbs

The contents of the script:

The script is totally RAD, it does a query (nice), but also emails results and uses some basic password encryption for prying eyes.

'Username, password and URL settings
'Modify what is required to get this running, username, password (create read only innocuous users)
FromEmailAddress="jde@au.myriad.com"
Const strSmartHost = "smtpserver.com.au"
Company="myriad"
RecipientNames = ARRAY("smoir@au.myriad.com", "shannon.moir@myriad-it.com")
'
'The password below has been encrypted with a top secret encryption key
'If the JDE password changes, then you'll need to reencrypt the new password
'This can be done by calling EncryptPasswordToFile fCrypt("newPAsswordText","Something99"),"passwordFile"

EncryptedPassword="ThingsGoHere"

PasswordString="Password="& fCrypt(EncryptedPassword, "Something99") & ";"

'EncryptPasswordToFile encrypted,"passwordFile"

Dim Oracon
set oraccon = wscript.createobject("ADODB.Connection")
Dim recset
set recset = wscript.createobject("ADODB.Recordset")
Dim cmd
set cmd = wscript.createobject("ADODB.Command")
Set Oracon = wscript.CreateObject("ADODB.Connection")

Oracon.ConnectionString = "Provider=OraOLEDB.Oracle;"& _
"Data Source=e1sys;"& _
"User ID=jde;"& _
PasswordString

Oracon.Open
Set cmd.ActiveConnection = Oracon
'cmd.CommandText = "Select count(*) from dvfindta.f0101"
cmd.CommandText = "SELECT vrpid, vrvers, vrjd, vrved FROM pd910.f983051 where vrvers not like 'XJDE%' and vrvers not like 'ZJDE%' and vrpodata is null and vrdstnm > ''"
Set recset = cmd.Execute
i=0
'Note that often this is not supported by the DB, so... Need to use a variable
if recset.recordcount = -1 then
counter=500
else
counter=recset.recordcount
end if
emailBody=chr(10) & chr(13) & "*** This Script contains a list of versions that should not have NULL PO's (500 max) ***"& chr(10) & chr(13)
emailBody=emailBody & encrypted & chr(10) & chr(13)
emailBody=emailBody & cmd.CommandText & chr(10) & chr(13)
emailBody = emailBody & "vrpid, vrvers, vrjd, vrved"& chr(10) & chr(13)
while ((i < counter) and (recset.EOF <> true))
for each field in recset.fields
tuple=tuple & """"& field.value & ""","
next
i=i+1
recset.MoveNext
emailBody=emailBody & chr(10) & chr(13) & tuple
tuple=""
wend

'wscript.echo emailBody
i=sendMail("WeeklySummary of NULL POs", emailBody,"")

set recset = nothing
set cmd = nothing
set oracon = nothing


'#####################################################################
'FUNCTION:sendMail
'#####################################################################
function sendMail(subjectText, emailBody, attachment)
on error resume next
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2

for each name in RecipientNames
'Create the message object
Set iMsg = CreateObject("CDO.Message")
'Create the configuration object
Set iConf = iMsg.Configuration
'Set the fields of the configuration object to send using SMTP via port 25.
With iConf.Fields
.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Update
End With

'Set the message to,from,subject,body properties.
if strlen(attachment) > 1 then
With iMsg
.AddAttachment attachment
.To = name
.From = FromEmailAddress
.Subject = subjectText & ""& now()
.TextBody = chr(1) & ""& emailBody
.Send
End With
else
With iMsg
.To = name
.From = FromEmailAddress
.Subject = subjectText & ""& now()
.TextBody = emailBody
.Send
End With
end if
set iMsg = Nothing
next

end function

Function fCrypt(sPlainText, sPassword)
'This function will encrypt or decrypt a string using the RSA's RC4 algorithm.
Dim aBox(255), aKey(255), sTemp, a, b, c, i, j, k, iCipherBy, sTempswap, iLength, sO
i = 0:j = 0:b = 0
iLength = Len(sPassword)
For a = 0 To 255
aKey(a) = Asc(Mid(sPassword, (a Mod iLength)+1, 1))
aBox(a) = a
Next
For a = 0 To 255
b = (b + aBox(a) + aKey(a)) Mod 256
sTempswap = aBox(a)
aBox(a) = aBox(b)
aBox(b) = sTempswap
Next
For c = 1 To Len(sPlainText)
i = (i + 1) Mod 256
j = (j + aBox(i)) Mod 256
sTemp = aBox(i)
aBox(i) = aBox(j)
aBox(j) = sTemp
k = aBox((aBox(i) + aBox(j)) Mod 256)
iCipherBy = Asc(Mid(sPlainText, c, 1)) Xor k
sO = sO & Chr(iCipherBy)
Next
fCrypt = sO
End Function

Function EncryptPasswordToFile(szPassword, filename)
Set wshShell = CreateObject( "WScript.Shell" )
tmpDirectory = wshShell.ExpandEnvironmentStrings( "%TMP%" )
set wshShell = Nothing
Const ForAppending = 8
logfile=tmpDirectory & "\"& filename & ".txt"
'Tempates

Set objFSO = CreateObject("Scripting.FileSystemObject")
set objTextFile = objFSO.OpenTextFile(logfile, ForAppending, True)

objTextFile.WriteLine(szPassword)
objTextFile.Close

end function

weblogic cannot start E1 web instance with server manager

$
0
0

This is becoming a little frustrating.

Because weblogic redeploys the application after EVERY restart from the owl_deployment directories under jde_home – if you have any directories locked or explorer open on any of these directories accidently – the application cannot redeploy and will not start.

image

If you goto http://servername:7001/console and look at the application, you’ll see that it’s running!

image

You’ll see that it’s running in WLS, but JDE states it’s not.

Remove all of the locks on the runtime dirs, oracle\middleware\user_projects…

Then stop application from wls console

Then start from SM

getting OATS to work with OVR in E1–JDE load testing tips

$
0
0

This was not the easiest thing I’ve ever done, but interesting things never are.

I have been doing some load testing, but need to ensure that OVR reports are being load tested at the same time.  OVR, as you know runs on the xmlpserver / xmlpublisher technology from oracle.

Of course, I suspected that out of the box I might have a few issues getting this to work and I was not wrong.

I was getting a lot of errors like this:

http://e1ovr.myriad-it.com:9704/xmlpserver/io/zip/read-resource-cache	0.112	10-20 00:19:23	0.109		Warning	Invalid HTTP response code: 500  Internal Server Error , for Url: http://e1ovr.myriad-it.com:9704/xmlpserver/io/zip/read-resource-cache  	

image


image


So getting 500’s and 404’s when running, right – we need some fixes.


In general the server maintains cookies or passes header values back and forth to ensure that you have the ability to see it’s resources, xmlp is the same in this respect.  Passing the values that are recorded by OATS are never going to cut the mustard on a replay.  this is where you need to work out what variables that you need to ensure are unique for each session and then create some internal OATS variables for these.


For me this is generally a bit of trial and error, as really there is no way of determining exactly.


Here are some likely candidates for XMLP:

http://e1ovr.myriad-it.com:9704/xmlpserver/viewer.jsp?
_xpt=1&
_xdo=%2F%7Ebip%2Fruntime%2FMqDWksFPrgpvkky7wmj7qxKx95pXQkzn0vG1RJRQQgln79SKL%2F0640f55c252b4603baa1aa3dfd779e3a.xdo
_xt=Inventory+Valuation+by+Branch+Plant
_xl=en
_xf=analyze
_xtoken=B06BE2613C8F251D3044D54EB3A10C6A

Likely are _xdo and _xtoken, but what you’ll find is _xdo is unique for the report being called, so only xtoken needs to be replaced.


You’ll find this hidden in a jde screen, use a regular expression like this for extraction:

_xf=analyze&_xtoken=(.+?)'

or

http.solve("xtoken", "_xf=analyze&_xtoken=(.+?)'", "", false,
Source.Html, 0, EncodeOptions.None)

Then you’ll also need to replace the unique number in the following string”":  cache:oracle.xdo.common.io.Cache5995658651262771787.tmp#  and pass this around to all commands that use it.


image


Once both of the above are done, your load tests should start belting the OVR server just like they should.

Attending open world

$
0
0

I’m not too sure whether anyone out there (listening to this) is going to oracle open world, but I’m lucky enough to be attending.  Reach out to me if you’d like a demo of google analytics for JDE or perhaps a look at our enterprise mobility solutions.  We could also just talk about how cool 9.2 is until the wee hours of the morning…

I really look forward to see what is out there in the oracle space for the next year.  I’ll be sure to blog anything interesting that I learn.

JD Edwards and IOT

$
0
0

Exciting

This is a pretty exciting enhancement, it’s exciting for a number of reasons.  Although to be honest, technically – it’s not that exciting.  It’s the change of thinking that is truly exciting.  Can I write the word exciting anymore, let’s see.

Why do I say that technically it’s not exciting, well most of the cool stuff has already been released in AIS, so the generic ability to call E1 functionality via rest based calls is totally awesome.  This must be the way you choose to integrate anything with JD Edwards moving forward.  It seems to be lighter and easier to develop in than BSSV, error handling is better and more forgiving, especially for a human based interface (mobile, website etc).  Don’t get me wrong, BSSV has it’s place – but it’s no longer that cool.

The technology that is doing the rules based filtering is nice, but fairly rudimentary at this stage, lets wait for some graphical tool to assist us.  Something nice with flows and drag and drop parameters  that’d be nice.  Don’t stop with the flow and the rules either, how about making AIS development graphical – come on – there is a challenge.  I’d like some nice tool to drop 3 XML documents into the associated directories and allow me to call them!  True, I’m getting old.  Although let’s be honest – who calls writing a well formed XML document “cutting code”?

Change of thinking, business opportunity:

So this is where I think that the true value is, I don’t think that you need to look too hard for a use case either – especially if you take inputs from anything and enter them into JD Edwards,

JD Edwards is not going to be a great data warehouse, it’s not going to store 100000’s of rows of asset location data well, of course it will – but it’ll slow everything else down.  You need to design your inputs so that they are meaningful in JD Edwards.  Don’t misinterpret what I’m saying, SAVE ALL DATA – you’ll never know what it’s actually worth.  I’m just saying that saving it into your production JD Edwards database might not not be the most efficient place.  Save the triggering event, raise the work order when the temperature device reads too high….  But don’t save the normal 1 minute trend data for the last year in JD Edwards.  Save this in a data warehouse and show it with CAFE1 if you really need to see it in JD Edwards.  Choose the right place for your data.

Remember, IOT is going to create a lot of data…  More sensors, more data.  keep your data and save your data for a rainy and strategic day for the use case that you cannot visualise today.

I think some fantastic opportunities for this is:

  • weighbridge interfaces
  • quality readings from products – steel / food etc
  • RFID for shipping and identification
  • anything PLC related
  • temperature, moisture (agri business), location, angle, speed, noise,

I think there are fantastic opportunities with CAM and with HS&E, this data could be vital when trying to predict incidents that cause harm and report over them.  Remember you’ll get true data from IOT, no mistakes, always entered on time – accurately.

We’re prototyping some IOT for clients at the moment, if you think that you’ve got a winning use case – we have a winning team that might be able to implement the solution for you at the right price. 

Here are a couple of learning's from my recent adventures in IOT.

image

The general section of your AIS server needs to point to quite a specific directory – this one:

/U01/jde_home1/sampleOrchestrations/SampleOrchestrations/JDE_IOT_Orchestrator_XML

For me, it’s above.  But I want to give you some context.  This is from downloading the ORCHESTRATION SAMPLES file from MOS


image


Note the one that is 0.03MB is the one that you want.


Lay this bad boy out on your AIS server.  rename the par.zip, or just unzip the par…  Note that you might have to yum install unzip


You need to make sure that you point this AIS configuration about to the right DIR, it as the following folders in it:

CrossReferences
Orchestrations
Rules
ServiceRequests
WhiteLists

Okay, so you have the right DIR.


Note that if like me you get the following error when you try and log into the orchestrator client;  (Authentication error)


http://e1webv3:9221/jderest/client 


You turn on all logging and get the following in the server logs for the AIS server:

09 Nov 2015 12:36:19,224[DEBUG][AIS]AISClientServlet session Exception
http://e1webv3:9221 com.oracle.e1.aisclient.JDERestServiceException: 401 Verifiy WLS Server Basic Authorization Header configuration in domain config.xml, enforce-valid-basic-auth-credentials must be false:
09 Nov 2015 12:41:18,581[DEBUG][AIS]AISClientServlet public
09 Nov 2015 12:41:18,582[DEBUG][AIS]AISClientServlet service method POST
09 Nov 2015 12:41:18,582[DEBUG][AIS]AISClientServlet doPost
09 Nov 2015 12:41:18,583[DEBUG][AIS]AISClientServlet params JDE-JPY920-*ALL-e1webv3:9221-Z1bp4u58flboTpjN-lD1DbZ3t2BH-UH2Li-UnQBYnIzxFhqr2A9P!-488571965
09 Nov 2015 12:41:18,584[DEBUG][AIS]AISClientServlet doPost aisServerhttp://e1webv3:9221
09 Nov 2015 12:41:18,584[DEBUG][AIS]AISClientServlet login path
09 Nov 2015 12:41:18,591[DEBUG][AIS]E1ResUtils getAISVersion buffer
09 Nov 2015 12:41:18,592[DEBUG][AIS]E1ResUtils getAISVersion in java.io.BufferedReader@6e293511
09 Nov 2015 12:41:18,593[DEBUG][AIS]E1ResUtils getAISVersion inputLine EnterpriseOne
09 Nov 2015 12:41:18,619[DEBUG][AIS]Successfully registered the runtime_config Runtime Metric for com.oracle.e1.jdemf.DefaultConfig@2a6547af Using null
09 Nov 2015 12:41:18,619[DEBUG][AIS]Successfully registered runtime_config Mbean com.oracle.e1.jdemf.DefaultConfig@2a6547af
09 Nov 2015 12:41:18,621[DEBUG][AIS]Required Capability List IN: null
You’ll find that this will make your eye’s roll  https://support.oracle.com/epmos/faces/DocContentDisplay?id=2040956.1

Note that the fix is to go to your config.xml for the domain that the AIS server is installed in:

/U01/Oracle/Middleware/user_projects/domains/E1_Apps/config

And edit the config.xml file – probably make a backup (or not if you are feeling like rebel)

<name>E1_Apps</name>
<domain-version>12.1.3.0.0</domain-version>
<security-configuration>
<name>E1_Apps</name>
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
<realm>

See above, look for the realm entry and paste above that for your domain.  I did it in the wrong place initially and nothing worked.  Restart the AIS server instance from SM and you’ll be able to login.


image


Cool!  We are in:


image


Like I said a fairly simple interface for choosing an existing item from the list: (or dir)


image


Be able to enter the inputs


image


Add some values and hit go, you’ll see some cools things:

{
"inputs" : [ {
"name" : "SensorID",
"value" : "123"
}, {
"name" : "Date",
"value" : "101015"
}, {
"name" : "Time",
"value" : "01:35"
}, {
"name" : "VibrationReading",
"value" : "5435"
}, {
"name" : "TemperatureReading",
"value" : "5534"
}, {
"name" : "ShannonsTest",
"value" : "Hello World"
} ]
}

Nice, json input format, which we can test


And, even nicer, using chrome debug tools, you can get a cURL command

curl "http://e1webv3:9221/jderest/clientservice/orchestrator" -H "Origin: http://e1webv3:9221" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: en-US,en;q=0.8" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "Accept: */*" -H "Referer: http://e1webv3:9221/jderest/client/orchestrator.html" -H "Cookie: JSESSIONID=b5D14vor1wgZXx7MrUXPu4xnC_e_rxMQE0fyaAI32wA9U7To9wLj!1811286266; SMCONSOLE_SSID=jYj12SvLtf_HhobsFJGGXn2X-4ZdGG27K2O-3rI6tpxVkhkAb8-p!-1147834967" -H "Connection: keep-alive" --data "orchname=JDE_ORCH_Sample_AddConditionBasedAlert&generic=false&useJson=true&jsonString={"^
"""inputs"" : [ {"^
"""name"" : ""SensorID"","^
"""value"" : ""123"""^
" }, {"^
"""name"" : ""Date"","^
"""value"" : ""101015"""^
" }, {"^
"""name"" : ""Time"","^
"""value"" : ""01:35"""^
" }, {"^
"""name"" : ""VibrationReading"","^
"""value"" : ""5435"""^
" }, {"^
"""name"" : ""TemperatureReading"","^
"""value"" : ""5534"""^
" }, {"^
"""name"" : ""ShannonsTest"","^
"""value"" : ""Hello World"""^
" } ]"^
"}&name_0=SensorID&value_0=123&name_1=Date&value_1=101015&name_2=Time&value_2=01:35&name_3=VibrationReading&value_3=5435&name_4=TemperatureReading&value_4=5534&name_5=ShannonsTest&value_5=Hello World" --compressed

 


Of course, this won’t help you – coz the cookie will be dead by the time I post this and this server in not on the internet, but you get the gist of what is being done.


What do you need to do to get this working?

<?xml version="1.0" encoding="UTF-8" ?>
<Orchestration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="JDE_Orchestration.xsd">
<inputTypes>
<inputTypes type="String">
<name>SensorID</name>
</inputTypes>
<inputTypes type="Date" dateFormat="Milliseconds">
<name>Date</name>
</inputTypes>
<inputTypes type="String">
<name>Time</name>
</inputTypes>
<inputTypes type="Numeric">
<name>VibrationReading</name>
</inputTypes>
<inputTypes type="Numeric">
<name>TemperatureReading</name>
</inputTypes>
</inputTypes>
<orchestrationSteps>
<orchestrationSteps type="CrossReference">
<name>JDE_XREF_Sample_SensorLocation</name>
</orchestrationSteps>
<orchestrationSteps type="CrossReference">
<name>JDE_XREF_Sample_AlertNotificationRecipients</name>
</orchestrationSteps>
<orchestrationSteps type="Rule">
<name>JDE_RULE_Sample_CBMAlarm_1</name>
<trueActions>
<orchestrationSteps type="ServiceRequest">
<name>JDE_SREQ_Sample_AddCBAlert_Alarm</name>
</orchestrationSteps>
</trueActions>
<falseActions>
<orchestrationSteps type="Rule">
<name>JDE_RULE_Sample_CBMAlarm_2</name>
<trueActions>
<orchestrationSteps type="ServiceRequest">
<name>JDE_SREQ_Sample_AddCBAlert_Alarm</name>
</orchestrationSteps>
</trueActions>
<falseActions>
<orchestrationSteps type="Rule">
<name>JDE_RULE_Sample_CBMAlarm_3</name>
<trueActions>
<orchestrationSteps type="ServiceRequest">
<name>JDE_SREQ_Sample_AddCBAlert_Alarm</name>
</orchestrationSteps>
</trueActions>
<falseActions>
<orchestrationSteps type="Rule">
<name>JDE_RULE_Sample_CBMWarning</name>
<trueActions>
<orchestrationSteps type="ServiceRequest">
<name>JDE_SREQ_Sample_AddCBAlert_Warning</name>
</orchestrationSteps>
</trueActions>
</orchestrationSteps>
</falseActions>
</orchestrationSteps>
</falseActions>
</orchestrationSteps>
</falseActions>
</orchestrationSteps>
</orchestrationSteps>
</Orchestration>

So we can see from the above document, how the various components are being called (cross reference etc)


P952000 will show you the maps that can be maintained in JDE for cross reference etc:


image


Note that I get the following error, because I need to load the cross reference data into my F952000 tables

{
"exception" : "java.lang.Exception",
"timeStamp" : "2015-11-11:20.59.05",
"message" : "Orchestration Aborted: Cross Reference Failure"
}

32 vs 64 bit app determination and windows which–two bugbears of mine (what’s a bugbear?)

$
0
0

 

I’ve struggled for this for a while too, in this modern day of transition from 32 to 64 bit, why is not HEAPS easier to tell if a file is 64 bit?  Give me the unix file command any day of the week.  While I’m on a rant, the other thing I dislike about windows is that there is no where command.  If I’m running sqlplus – I want to know which one in the path is being called – not just guess.  This is a common problem on deployment servers where you have e1local that is 64 bit and then you have the 32 bit client component.

Note that one of my prayers have been answered:  which is a command that I use on linux all of the time.  Handy to know what version of sqlplus is being used and therefore what tnsnames to change.  modern windows you can now use where!

C:\Oracle\E1Local\BIN>where sqlplus
C:\Oracle\E1Local\BIN\sqlplus.exe
D:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe

It seems that the consensus online us using dumpbin, this is crap.  No everyone has visual studio just lying around for this purpose.  We don’t want to download noddy little tools to do this stuff.

Wait, both rants might be over.  Thanks to this post:  http://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows

clip_image002

64bit

clip_image004

32bit

This is really cool, so I can use the tools that are installed on my machine to determine 64 and 32 bit applications by a simple notepad interrogation.

Note that you can also use findstr if you don’t want to involve notepad:

C:\Oracle\E1Local\BIN>findstr /C:"PE" D:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe |more

clip_image006

See the PE then L in the 2nd page of the results.  Remember that the L means 32 bit

Note that after considering the wikipedia definition of bugbear, I might stop using the word.  It does not seem to make a lot of sense the way I use it…  unless you look right to the end of the actual definition In a modern context, the term bugbear may also mean pet peeve


weblogic 12.1.3.0.0 and IP address for weblogic.management.server

$
0
0

All of my blog posts are generally created out of need, this one is another example.  I was helping out a client with a DR test of their JD Edwards and it was all looking great until the automatic start of the JD Edwards weblogic instances did not work.  They went from starting to stopped in server manager.  What!!!  The start procedure has been tested 100 times and is solid as a rock, we use nmstart commands in a startup script.  All nice and neat.

on further analysis of the individual JVM logs, I see the following (amongst the errors)

weblogic.home = D:\oracle\Middleware\Oracle_Home\wlserver\server
weblogic.management.server = http://10.38.144.11:7001

in the servername.out file in domainname\servers\servername\logs dir


It’s trying to use an IP address for the weblogic.management.server setting.  Tidy darts, I’ll just use windows find to locate where the IP address is specified (surely just an xml file… no, maybe .config, no – maybe .cmd… no… .properties file…  nothing say’s windows find).  Needless to say windows find is the most useless tool that has every been put on the face of this planet.  This is 2012R2 also…


Using the trusty

D:\oracle\Middleware>findstr /S /C:"10.38.144.11" *.* | findstr /V /C:".log" |findstr /V /C:".out"

…  I find the following file (of course, not one of the extensions that I’d been expecting…  proprietary binary format)

Oracle_Home\user_projects\domains\E1_Apps\servers\AdminServer\data\store\default

\_WLS_ADMINSERVER000000.DAT:loadFactorI         thresholdxp?@     ♀ ► ♀t ♦sn

mpt ▬snmp://10.38.144.11:96t ☻t3t ¶t3://10.38.144.11:96t ♣httpst ¶t3://10.38.144

.11:96t ↑cluster-broadcast-securet ¶t3://10.38.144.11:96t ♦ldapt ▬ldap://10.38.1

44.11:96t ◄cluster-broadcastt ¶t3://10.38.144.11:96t ♦httpt ▬http://10.38.144.11

:96t ♣admint ¶t3://10.38.144.11:96t ♦iiopt ▬iiop://10.38.144.11:96t ♣ldapst ¶t3:

//10.38.144.11:96t ♥t3st ¶t3://10.38.144.11:96t ♣iiopst ¶t3://10.38.144.11:96xsq


What, this is a persistent filestore under the adminserver which is caching the IP address of the server before DR.  This is painful!  This is the ONLY location it’s specified anywhere.

Hmm, a bit of googling later leaves me quite sure that I cannot do anything with this in a rush, it looks complex.  The one thing that I can do in a rush is to delete the file and restart the machine, see if my scripts work.

So, after taking down the adminServer (it locks the file hard) I backed up the file and removed it. 

clip_image002

My server then started perfectly – but of course, the funny thing?  Look at what it uses now in the persistent store:

weblogic.home = D:\oracle\Middleware\Oracle_Home\wlserver\server
weblogic.management.server = http://10.38.16.12:7001
weblogic.nmservice.RotationEnabled = true

The IP address of the DR machine!! haha.  Monkey see, monkey do.


This must be some sort of bug in the adminserver which is caching the IP address not the hostname of the machine that the server is starting on.  I’m considering raising an SR for this, we’ll see.


Remember, if you are using nmstart and changing IP addresses of your server, you probably want to delete the admin server persistent cache.

AIS based coolness

$
0
0
You are probably aware that we've done quite a bit of bespoke development in the enterprise mobility space.  I've banged on about it enough.  We have a work orders application that does GPS tracking, generic file attachments, powerful search functionality and offline caching...  do I need to say more.  This app would probably cook you breakfast if you set the PO's correctly.

But... I had to demo this app to another client and they were on 9.1.3.1 - fair enough, but the stinko AIS was only released in 9.1.4.3 - we have a problem!

I was not about to install / upgrade their environment just for my demo - they wanted their data on the app - which is also appropriate.  So, I decided to install an AIS server and 9.1.5.7 and a HTML server at 9.1.5.7 and see how it went.  of course I was also going to use the JDBJ bootstrap data source to point to different serialised objects, because I think that different tools serialisation might cause me some problems down the track with the existing PY environment.

A very small amount of hacking had me up and going on the latest tools release (well 9.1.5.7) and using AIS against a 9.1.3.1 enterprise server.  I know you are all going - but but butt...  BUT - it works and it saves me a lot of time.  I've not contaminated the standard environment at all.  I've not had to put on a single ESU - coz all I want is the extra AIS power!

I would recommend this approach to anyone spending time developing in AIS, as the newer tools releases expose a lot more functionality.  Create a little "Island of AIS" [you can use that] so that your developers are not going to need to create depreciated code from the start.

oracle olite, old bpel and SOA and the database that would not shrink

$
0
0
wow, this was a beauty.

I've been fighting it for some time now.

I have an old oracle lite database that houses the internals for a BPEL install.  the database is orabpel.odb and exists in D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite.

This was used for an integration project that uses EXCEL to call BSSV WS via BPEL PM.  Pretty cool hey.  BPEL PM might have been over kill, but it was nice and neat!  This has been working for about 5 years, and the client called me and told me it was broken...  Oh dear...

The orabpel database was 4GB!

I cannot do anything with it.

I learned how to connect to the database, this is all done through the magic of polite.ini and
[All Databases]
DatabaseID=1735
DataDirectory=D:\product\10.1.3.1\OracleAS_1\Mobile\Sdk\OLDB40
NLS_LOCALE=ENGLISH
NLS_LANGUAGE=ENGLISH
MessageFile=D:\product\10.1.3.1\OracleAS_1\Mobile\Sdk\BIN\olite40.msb
DB_CHAR_ENCODING=UTF8
DATABASE_ID=503
#DATA_DIRECTORY=D:\temp\10.1.3.1\OraBPEL_4\Mobile\Sdk\oldb40
#MESSAGE_FILE=D:\temp\10.1.3.1\OraBPEL_4\Mobile\Sdk\BIN\OLITE40.MSB

And odbc.ini (of course)
[ODBC 32 bit Data Sources]
orabpel=Oracle Lite 40 ODBC Driver (32 bit)
WEBTOGO=Oracle Lite 40 ODBC Driver (32 bit)
POLITE=Oracle Lite 40 ODBC Driver (32 bit)
oraesb=Oracle Lite 40 ODBC Driver (32 bit)
orawsm=Oracle Lite 40 ODBC Driver (32 bit)
shannon=Oracle Lite 40 ODBC Driver (Client) (32 bit)
[POLITE]
Driver32=D:\temp\10.1.3.1\OraBPEL_4\Mobile\Sdk\BIN\olod2040.dll
Description=Oracle Lite 40 Data Source
DataDirectory=D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite
Database=POLITE
IsolationLevel=Read Committed
Autocommit=Off
CursorType=Static
[WEBTOGO]
Driver32=D:\temp\10.1.3.1\OraBPEL_4\Mobile\Sdk\BIN\olod2040.dll
Description=Oracle Lite 40 Data Source
DataDirectory=D:\temp\10.1.3.1\OraBPEL_4\Mobile\Sdk\oldb40
Database=WEBTOGO
IsolationLevel=Read Committed
Autocommit=Off
CursorType=Static
[oraesb]
Driver32=D:\product\10.1.3.1\OracleAS_1\Mobile\Sdk\BIN\olod2040.dll
Description=Oracle Lite 40 Data Source
IsolationLevel=Read Committed
Database=oraesb
Autocommit=Off
CursorType=Static
DataDirectory=D:\product\10.1.3.1\OracleAS_1\Mobile\Sdk\OLDB40
[orabpel]
Driver32=D:\temp\10.1.3.1\OraBPEL_4\Mobile\Sdk\bin\olod2040.dll
Description=Oracle Lite 40 Data Source
DataDirectory=D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite
Database=orabpel
IsolationLevel=Repeatable Read
Autocommit=Off
CursorType=Static
[orawsm]
Driver32=D:/product/10.1.3.1/OracleAS_1/Mobile/Sdk/BIN/olod2040.dll
Description=Oracle Lite 40 Data Source
DataDirectory=D:/product/10.1.3.1/OracleAS_1/Mobile/Sdk/OLDB40
Database=orawsm
IsolationLevel=Read Committed
Autocommit=Off
CursorType=Static
[shannon]
Driver32=D:\product\10.1.3.1\OracleAS_1\Mobile\Sdk\BIN\olcl2040.dll
Description=shannon
ServerHostName=localhost
ServerPortNumber=1531
ServerDSN=
DataDirectory=D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite
Database=orabpel.odb
IsolationLevel=Read Committed
Autocommit=Off
CursorType=Forward Only


These two files contain the pointers that BPEL is going to talk to when looking for the internal configuration.

Querying the data was difficult, but finally I used:

Yes, that is the password out of the box, you do not get an option to set it on the standard install.

Cool, we can log in and see that there is 72 tables, 3 are huge, actually about 5.  WORK_ITEM is the worst, but CUBE_SCOPE and CUBE_INSTANCE are terrible.

I cannot drop and of the tables...  I get "out of memory"
[POL-2000] can't allocate more memory

I cannot alter table drop column.
[POL-2000] can't allocate more memory

I cannot truncate.
[POL-2000] can't allocate more memory

I can delete rows, but he commit takes about 1 hour.

I have to create "create table" statements from describe results if I want to create the tables again.

Wow, I'm in a pickle.

I installed another BPEL server with the same software and got a copy of the tables empty - this was very helpful.  Note that when BPEL started, this is when it seemed to create all of the tables - weird.

I then used a series of commands to move data from valid tables (like SUITCASE_BIN) to the empty copy of orabpel.odb.

WFROUTINGSLIPolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFROUTINGSLIP  > d:\temp\WFROUTINGSLIP.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFROUTINGSLIP  < d:\temp\WFROUTINGSLIP.dmp
WFNOTIFICATIONolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFNOTIFICATION  > d:\temp\WFNOTIFICATION.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFNOTIFICATION  < d:\temp\WFNOTIFICATION.dmp
WFATTRIBUTELABELUSAGEolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFATTRIBUTELABELUSAGE  > d:\temp\WFATTRIBUTELABELUSAGE.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFATTRIBUTELABELUSAGE  < d:\temp\WFATTRIBUTELABELUSAGE.dmp
WFUSERVACATIONolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFUSERVACATION  > d:\temp\WFUSERVACATION.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFUSERVACATION  < d:\temp\WFUSERVACATION.dmp
WFUSERTASKVIEWolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFUSERTASKVIEW  > d:\temp\WFUSERTASKVIEW.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFUSERTASKVIEW  < d:\temp\WFUSERTASKVIEW.dmp
WFUSERTASKVIEWGRANTolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFUSERTASKVIEWGRANT  > d:\temp\WFUSERTASKVIEWGRANT.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFUSERTASKVIEWGRANT  < d:\temp\WFUSERTASKVIEWGRANT.dmp
WFUSERPREFERENCEolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFUSERPREFERENCE  > d:\temp\WFUSERPREFERENCE.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFUSERPREFERENCE  < d:\temp\WFUSERPREFERENCE.dmp
VERSIONolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb VERSION  > d:\temp\VERSION.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb VERSION  < d:\temp\VERSION.dmp
WFTASKMETADATAolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFTASKMETADATA  > d:\temp\WFTASKMETADATA.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFTASKMETADATA  < d:\temp\WFTASKMETADATA.dmp
WFTASKDISPLAYolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFTASKDISPLAY  > d:\temp\WFTASKDISPLAY.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFTASKDISPLAY  < d:\temp\WFTASKDISPLAY.dmp
WFTASKTIMERolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFTASKTIMER  > d:\temp\WFTASKTIMER.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFTASKTIMER  < d:\temp\WFTASKTIMER.dmp
WFNOTIFICATIONMESSAGESolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WFNOTIFICATIONMESSAGES  > d:\temp\WFNOTIFICATIONMESSAGES.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WFNOTIFICATIONMESSAGES  < d:\temp\WFNOTIFICATIONMESSAGES.dmp
CI_INDEXESolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb CI_INDEXES  > d:\temp\CI_INDEXES.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb CI_INDEXES  < d:\temp\CI_INDEXES.dmp
SCOPE_ACTIVATIONolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb SCOPE_ACTIVATION  > d:\temp\SCOPE_ACTIVATION.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb SCOPE_ACTIVATION  < d:\temp\SCOPE_ACTIVATION.dmp
WI_EXCEPTIONolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb WI_EXCEPTION  > d:\temp\WI_EXCEPTION.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb WI_EXCEPTION  < d:\temp\WI_EXCEPTION.dmp
XML_DOCUMENTolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb XML_DOCUMENT  > d:\temp\XML_DOCUMENT.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb XML_DOCUMENT  < d:\temp\XML_DOCUMENT.dmp
SYNC_TRAILolload -dump D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel.odb SYNC_TRAIL  > d:\temp\SYNC_TRAIL.dmpolload -load D:\product\10.1.3.1\OracleAS_1\bpel\system\database\olite\orabpel_works.odb SYNC_TRAIL  < d:\temp\SYNC_TRAIL.dmp

Above are the dump and load commands for each of the tables, I generated these with a excel formula and pasted them into the command window.  this gave me a base copy with my BPEL processes, but not the instance history.

Note that I was unable to delete the history too, as the DB would not process this from the BPEL console.

I tried about 10000 other things before I got this to work.  I had the defragdb.exe fail every time, so this would not get me any space back.  
The following error has occurred:
DBException: [POL-2403] value too large for column


The following error has occurred:
DBException: [POL-3261] there are too many transactions




Note that it was failing for all of the above, which was also painful.  I actually think that changing the odbc.ini to IsolationLevel=Repeatable Read for orabpel fixed the error below:

The following error has occured:
DBException: [POL-3261] there are too many transactions

but it then still failed at the end with:
DBException: [POL-2403] value too large for column

my orabpel database is now 2MB, not 4,191,736MB



Blogging has been made almost impossible

$
0
0
Wow, this is tough.  I use windows live writer for blogging to blogger.  The reasons are simple, I have a source code formatting plugin which I love, and I like being able to cut and paste pictures easily - not much else to be honest.

I've recently gone to windows 10, and now I cannot blog.

I cannot blog with windows live writer 2011
I cannot blog with windows live writer 2012
I cannot blog with open live writer...

I've enabled the google 2 phase security - I've allowed certain app security - wow - I think that I've done everything possible, but I cannot seem to tear a post out.  I'm about to look for an alternate app, but not too sure how successful I'm going to be with that...  Watch this space.

Using OATS and OVR - The TLA edition

$
0
0
OATs is very good for load testing JD Edwards.  I think it's handy to use at all phases of the software lifecycle, but especially for testing a tools release, an upgrade or platform migration.

I've recently been involved in getting OATs working with OVR, this was a bit more of a challenge, as the standard correlation library that comes for JD Edwards does not do any of the OAT's session correlations - therefore, it'll never work "out of the box".

There are a bunch of internal header values used for communicating to OATS that you need to manually keep track of and substitute in your scripts, namely:

  • tid
  • xtoken
  • xdm
  • xdo
  • resourceCacheID
Many of these can be set up in a new correlation library, but some cannot.  It's a little more difficult when the substitutions need to be done on _xdo and also xdo when using correlation libraries.

I'd generally show you a pile of code snippets and screen shots, but I'm struggling with blogging from windows 10 at the moment to blogger, so these are not going to happen.

The process is to search the incoming HTML for something like xdo, and create a variable out of that.  then replace all other instances of xdo in the script, like I said in a perfect world this would work by adding this rule to the correlation library - but the world is not perfect.  The other thing to remember is that this substitution must be done in RAW.

Ensure that your variable rule is something like "&_xdo=(.+?)&_xt=", it needs to be nice and generic to ensure that you are getting the xdo variable.  Note also that if you call a subsequent OV report in the same JDE login session you'll need to refresh this and the xtoken (yes, painful).

Make sure you then prescribe the variable substitution with the following:
xdo=((.+?))(&|$)

Resource cache is done with
cache:oracle\.xdo\.common\.io\.Cache(.+?)\.tmp#

I then say replace in all locations.


I think I can, I know I can

$
0
0

This is the first blog of 2016, which I hope to make the year of the blog.  Thanks so much to the people of open live writer for making this possible again.  http://openlivewriter.org/ I cannot coomit until this posts.

I need to add my source code plugins again, but this is small price to pay to be able to blog again.

reverse engineer forms for mobile development

$
0
0

Okay, things are going to get fairly technical here, but that’s what this blog is all about.

We are writing a lot of mobile applications for JD Edwards at the moment.  We have our apps integrating with GPS, doing google map overlays (wait – post coming) and more.

In this journey we are looking for better ways to write the applications, better ways of determining all of the control IDs, so that when we import these into the mobile development – they can be flexible and dynamic.  i.e. we want to kind of create a UO of a form which only exposes the cut down version that we want on our mobile device (that type of thing).  This is like creating a runtime environment which will read an XML document, and based upon this (at runtime) display the various JDE screens and functionality.  Now, this is the end game – but there are some cool intermediate steps we can go through.

Firstly, we have a massive grid and want to be able to choose any field on the grid for QBE.  Then I want to also see the DD information for the item, to determine the default lookup screen.  This default lookup screen and default values will be great for our custom app to do things at runtime.

The problem is that you cannot get the ID’s of all the internal items from the HTML or scripts in JDE.  You can’t view source and see all of this additioinal information.  You cannot view the BLOB in F98751 to see what the code is doing (because of byte order which is the same in the F983051)…  You cannot print out the values from FDA either, which is a pain.

But, you can save your application as a par file, rename it to a zip file and then start looking around:

image

Above shows from OMW, hit save and choose zip file.

image

And then looking into specs.zip

image

Then in the fdaspec folder:

image

So for every object on the form, you have a nice, neat separate XML document.  extract these to a directory:

Open one of the controls that you know is in the grid, for example:

<?xml version="1.0" encoding="UTF-8"?>
<FDA ApplicationName="P55WOSF" xmlns:et="http://peoplesoft.com/e1/metadata/v1.0/erptypes" xmlns="http://peoplesoft.com/e1/metadata/v1.0">

<FDARecord>

<FDAColumn FormName="W55WOSFA" GridID="1" SequenceNumber="34"ObjectID="50" ColumnTitleId="2036" NumberOfTextChar="15" Visible="true" InputCapable="true" SortOrder="A" Flags="14336">

<et:Dbref szTable="F1201" szDict="DADS"/>

<et:DdOverrides/>

</FDAColumn>

</FDARecord>

</FDA>

The great thing about the above is it maps the ObjectID to the Table and DD item, therefore we can do a lookup on the F9210 for the DD defaults to get Alpha Text and also the default lokup information.  Nice.

We’ve built a custom table that indexes all of this information, we read this JD Edwards table at runtime to dynamically display the text that we want to display and also proper lookup values when doing data selection.


The real performance impact of logging and nettrace to JD Edwards

$
0
0

Ever wanted to know what the affect of enabling logging was going to be on your back end users?  Have you ever really wanted to get some sqlnet tracing and some jdedwards logging on a problem – but not been brave enough because of the impact on your servers and your end users.  Well, I might have some handy metrics for you.

I’ve been working with a client that gets a little too many of these bad boys when they are under load:

D:\JDEdwards\E910\log>findstr  ORA-03113 *
jdedebug_1880.log:Jan 19 19:42:12.516059 - 1880/7520 WRK:DGTEST01_09F8D008_P01012       OCI0000179 - Error - ORA-03113: end-of-file on communication channel
jdedebug_5204.log:Jan 19 19:20:18.520003 - 5204/4840 WRK:DGTEST01_0B3BFEF0_P4310        OCI0000179 - Error - ORA-03113: end-of-file on communication channel
jdedebug_6800.log:Jan 19 19:43:08.980002 - 6800/2952 WRK:DGTEST01_0975AA28_P01012       OCI0000179 - Error - ORA-03113: end-of-file on communication channel
jde_1880.log:   OCI0000179 - Error - ORA-03113: end-of-file on communication channel
jde_5204.log:   OCI0000179 - Error - ORA-03113: end-of-file on communication channel
jde_6800.log:   OCI0000179 - Error - ORA-03113: end-of-file on communication channel

Yep, this is not good.  It’s essentially the client saying my connection has been terminated, I give up.  There is generally a requisite alert in the database error logs.

Tue Jan 12 21:21:49 2016

Errors in file /u01/app/oracle/diag/rdbms/jdegsuat/JDEGSUAT1/trace/JDEGSUAT1_ora_90089.trc  (incident=120946):

ORA-03137: TTC protocol internal error : [12333] [7] [2] [0] [] [] [] []

Incident details in: /u01/app/oracle/diag/rdbms/jdegsuat/JDEGSUAT1/incident/incdir_120946/JDEGSUAT1_ora_90089_i120946.trc

Of course, oracle support are not going to touch this without a shed load of logs – so guess what – I’m going to give them a shed load of logs.

sqlnet.ora has been modified with the following (this is a 12C database and client).

trace_level_client = 16

trace_file_client = cli

trace_directory_client = d:\trace

trace_unique_client = on

trace_timestamp_client = on

trace_filelen_client = 100

trace_fileno_client = 2

log_file_client = cli

log_directory_client = d:\trace\log

tnsping.trace_directory = d:\trace\trace

tnsping.trace_level = admin

Not too sure how many of these are working, because all of the logs are being written to d:\oracle\diag – not the dir that I’m specifying…  Anyways…...

image

So my scripts with a mixed work load saw up to 7.1% net speed loss with logging (interactive speed, averaged over 1000 sessions executing the same mixed workload).  An average of 14.6% slower with sqlnet tracing and jde logging. 

I’d expect batch to slowdown more, but this was pretty good.

Note that the server was running at about 85% CPU utilisation when logging was enabled, not the 12% that it was without logging enabled!!!

change a table and save off the data–how to guide- oracle syntax

$
0
0

A classic situation when you create a table for a development requirement and then you need to add a couple of columns, but don’t want to lose your data.  There is a couple of ways of getting this done.  I’d do “ALTER TABLE ADD column” operations.  This is super simple and I’ll outline the procedure with pseudo code.

First drop constraints and indexes on the table.

select 'ALTER TABLE ‘ || owner || ‘.’ || table_name || ‘ DROP CONSTRAINT ' || constraint_name ||';' from all_constraints where table_name = 'F55MYRXX' and owner = 'TESTDTA';

alter table testdta.F55myrxx drop constraint F55MYRXX_PK;

select 'DROP INDEX ' || owner || '.' || index_name || ';' from all_indexes where table_name = 'F55MYRXX' and owner = 'TESTDTA';

DROP INDEX TESTDTA.F55MYRXX_0;

alter table testdta.F55MYRXX rename to F55MYRXXBAK ;

--so now you have your table as a BAK – cool – this is ready to insert the data from (or use it to alter and then generate the indexes again).

Note that you need to do the above, as the rename does not rename the constraints or the PK’s that they will give you problems when you go to generate the table from E1.

Generate the new table structure from OMW

image

Now, see the column differences:

select column_name from all_tab_columns where table_name ='F55MYRXX' and owner = 'TESTDTA'
minus
select column_name from all_tab_columns where table_name ='F55MYRXXBAK' and owner = 'TESTDTA';

COLUMN_NAME                   
------------------------------
XXIDNUM1                      
XXIDNUM2                      
XXIDNUM3                      
XXIDNUM4
 

Note that if you get nothing, you’ve done SOMETHING WRONG.  Delete your global tables and dddict and ddtext files on your fatty and try again.  Perhaps get the specs of the table.  You should get column differences.

So, you can use this information as you’d like.  Either copy back in your data, or if you have heaps, run some alter table statements.  You need to know the oracle data types if you are going to execute alter table, get these with the statement below:

select * from all_Tab_columns where owner = 'TESTDTA' and table_name = 'F55MYRXX' and column_name in (
select column_name from all_tab_columns where table_name ='F55MYRXX' and owner = 'TESTDTA'
minus
select column_name from all_tab_columns where table_name ='F55MYRXXBAK' and owner = 'TESTDTA');

image

Then alter your backup table, or use the alter statements for the future environments.

select 'ALTER TABLE ' || owner || '.' || TABLE_NAME || 'BAK ADD (' || COLUMN_NAME || '' || DATA_TYPE || '(' || data_length || ') );'  from all_Tab_columns where owner = 'TESTDTA' and table_name = 'F55MYRXX' and column_name in (
select column_name from all_tab_columns where table_name ='F55MYRXX' and owner = 'TESTDTA'
minus
select column_name from all_tab_columns where table_name ='F55MYRXXBAK' and owner = 'TESTDTA');

run the output:

ALTER TABLE TESTDTA.F55MYRXXBAK ADD (XXIDNUM1 NCHAR(40) );
ALTER TABLE TESTDTA.F55MYRXXBAK ADD (XXIDNUM2 NCHAR(40) );
ALTER TABLE TESTDTA.F55MYRXXBAK ADD (XXIDNUM3 NCHAR(40) );
ALTER TABLE TESTDTA.F55MYRXXBAK ADD (XXIDNUM4 NCHAR(40) );

Then your backup table has all of the columns.  Note that you might need to do some cool things with 1 char strings and the like, but you get the picture.  The cool thing about this method is that you can now insert you data back with a very simple command [as you’ve added the columns to the backup]:

insert into TESTDTA.F55MYRXX select * from TESTDTA.F55MYRXXBAK ;
commit;

Once you have the above, you could use it for all your subsequent environments without all of the drop malarky, just change the owner name.

The other way to do this is to do an insert into select * from and list all of the columns

insert into TESTDTA.F55MYRXX (COL1, COL2…) select COL1, COL2…,0,’’,’’,0 from TESTDTA.MYRXXBAK;

Note that the ‘’,0,’’,0 are for the new columns at the end of the table.

if you are debugging some code, from a CNC perspective–development notes

$
0
0

Ever been knees deep (I said knees) in code and wondering why a BC is being read and a GC etc etc

image

Here is a handy refernce from oracle for what they are and when they are populated

Description of Figure 22-3 follows

Note that you might need to also view some of these flows to know exactly when a GB is written to a GC…  https://docs.oracle.com/cd/E17984_01/doc.898/e14706/grid_controls.htm#g8d6ab57f7cedeaac_ef90c_10a77c8e3f7__7257 


 

Available Object CodeDescription
BCA column in the business view (BV). BCs for both the form view and the grid view appear in this list. The system fills these columns with values from the database when it performs a fetch. The system writes these values to the database during an add or update.
GCA column in the grid. The row that the value references depends on which event is accessing the GC. During the fetch cycle, it is usually the selected row. In some circumstances, CG objects also denote a particular physical column in the grid instead of a value. An example is the Set Grid Font system function.
GBThe grid buffer. This buffer is one row of data that is independent of the lines that the system reads from the database and writes to the grid. The GB enables you to manipulate column data for a line that you want to insert or update without affecting the present state of the grid. You access the GB through an available GB object, which appears after the GC objects in the list of available objects in Event Rules Design. Each grid contains only one instance of each GB column.
FCA control on the form. If the control is a database item, this field corresponds to a BC object. Furthermore, if the control is not a filter, the FC object represents the same value as the BC object, and changing one of these results in changing both.
FIA value passed through a form interconnection. You access this object either to read values that are passed into the form or to set values to be passed back. These objects correspond to the elements of the form data structure.
POA value passed from a PO. These values are passed into the application when a user launches it. Any form in that application can access them. POs can either be entered by the user, or they can be set up in a particular version of an application.
QCA cell from the QBE line in the grid. These objects represent the values in any QBE cell on the grid. They include wild cards, but do not include any comparison operators. Likewise, assignments to these objects can include wild cards, but not comparison operators. To set comparisons, you must use a system function.
HCA hypercontrol item. A hypercontrol item is a menu item or a tool bar item.
VAER variables. These objects represent any variables that you set up in ER.
SVSystem variables. These objects represent some environment variables that are accessible to ER.
SLSystem literals. These objects represent some constant system values that are accessible to ER.
TPTab page object.
TKA column in the table that contains the table ER.
COA constant, such as the return code for an error.
TVText variables.
RCReport constants for a batch application.
RVReport variables (batch application).
ICAn input column (table conversion).
OCAn output column (table conversion).

OATS functional testing gone wrong

$
0
0

First problem was that I could not run any applications, see below:  This was from openscript, l

image

[1] no title

close window(“@index=’0’”)

Need to run openscript as administrator, and then you do not get this error.

image

I then had another issue that the workspace could not be opened. see file “c:\users\smoir\osworkspace\.metadata\.log”

In this file there were tons of errors, I removed the entire “osworkspace” folder and then openscript started.

Wow, now I can start functional testing.

I’ve finally worked out ` in pl/sql (flea, flee, fle)

$
0
0

This should have occured before now, but it’s done.  Why is the title of this about `, because the ` command in shell will execute the internals of the command immediately.

I used to always run the results of a script, but I may never do that again, I’m now going to use execute immediate and a loop.  This has changed my scripting 100%.  This is going to save a lot of copy and paste.  I’ll need to work on doing commits, but I’m sure I can get that working too.

Thanks to my freidnly DBA Satheesh for this one!

BEGIN
   FOR R IN (SELECT owner, table_name FROM dba_tables WHERE owner in ('TESTCTL','TESTDTA','CRPCTL','CRPDTA')) LOOP
      EXECUTE IMMEDIATE 'grant select on '||R.owner||'.'||R.table_name||' to JDE_USERS';
   END LOOP;
END;
/

The above can be used instead of generating all of the “GRANT” statements and then running them with cut and paste.

Viewing all 541 articles
Browse latest View live